mirror of
https://github.com/love2d/love-android.git
synced 2026-08-13 00:50:56 +02:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 07088eee88 | |||
| 3d1503f917 | |||
| 65c4223d0a | |||
| 1975903d2e | |||
| 860c109861 | |||
| e74a9ef791 | |||
| 55feb38fa1 | |||
| 6811eca7d2 | |||
| d1f74df686 | |||
| c3ed3b454b | |||
| 8a3d635cdb | |||
| a81931be2c | |||
| 7a0068535b | |||
| 034a6d6361 |
@@ -5,41 +5,57 @@ on: [push, pull_request]
|
||||
jobs:
|
||||
build-android:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
build_type: [Debug, Release]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: Setup Java 17
|
||||
uses: actions/setup-java@v3
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: adopt-hotspot
|
||||
java-version: 17
|
||||
cache: gradle
|
||||
- name: Build
|
||||
run: bash ./gradlew assembleNormalRecord assembleEmbedRelease bundleNormalNoRecordRelease bundleEmbedRecordRelease bundleEmbedNoRecordRelease
|
||||
- name: Build Normal Flavor
|
||||
run: bash ./gradlew assembleNormalRecord${{ matrix.build_type }}
|
||||
- name: Build Release-specific Binaries
|
||||
if: ${{ matrix.build_type == 'Release' }}
|
||||
run: bash ./gradlew assembleEmbedRelease bundleNormalNoRecordRelease bundleEmbedRecordRelease bundleEmbedNoRecordRelease
|
||||
- name: Artifact (Normal debug APK)
|
||||
uses: actions/upload-artifact@v3
|
||||
if: ${{ matrix.build_type == 'Debug' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: love-android-debug.apk
|
||||
path: app/build/outputs/apk/normalRecord/debug/app-normal-record-debug.apk
|
||||
- name: Artifact (Normal unsigned APK)
|
||||
uses: actions/upload-artifact@v3
|
||||
if: ${{ matrix.build_type == 'Release' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: love-android.apk
|
||||
path: app/build/outputs/apk/normalRecord/release/app-normal-record-release-unsigned.apk
|
||||
- name: Artifact (Normal AAB w/o recording)
|
||||
uses: actions/upload-artifact@v3
|
||||
if: ${{ matrix.build_type == 'Release' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: love-android-ps.aab
|
||||
path: app/build/outputs/bundle/normalNoRecordRelease/app-normal-noRecord-release.aab
|
||||
- name: Artifact (Embed AAB)
|
||||
uses: actions/upload-artifact@v3
|
||||
if: ${{ matrix.build_type == 'Release' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: love-android-embed-record.aab
|
||||
path: app/build/outputs/bundle/embedRecordRelease/app-embed-record-release.aab
|
||||
- name: Artifact (Embed AAB w/o recording)
|
||||
uses: actions/upload-artifact@v3
|
||||
if: ${{ matrix.build_type == 'Release' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: love-android-embed.aab
|
||||
path: app/build/outputs/bundle/embedNoRecordRelease/app-embed-noRecord-release.aab
|
||||
- name: Artifact (Debug symbols)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: love-android-unstripped-debugsyms-${{ matrix.build_type }}
|
||||
path: love/build/intermediates/library_jni
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Android Port of LÖVE, an awesome 2D game engine for Lua (http://love2d.org)
|
||||
Copyright (c) 2006-2023 LOVE Development Team
|
||||
Copyright (c) 2006-2024 LOVE Development Team
|
||||
|
||||

|
||||
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ android {
|
||||
applicationId project.properties["app.application_id"]
|
||||
versionCode project.properties["app.version_code"].toInteger()
|
||||
versionName project.properties["app.version_name"]
|
||||
minSdk 16
|
||||
minSdk 18
|
||||
compileSdk 34
|
||||
targetSdk 34
|
||||
|
||||
|
||||
+2
-2
@@ -8,8 +8,8 @@ app.name_byte_array=76,195,150,86,69,32,102,111,114,32,65,110,100,114,111,105,10
|
||||
|
||||
app.application_id=org.love2d.android
|
||||
app.orientation=landscape
|
||||
app.version_code=31
|
||||
app.version_name=11.5
|
||||
app.version_code=32
|
||||
app.version_name=11.5a
|
||||
|
||||
# No need to modify anything past this line!
|
||||
android.enableJetifier=false
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ This distribution contains code from the following projects (full license text b
|
||||
- LOVE
|
||||
Website: https://love2d.org/
|
||||
License: zlib
|
||||
Copyright (c) 2006-2023 LOVE Development Team
|
||||
Copyright (c) 2006-2024 LOVE Development Team
|
||||
|
||||
- ENet
|
||||
Website: http://enet.bespin.org/index.html
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ android {
|
||||
ndkVersion '25.2.9519653'
|
||||
|
||||
defaultConfig {
|
||||
minSdk 16
|
||||
minSdk 18
|
||||
compileSdk 34
|
||||
targetSdk 34
|
||||
externalNativeBuild {
|
||||
|
||||
@@ -1023,8 +1023,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
/* No valid hint, nothing is explicitly allowed */
|
||||
if (!is_portrait_allowed && !is_landscape_allowed) {
|
||||
if (resizable) {
|
||||
/* All orientations are allowed */
|
||||
req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
|
||||
/* All orientations are allowed, respecting user orientation lock setting */
|
||||
req = ActivityInfo.SCREEN_ORIENTATION_FULL_USER;
|
||||
} else {
|
||||
/* Fixed window and nothing specified. Get orientation from w/h of created window */
|
||||
req = (w > h ? ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE : ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);
|
||||
@@ -1033,8 +1033,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
/* At least one orientation is allowed */
|
||||
if (resizable) {
|
||||
if (is_portrait_allowed && is_landscape_allowed) {
|
||||
/* hint allows both landscape and portrait, promote to full sensor */
|
||||
req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
|
||||
/* hint allows both landscape and portrait, promote to full user */
|
||||
req = ActivityInfo.SCREEN_ORIENTATION_FULL_USER;
|
||||
} else {
|
||||
/* Use the only one allowed "orientation" */
|
||||
req = (is_landscape_allowed ? orientation_landscape : orientation_portrait);
|
||||
|
||||
+1
-1
Submodule love/src/jni/love updated: 6eb8d54673...21c1fce988
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright (c) 2006-2023 LOVE Development Team
|
||||
* Copyright (c) 2006-2024 LOVE Development Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any damages
|
||||
@@ -114,10 +114,12 @@ public class GameActivity extends SDLActivity {
|
||||
gamePath = "";
|
||||
storagePermissionUnnecessary = false;
|
||||
embed = getResources().getBoolean(R.bool.embed);
|
||||
needToCopyGameInArchive = embed;
|
||||
|
||||
if (!embed) {
|
||||
handleIntent(getIntent());
|
||||
setIntent(null);
|
||||
Intent intent = getIntent();
|
||||
handleIntent(intent);
|
||||
intent.setData(null);
|
||||
}
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
@@ -171,6 +173,9 @@ public class GameActivity extends SDLActivity {
|
||||
filename = pathSegments[pathSegments.length - 1];
|
||||
}
|
||||
|
||||
// Sanitize filename to prevent PhysFS complaining later.
|
||||
filename = filename.replaceAll("[^a-zA-Z0-9_\\\\-\\\\.]", "_");
|
||||
|
||||
String destination_file = this.getCacheDir().getPath() + "/" + filename;
|
||||
InputStream data = getContentResolver().openInputStream(game);
|
||||
|
||||
@@ -200,11 +205,6 @@ public class GameActivity extends SDLActivity {
|
||||
alert_dialog.setCancelable(false);
|
||||
alert_dialog.create().show();
|
||||
}
|
||||
} else {
|
||||
// No game specified via the intent data or embed build is used.
|
||||
// Load game archive only when needed.
|
||||
needToCopyGameInArchive = embed;
|
||||
gamePath = "";
|
||||
}
|
||||
|
||||
Log.d("GameActivity", "new gamePath: " + gamePath);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright (c) 2006-2023 LOVE Development Team
|
||||
* Copyright (c) 2006-2024 LOVE Development Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright (c) 2006-2023 LOVE Development Team
|
||||
* Copyright (c) 2006-2024 LOVE Development Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright (c) 2006-2023 LOVE Development Team
|
||||
* Copyright (c) 2006-2024 LOVE Development Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any damages
|
||||
@@ -48,8 +48,10 @@ public class SelectorActivity extends AppCompatActivity {
|
||||
new ActivityResultContracts.OpenDocument(),
|
||||
(Uri result) -> {
|
||||
if (result != null) {
|
||||
|
||||
Intent intent = new Intent(SelectorActivity.this, GameActivity.class);
|
||||
intent.setData(result);
|
||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user