Repository navigation
Expand file tree
/
Copy pathAndroid-build.sh
More file actions
48 lines (38 loc) · 1.62 KB
/
Copy pathAndroid-build.sh
File metadata and controls
48 lines (38 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
### use it like this bash ./Android-build.sh Release or ./Android-build.sh Debug
# Check if an argument is passed
if [ -z "$1" ]; then
echo "Error: No argument provided. pass Release or Debug"
exit 1
fi
# allways first build the desktop version for creating compile_commands.json
# Check the argument
if [ "$1" == "Release" ]; then
echo "Release Build"
rm -rf ./build/Darwin/Other/Android/*
cmake --preset "arm64-v8a" -DCMAKE_BUILD_TYPE=Release
cmake --build --preset "arm64-v8a" --config Release
cmake --preset "armeabi-v7a" -DCMAKE_BUILD_TYPE=Release
cmake --build --preset "armeabi-v7a" --config Release
# cmake --preset "x86_64" -DCMAKE_BUILD_TYPE=Release
# cmake --build --preset "x86_64" --config Release
# cmake --preset "x86" -DCMAKE_BUILD_TYPE=Release
# cmake --build --preset "x86" --config Release
cmake --preset "Build-App" -DCMAKE_BUILD_TYPE=Release
cmake --build --preset "Build-App" --config Release
rm -rf ./build/Darwin/Other/Android/Build-App
adb uninstall com.pixelatedvision.xoxo
adb install -r ./build/Darwin/Other/Android/App/bin/xoxo.final.apk
elif [ "$1" == "Debug" ]; then
echo "Debug Build"
rm -rf ./build/Darwin/Other/Android/*
cmake --preset "arm64-v8a" -DCMAKE_BUILD_TYPE=Debug
cmake --build --preset "arm64-v8a" --config Debug
cmake --preset "Build-App" -DCMAKE_BUILD_TYPE=Debug
cmake --build --preset "Build-App" --config Debug
adb uninstall com.pixelatedvision.xoxo
adb install -r ./build/Darwin/Other/Android/App/bin/xoxo.final.apk
else
echo "Error: Unknown argument. Debug or Release"
exit 1
fi