mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2024-12-05 00:38:00 +01:00
android: use LIBSUPERDERPY_APPID as the package name and net.dosowisko.libsuperderpy.Activity as activity name
This commit is contained in:
parent
de835593c8
commit
2299cacc16
3 changed files with 13 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="net.dosowisko.${LIBSUPERDERPY_GAMENAME}"
|
||||
package="${LIBSUPERDERPY_APPID}"
|
||||
android:versionCode="${LIBSUPERDERPY_RELEASE}"
|
||||
android:versionName="${LIBSUPERDERPY_VERSION}"
|
||||
android:installLocation="auto">
|
||||
|
@ -8,7 +8,7 @@
|
|||
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
|
||||
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" android:resizeable="true" />
|
||||
<application android:label="@string/app_name" android:debuggable="${LIBSUPERDERPY_ANDROID_DEBUGGABLE}" android:icon="@mipmap/${LIBSUPERDERPY_GAMENAME}">
|
||||
<activity android:name="net.dosowisko.${LIBSUPERDERPY_GAMENAME}.SuperDerpyActivity"
|
||||
<activity android:name="net.dosowisko.libsuperderpy.Activity"
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="${LIBSUPERDERPY_ANDROID_ORIENTATION}"
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package net.dosowisko.${LIBSUPERDERPY_GAMENAME};
|
||||
package net.dosowisko.libsuperderpy;
|
||||
|
||||
import org.liballeg.android.AllegroActivity;
|
||||
import android.view.View;
|
||||
import android.os.Bundle;
|
||||
|
||||
public class SuperDerpyActivity extends AllegroActivity {
|
||||
public class Activity extends AllegroActivity {
|
||||
|
||||
/* Load Allegro and other shared libraries in the lib directory of the apk
|
||||
* bundle. You must load libraries which are required by later libraries
|
||||
* bundle. You must load libraries which are required by later libraries
|
||||
* first.
|
||||
*/
|
||||
static {
|
||||
|
@ -26,7 +26,7 @@ public class SuperDerpyActivity extends AllegroActivity {
|
|||
* shared object `libapp.so'. You can specify another library name by
|
||||
* overriding the constructor.
|
||||
*/
|
||||
public SuperDerpyActivity() {
|
||||
public Activity() {
|
||||
super("libgame.so");
|
||||
}
|
||||
|
|
@ -193,6 +193,10 @@ endif()
|
|||
set(LIBSUPERDERPY_RELEASE "1")
|
||||
endif(NOT DEFINED LIBSUPERDERPY_RELEASE)
|
||||
|
||||
if (NOT DEFINED LIBSUPERDERPY_APPID)
|
||||
set(LIBSUPERDERPY_APPID "net.dosowisko.${LIBSUPERDERPY_GAMENAME}")
|
||||
endif(NOT DEFINED LIBSUPERDERPY_APPID)
|
||||
|
||||
if (ANDROID OR EMSCRIPTEN)
|
||||
if (ANDROID)
|
||||
set(FLACTOOGG_DATADIR "${CMAKE_BINARY_DIR}/android/assets/data")
|
||||
|
@ -231,7 +235,7 @@ endif()
|
|||
add_custom_target(${LIBSUPERDERPY_GAMENAME}_run_apk
|
||||
DEPENDS ${LIBSUPERDERPY_GAMENAME}_install_apk
|
||||
COMMAND adb -d shell
|
||||
'am start -a android.intent.action.MAIN -n net.dosowisko.${LIBSUPERDERPY_GAMENAME}/.SuperDerpyActivity'
|
||||
'am start -a android.intent.action.MAIN -n ${LIBSUPERDERPY_APPID}/net.dosowisko.libsuperderpy.Activity'
|
||||
)
|
||||
|
||||
else(ANDROID)
|
||||
|
@ -306,10 +310,8 @@ endif()
|
|||
if (ALLEGRO5_LIBRARIES MATCHES "^.*-debug.*$")
|
||||
set(ALLEGRO_DEBUG_SUFFIX "-debug")
|
||||
endif()
|
||||
configure_file("${CMAKE_BINARY_DIR}/android/src/net/dosowisko/libsuperderpy/SuperDerpyActivity.java.in" "${CMAKE_BINARY_DIR}/android/src/net/dosowisko/libsuperderpy/SuperDerpyActivity.java")
|
||||
file(REMOVE "${CMAKE_BINARY_DIR}/android/src/net/dosowisko/libsuperderpy/SuperDerpyActivity.java.in")
|
||||
|
||||
file(RENAME "${CMAKE_BINARY_DIR}/android/src/net/dosowisko/libsuperderpy" "${CMAKE_BINARY_DIR}/android/src/net/dosowisko/${LIBSUPERDERPY_GAMENAME}")
|
||||
configure_file("${CMAKE_BINARY_DIR}/android/src/net/dosowisko/libsuperderpy/Activity.java.in" "${CMAKE_BINARY_DIR}/android/src/net/dosowisko/libsuperderpy/Activity.java")
|
||||
file(REMOVE "${CMAKE_BINARY_DIR}/android/src/net/dosowisko/libsuperderpy/Activity.java.in")
|
||||
|
||||
file(COPY ${ALLEGRO5_LIBS} DESTINATION ${LIBRARY_OUTPUT_PATH})
|
||||
file(COPY "${ANDROID_ALLEGRO_ROOT}/lib/Allegro5.jar" DESTINATION ${LIBRARY_OUTPUT_PATH})
|
||||
|
|
Loading…
Reference in a new issue