mirror of
https://github.com/bjornbytes/lovr.git
synced 2024-07-02 12:33:52 +00:00
Fix ANDROID_ASSETS option;
This commit is contained in:
parent
d8f7325bc7
commit
0a27a0b17b
|
@ -648,6 +648,10 @@ elseif(ANDROID)
|
||||||
set(ANDROID_LIBS_DST ${ANDROID_LIBS_DST} "lib/${ANDROID_ABI}/libvrapi.so")
|
set(ANDROID_LIBS_DST ${ANDROID_LIBS_DST} "lib/${ANDROID_ABI}/libvrapi.so")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(ANDROID_ASSETS)
|
||||||
|
set(ANDROID_ASSETS_FLAG -A ${ANDROID_ASSETS})
|
||||||
|
endif()
|
||||||
|
|
||||||
# Compile java file to class file
|
# Compile java file to class file
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${ACTIVITY_CLASS}
|
OUTPUT ${ACTIVITY_CLASS}
|
||||||
|
@ -680,6 +684,7 @@ elseif(ANDROID)
|
||||||
-M ${ANDROID_MANIFEST}
|
-M ${ANDROID_MANIFEST}
|
||||||
-I ${ANDROID_JAR}
|
-I ${ANDROID_JAR}
|
||||||
-F lovr.unaligned.apk
|
-F lovr.unaligned.apk
|
||||||
|
${ANDROID_ASSETS_FLAG}
|
||||||
COMMAND
|
COMMAND
|
||||||
${ANDROID_BUILD_TOOLS}/aapt
|
${ANDROID_BUILD_TOOLS}/aapt
|
||||||
add -f
|
add -f
|
||||||
|
|
2
Tupfile
2
Tupfile
|
@ -83,7 +83,7 @@ ifeq ($(PLATFORM),android)
|
||||||
|
|
||||||
# Create an apk from the Android manifest. The zip command is used afterwards to add raw files
|
# Create an apk from the Android manifest. The zip command is used afterwards to add raw files
|
||||||
# because it is way faster than calling aapt again and apks are just zips (TODO windows).
|
# because it is way faster than calling aapt again and apks are just zips (TODO windows).
|
||||||
: @(ANDROID_MANIFEST) | $(LIB)/*.so classes.dex |> ^ AAPT %b^ aapt package -F %o -M %f -I $(ANDROID_JAR) -A @(ANDROID_ASSETS) && zip -qu0 %o $(LIB)/*.so classes.dex |> tmp/lovr.unaligned.apk
|
: @(ANDROID_MANIFEST) | $(LIB)/*.so classes.dex |> ^ AAPT %b^ aapt package -F %o -M %f -I $(ANDROID_JAR) $(ANDROID_ASSETS) && zip -qu0 %o $(LIB)/*.so classes.dex |> tmp/lovr.unaligned.apk
|
||||||
|
|
||||||
# Even though we have an apk, it isn't actually valid yet. It has to be aligned using the special
|
# Even though we have an apk, it isn't actually valid yet. It has to be aligned using the special
|
||||||
# zipalign tool, and then signed using apksigner.
|
# zipalign tool, and then signed using apksigner.
|
||||||
|
|
|
@ -188,6 +188,10 @@ ifeq ($(PLATFORM),android)
|
||||||
PREFIX = $(LIB)/lib
|
PREFIX = $(LIB)/lib
|
||||||
SUFFIX = .so
|
SUFFIX = .so
|
||||||
|
|
||||||
|
ifneq (@(ANDROID_ASSETS),)
|
||||||
|
ANDROID_ASSETS = -A @(ANDROID_ASSETS)
|
||||||
|
endif
|
||||||
|
|
||||||
# Macros
|
# Macros
|
||||||
!dx = |> ^ DX %b^ dx --dex --output=%o %f |>
|
!dx = |> ^ DX %b^ dx --dex --output=%o %f |>
|
||||||
!zipalign = |> ^ ZIPALIGN %f^ $(TOOLS)/zipalign -f 4 %f %o |>
|
!zipalign = |> ^ ZIPALIGN %f^ $(TOOLS)/zipalign -f 4 %f %o |>
|
||||||
|
|
Loading…
Reference in a new issue