This repository has been archived by the owner on Apr 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
make_duktape_android.bat
71 lines (62 loc) · 3.93 KB
/
make_duktape_android.bat
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
@echo off
SET ANDROID_NDK=E:/android-ndk-r15c
SET BASE_PATH=%~dp0
SET BUILD_PATH=%~dp0build\duktape
echo %BUILD_PATH%
mkdir %BUILD_PATH% 2>nul
cd %BUILD_PATH%
rd /s /q %BUILD_PATH%\Android_v7a_debug 2>nul
echo building v7a debug
mkdir %BUILD_PATH%\Android_v7a_debug
cd %BUILD_PATH%\Android_v7a_debug
cmake -DCMAKE_BUILD_TYPE=RELEASE -DDUKTAPE_SRC_CAT=debug -DANDROID_ABI=armeabi-v7a -DCMAKE_TOOLCHAIN_FILE=%ANDROID_NDK%/build/cmake/android.toolchain.cmake -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-clang -DANDROID_NATIVE_API_LEVEL=android-9 -G "NMake Makefiles" ../../..
cd %BUILD_PATH%
cmake --build Android_v7a_debug --config Release
mkdir ..\..\prebuilt\debug\Plugins\Android\libs\armeabi-v7a\ 2>nul
xcopy /Y .\Android_v7a_debug\libduktape.so ..\..\prebuilt\debug\Plugins\Android\libs\armeabi-v7a\
rd /s /q %BUILD_PATH%\Android_v7a_release 2>nul
echo building v7a release
mkdir %BUILD_PATH%\Android_v7a_release
cd %BUILD_PATH%\Android_v7a_release
cmake -DCMAKE_BUILD_TYPE=RELEASE -DDUKTAPE_SRC_CAT=release -DANDROID_ABI=armeabi-v7a -DCMAKE_TOOLCHAIN_FILE=%ANDROID_NDK%/build/cmake/android.toolchain.cmake -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-clang -DANDROID_NATIVE_API_LEVEL=android-9 -G "NMake Makefiles" ../../..
cd %BUILD_PATH%
cmake --build Android_v7a_release --config Release
mkdir ..\..\prebuilt\release\Plugins\Android\libs\armeabi-v7a\ 2>nul
xcopy /Y .\Android_v7a_release\libduktape.so ..\..\prebuilt\release\Plugins\Android\libs\armeabi-v7a\
rd /s /q %BUILD_PATH%\Android_v8a_debug 2>nul
echo building v8a debug
mkdir %BUILD_PATH%\Android_v8a_debug
cd %BUILD_PATH%\Android_v8a_debug
cmake -DCMAKE_BUILD_TYPE=RELEASE -DDUKTAPE_SRC_CAT=debug -DANDROID_ABI=arm64-v8a -DCMAKE_TOOLCHAIN_FILE=%ANDROID_NDK%/build/cmake/android.toolchain.cmake -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-clang -DANDROID_NATIVE_API_LEVEL=android-9 -G "NMake Makefiles" ../../..
cd %BUILD_PATH%
cmake --build Android_v8a_debug --config Release
mkdir ..\..\prebuilt\debug\Plugins\Android\libs\arm64-v8a\ 2>nul
xcopy /Y .\Android_v8a_debug\libduktape.so ..\..\prebuilt\debug\Plugins\Android\libs\arm64-v8a\
rd /s /q %BUILD_PATH%\Android_v8a_release 2>nul
echo building v8a release
mkdir %BUILD_PATH%\Android_v8a_release
cd %BUILD_PATH%\Android_v8a_release
cmake -DCMAKE_BUILD_TYPE=RELEASE -DDUKTAPE_SRC_CAT=release -DANDROID_ABI=arm64-v8a -DCMAKE_TOOLCHAIN_FILE=%ANDROID_NDK%/build/cmake/android.toolchain.cmake -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-clang -DANDROID_NATIVE_API_LEVEL=android-9 -G "NMake Makefiles" ../../..
cd %BUILD_PATH%
cmake --build Android_v8a_release --config Release
mkdir ..\..\prebuilt\release\Plugins\Android\libs\arm64-v8a\ 2>nul
xcopy /Y .\Android_v8a_release\libduktape.so ..\..\prebuilt\release\Plugins\Android\libs\arm64-v8a\
rd /s /q %BUILD_PATH%\Android_x86_debug 2>nul
echo building x86 debug
mkdir %BUILD_PATH%\Android_x86_debug
cd %BUILD_PATH%\Android_x86_debug
cmake -DCMAKE_BUILD_TYPE=RELEASE -DDUKTAPE_SRC_CAT=debug -DANDROID_ABI=x86 -DCMAKE_TOOLCHAIN_FILE=%ANDROID_NDK%/build/cmake/android.toolchain.cmake -DANDROID_TOOLCHAIN_NAME=x86-clang -DANDROID_NATIVE_API_LEVEL=android-9 -G "NMake Makefiles" ../../..
cd %BUILD_PATH%
cmake --build Android_x86_debug --config Release
mkdir ..\..\prebuilt\debug\Plugins\Android\libs\x86\ 2>nul
xcopy /Y .\Android_x86_debug\libduktape.so ..\..\prebuilt\debug\Plugins\Android\libs\x86\
rd /s /q %BUILD_PATH%\Android_x86_release 2>nul
echo building x86 release
mkdir %BUILD_PATH%\Android_x86_release
cd %BUILD_PATH%\Android_x86_release
cmake -DCMAKE_BUILD_TYPE=RELEASE -DDUKTAPE_SRC_CAT=release -DANDROID_ABI=x86 -DCMAKE_TOOLCHAIN_FILE=%ANDROID_NDK%/build/cmake/android.toolchain.cmake -DANDROID_TOOLCHAIN_NAME=x86-clang -DANDROID_NATIVE_API_LEVEL=android-9 -G "NMake Makefiles" ../../..
cd %BUILD_PATH%
cmake --build Android_x86_release --config Release
mkdir ..\..\prebuilt\release\Plugins\Android\libs\x86\ 2>nul
xcopy /Y .\Android_x86_release\libduktape.so ..\..\prebuilt\release\Plugins\Android\libs\x86\
cd %BASE_PATH%