Skip to content

Commit

Permalink
improve android export
Browse files Browse the repository at this point in the history
  • Loading branch information
gabordemooij committed Nov 22, 2024
1 parent a3ac003 commit 6ffe991
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 0 deletions.
29 changes: 29 additions & 0 deletions misc/export/android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />

<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.CitrineAndroid"
tools:targetApi="31">
<activity
android:name=".MainActivity"
android:exported="true"
android:screenOrientation="landscape"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
2 changes: 2 additions & 0 deletions misc/export/android/Application.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
APP_ABI := arm64-v8a
APP_PLATFORM=android-16
7 changes: 7 additions & 0 deletions misc/export/android/MainActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.citrine.citrineandroid;
import org.libsdl.app.SDLActivity;


public class MainActivity extends SDLActivity {
// Used to load the 'citrineandroid' library on application startup.
}
39 changes: 39 additions & 0 deletions misc/export/android/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

adapt files/folders to suit your needs!

AndroidStudioProjects
├── CitrineAndroid
│   ├── app
│   │   ├── build/...
│   │   ├── build.gradle.kts
│   │   ├── jni
│   │   │   ├── Android.mk (here, write contents: include $(call all-subdir-makefiles) )
│   │   │   ├── Application.mk (here, put the file from this dir)
│   │   │   ├── Citrine
│   │   │   │   ├── Android.mk (here, put the file from this dir)
│   │   │   │   ├── citrine.c (here, put the file from this dir)
│   │   │   │   ├── orig -> link to Citrine source dir
│   │   │   ├── SDL/.. (copy of SDL2/SDL - sorry...)
│   │   │   ├── SDL2/..
│   │   │   ├── SDL_image/..
│   │   │   ├── SDL_mixer/..
│   │   │   └── SDL_ttf/..
│   │   ├── libs/..
│   │   ├── obj/..
│   │   ├── proguard-rules.pro (this file can be empty)
│   │   └── src
│   │   └── main
│   │       ├── AndroidManifest.xml
│   │      ├── assets/data (put your data pack here)
│   │      ├── java/com/citrine/citrineandroid/MainActivity.Java
│   │       └── res/... (your icons etc..)
│   ├── build.gradle
│   ├── gradle/...
│   │   └── wrapper
│   │   ├── gradle-wrapper.jar
│   │   └── gradle-wrapper.properties
│   ├── gradle.properties
│   ├── gradlew
│   ├── gradlew.bat
│   ├── local.properties
│   ├── settings.gradle

0 comments on commit 6ffe991

Please sign in to comment.