chore: update the file

This commit is contained in:
x-tools-author 2025-04-25 19:08:24 +08:00
parent 0bcdfbbf55
commit c79a34538b
2 changed files with 8 additions and 10 deletions

View File

@ -13,12 +13,7 @@ env:
jobs:
build:
name: Build for Android
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04]
version: [6.8.3]
runs-on: ubuntu-24.04
env:
DOCKER_IMAGE: ghcr.io/x-tools-author/x-tools-ubuntu-20.04:x86_64
QT_ANDROID_KEYSTORE_PATH: res/android/android_release.keystore

View File

@ -7,7 +7,9 @@
# $3: ANDROID_KEYSTORE_STORE_PASS
# $4: ANDROID_KEYSTORE_KEY_PASS
tree -L 3 /opt/qt
#---------------------------------------------------------------------------------------------------
# CMake build for Android ARMv7
tree -L 4 /opt/qt
chmod +x /opt/qt/6.8.3/android_armv7/bin/qt-cmake
/opt/qt/6.8.3/android_armv7/bin/qt-cmake \
-DCMAKE_BUILD_TYPE:STRING=Release -G "Unix Makefiles" \
@ -17,26 +19,27 @@ chmod +x /opt/qt/6.8.3/android_armv7/bin/qt-cmake
-DQT_HOST_PATH:PATH="/opt/qt/6.8.3/gcc_64" \
-DCMAKE_CXX_COMPILER:FILEPATH="$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++" \
-DCMAKE_BUILD_TYPE:STRING=Release
if [ $? -ne 0 ]; then
echo "CMake configuration failed"
exit 1
fi
#---------------------------------------------------------------------------------------------------
# Build the project
cmake --build build/armeabi_v7a --target all --config Release
if [ $? -ne 0 ]; then
echo "CMake build failed"
exit 1
fi
#---------------------------------------------------------------------------------------------------
# Make the APK
chomod +x /opt/qt/6.8.3/gcc_64/bin/androiddeployqt
/opt/qt/6.8.3/gcc_64/bin/androiddeployqt \
--input build/armeabi_v7a/android-xTools-deployment-settings.json \
--output build/armeabi_v7a/android-build \
--android-platform android-35 \
--sign $1 $2 --storepass $3 --keypass $4
if [ $? -ne 0 ]; then
echo "Android deployment failed"
exit 1