mirror of
https://github.com/IllusionMan1212/android-native-example-odin.git
synced 2026-10-24 10:12:33 +00:00
move the main file to the project's root dir
This commit is contained in:
@@ -2,22 +2,22 @@
|
|||||||
|
|
||||||
## TODO: handle different ABIs, currently only builds for arm64
|
## TODO: handle different ABIs, currently only builds for arm64
|
||||||
|
|
||||||
ANDROID_JBR=/home/illusion/android-studio/jbr
|
#ANDROID_JBR=/home/illusion/android-studio/jbr
|
||||||
|
|
||||||
# Create a debug signing key to sign our application.
|
# Create a debug signing key to sign our application.
|
||||||
if [ ! -f .keystore ]; then
|
if [ ! -f .keystore ]; then
|
||||||
"$ANDROID_JBR/bin/keytool" -genkey -dname "CN=Android Debug, O=Android, C=US" -keystore .keystore -alias androiddebugkey -storepass android -keypass android -keyalg RSA -validity 30000
|
keytool -genkey -dname "CN=Android Debug, O=Android, C=US" -keystore .keystore -alias androiddebugkey -storepass android -keypass android -keyalg RSA -validity 30000
|
||||||
if [ $? -ne 0 ]; then exit 1; fi
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build the shared lib
|
# Build the shared lib
|
||||||
odin build jni -target:linux_arm64 -subtarget:android -build-mode:shared
|
odin build . -target:linux_arm64 -subtarget:android -build-mode:shared
|
||||||
|
|
||||||
# Create the proper lib directories and move the shared lib to them
|
# Create the proper lib directories and move the shared lib to them
|
||||||
# Rename the shared lib to match what we specified in the AndroidManifest.xml file
|
# Rename the shared lib to match what we specified in the AndroidManifest.xml file
|
||||||
# for the android.app.lib_name metadata value
|
# for the android.app.lib_name metadata value
|
||||||
mkdir -p android/lib/lib/arm64-v8a
|
mkdir -p android/lib/lib/arm64-v8a
|
||||||
mv jni.so android/lib/lib/arm64-v8a/libmain.so
|
mv android-native-example-odin.so android/lib/lib/arm64-v8a/libmain.so
|
||||||
|
|
||||||
# Bundle the directory into an apk
|
# Bundle the directory into an apk
|
||||||
odin bundle android android -android-keystore:.keystore -android-keystore-password:"android"
|
odin bundle android android -android-keystore:.keystore -android-keystore-password:"android"
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ engine_init_display :: proc "contextless" (engine: ^engine) {
|
|||||||
|
|
||||||
display := egl.GetDisplay(egl.DEFAULT_DISPLAY)
|
display := egl.GetDisplay(egl.DEFAULT_DISPLAY)
|
||||||
if display == egl.NO_DISPLAY {
|
if display == egl.NO_DISPLAY {
|
||||||
LOG(.INFO, "NativeExampleOdin", "Naterror with eglGetDisplay")
|
LOG(.INFO, "NativeExampleOdin", "error with eglGetDisplay")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user