Linux compile fix

This commit is contained in:
Lubos 2022-03-04 16:23:57 +01:00
parent 38bc4decc6
commit 4fbdd88833
3 changed files with 33 additions and 30 deletions

View file

@ -1,15 +1,19 @@
PLATFORM=android
ANDROID_SDK_VERSION=android26
ANDROID_NDK_VERSION=21.1.6352462
## Uncomment for Windows host platform
UNAME := $(shell uname)
ifeq ($(UNAME), Linux)
ANDROID_NDK=/opt/AndroidSDK/ndk/$(ANDROID_NDK_VERSION)
ANDROID_CC=$(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-$(ANDROID_SDK_VERSION)-clang
ANDROID_CFLAGS=--target=aarch64-linux-$(ANDROID_SDK_VERSION)
ANDROID_RANLIB=$(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-ranlib
else
ANDROID_NDK=C:/Users/simon/AppData/Local/Android/Sdk/ndk/$(ANDROID_NDK_VERSION)
ANDROID_CC=$(ANDROID_NDK)/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
ANDROID_CFLAGS=--target=aarch64-linux-$(ANDROID_SDK_VERSION)
ANDROID_RANLIB=$(ANDROID_NDK)/toolchains/llvm/prebuilt/windows-x86_64/bin/aarch64-linux-android-ranlib.exe
## Uncomment for Linux host platform
# ANDROID_NDK=~/Android/Sdk/ndk/$(ANDROID_NDK_VERSION)
# ANDROID_CC=$(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-$(ANDROID_SDK_VERSION)-clang
# ANDROID_RANLIB=$(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-ranlib
endif
BUILD_CLIENT=1
BUILD_CLIENT_SMP=0
BUILD_GAME_QVM=0

View file

@ -16,13 +16,12 @@ NOTE: Hand tracking is enabled, but this has been done because I got too annoyed
The scripts assume that you installed everything in the default locations. In case you want to deviate from that, the paths are in ./android/run.(sh|bat) and in Makefile.local.
#### Linux
1. Open Makefile.local and uncomment the Linux section.
1. Update ANDROID_NDK path in Makefile.local
2. Run ./android/run.sh
#### Windows
1. Open Makefile.local and uncomment the Windows section.
2. Replace \<username\> with your windows username folder as it appears in C:\Users.
3. Open git bash and run ./android/run.bat.
1. Replace \<username\> with your windows username folder as it appears in C:\Users.
2. Open git bash and run ./android/run.bat.
# Original ioq3 README:
,---------------------------------------.

View file

@ -19,7 +19,7 @@ if [ $? -ne 0 ]; then
exit 1
fi
PACKAGE_NAME=com.sparkie.ioq3quest
PACKAGE_NAME=com.drbeef.ioq3quest
ANDROID_STORAGE_LOCATION=/sdcard/Android/data/$PACKAGE_NAME/files/
APK_LOCATION=./app/build/outputs/apk/debug/app-debug.apk
@ -32,22 +32,22 @@ if [ $? -ne 0 ]; then
exit 1
fi
fi
adb shell mkdir -p $ANDROID_STORAGE_LOCATION
adb push --sync ~/.local/share/Steam/steamapps/common/Quake\ 3\ Arena/baseq3 $ANDROID_STORAGE_LOCATION
if [ $? -ne 0 ]; then
echo "Failed to transfer files."
exit 1
fi
adb push --sync ../code/renderergl2/glsl $ANDROID_STORAGE_LOCATION/baseq3/
if [ $? -ne 0 ]; then
echo "Failed to transfer shaders."
exit 1
fi
adb push --sync autoexec.cfg $ANDROID_STORAGE_LOCATION/baseq3/
if [ $? -ne 0 ]; then
echo "Failed to transfer autoexec."
exit 1
fi
#adb shell mkdir -p $ANDROID_STORAGE_LOCATION
#adb push --sync ~/.local/share/Steam/steamapps/common/Quake\ 3\ Arena/baseq3 $ANDROID_STORAGE_LOCATION
#if [ $? -ne 0 ]; then
# echo "Failed to transfer files."
# exit 1
#fi
#adb push --sync ../code/renderergl2/glsl $ANDROID_STORAGE_LOCATION/baseq3/
#if [ $? -ne 0 ]; then
# echo "Failed to transfer shaders."
# exit 1
#fi
#adb push --sync autoexec.cfg $ANDROID_STORAGE_LOCATION/baseq3/
#if [ $? -ne 0 ]; then
# echo "Failed to transfer autoexec."
# exit 1
#fi
adb logcat -c
adb shell am start -n $PACKAGE_NAME/.MainActivity