-
Notifications
You must be signed in to change notification settings - Fork 523
/
build_test_versions
executable file
·53 lines (41 loc) · 1.69 KB
/
build_test_versions
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
#!/bin/bash
set -e
touch build/test_all/"Build Date $(date '+%Y-%m-%d')"
# Linux
export PATH=/opt/Qt/5.15-static/bin:$PATH
rm -rf build/lin/*
qmake -config release "CONFIG += release_lin build_original"
make clean
make -j8
rm -rf build/lin/obj
mv build/lin/vesc_tool* build/test_all/vesc_tool_test_linux
# Windows
export PATH=/opt/mxe2/usr/bin/:$PATH
rm -rf build/win/*
/opt/mxe2/usr/bin/i686-w64-mingw32.static-qmake-qt5 -config release "CONFIG += release_win build_original vt_test_version"
make clean
make -j8
rm -rf build/win/obj
mv build/win/vesc_tool*.exe build/test_all/vesc_tool_test_windows.exe
# Android
export ANDROID_HOME=~/Android/Latest/Sdk
export ANDROID_NDK_HOST=linux-x86_64
export ANDROID_NDK_PLATFORM=android-23
export ANDROID_NDK_TOOLCHAIN_VERSION=4.9
export ANDROID_NDK_ROOT=$ANDROID_HOME/ndk/23.1.7779620
export ANDROID_SDK_ROOT=$ANDROID_HOME
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
export PATH=$PATH:$ANDROID_HOME/Sdk/tools:/usr/bin:$JAVA_HOME/bin
rm -rf build/android/*
export PATH=/opt/Qt5/5.15.2/android/bin/:$PATH
# Mobile
#qmake -config release "CONFIG += release_android build_mobile vt_test_version" ANDROID_ABIS="armeabi-v7a" -spec android-clang
qmake -config release "CONFIG += release_android build_mobile vt_test_version" ANDROID_ABIS="arm64-v8a" -spec android-clang
make clean
make -j8
make install INSTALL_ROOT=build/android/build
androiddeployqt --gradle --no-gdbserver --output build/android/build --input android-vesc_tool-deployment-settings.json --android-platform android-33
mv build/android/build/build/outputs/apk/debug/build-debug.apk build/test_all/vesc_tool_test_android.apk
rm -rf build/android/build
rm -rf build/android/obj
rm -f build/android/libvesc_tool*