Skip to content

Commit 31fdd10

Browse files
authored
Merge branch 'master' into codex/ios-background-central-homeform
2 parents 571fa7b + d37479d commit 31fdd10

196 files changed

Lines changed: 16056 additions & 859 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/main.yml

Lines changed: 45 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,20 @@ jobs:
599599
dir: '${{ github.workspace }}/output/android/'
600600
cache: 'false'
601601

602+
- name: Install custom 16K-page-size Qt (overlay onto stock Qt install)
603+
run: |
604+
QT_DIR="${{ github.workspace }}/output/android/Qt/5.15.0/android"
605+
curl -fsSL -o /tmp/qt5.15.0-android-page16.zip https://github.com/cagnulein/qt-5.15.0-android-page16k/releases/download/1.0.0/qt5.15.0-android-page16.zip
606+
unzip -q /tmp/qt5.15.0-android-page16.zip -d /tmp/qt-page16k
607+
# Overlay the 16K-page-aligned target libs/plugins/qml/mkspecs/jar/include onto the
608+
# stock Qt install; keep the stock Linux host tools (bin/) since the custom Qt's
609+
# host tools were built on macOS (Mach-O, not usable on this Linux runner).
610+
rsync -a --exclude='bin/' "/tmp/qt-page16k/qt5.15.0-android-page16/usr/local/Qt-5.15.0/" "$QT_DIR/"
611+
# qdevice.pri comes from the overlay carrying the macOS origin's NDK host value;
612+
# fix it back to linux so qmake resolves the NDK toolchain path correctly.
613+
sed -i 's/darwin-x86_64/linux-x86_64/' "$QT_DIR/mkspecs/qdevice.pri"
614+
rm -rf /tmp/qt5.15.0-android-page16.zip /tmp/qt-page16k
615+
602616
- name: Install Java
603617
uses: actions/setup-java@v4
604618
with:
@@ -615,13 +629,13 @@ jobs:
615629
id: cache-ndk
616630
uses: actions/cache@v4
617631
with:
618-
path: /usr/local/lib/android/sdk/ndk/21.4.7075529
619-
key: android-ndk-21.4.7075529-${{ runner.os }}
632+
path: /usr/local/lib/android/sdk/ndk/21.1.6352462
633+
key: android-ndk-21.1.6352462-${{ runner.os }}
620634

621635
- name: Install Android SDK packages
622636
run: |
623637
SDKMANAGER="/usr/local/lib/android/sdk/cmdline-tools/latest/bin/sdkmanager"
624-
echo "y" | $SDKMANAGER "ndk;21.4.7075529" "platforms;android-35" "build-tools;35.0.0"
638+
echo "y" | $SDKMANAGER "ndk;21.1.6352462" "platforms;android-35" "build-tools;35.0.0"
625639
626640
- name: Setup ccache
627641
run: |
@@ -638,13 +652,13 @@ jobs:
638652
uses: actions/cache@v4
639653
with:
640654
path: .ccache
641-
key: ccache-android-ndk21-${{ hashFiles('src/**/*.cpp', 'src/**/*.h', 'src/*.pro') }}
655+
key: ccache-android-ndk21_1-${{ hashFiles('src/**/*.cpp', 'src/**/*.h', 'src/*.pro') }}
642656
restore-keys: |
643-
ccache-android-ndk21-
657+
ccache-android-ndk21_1-
644658
645659
- name: Setup NDK environment with ccache
646660
run: |
647-
NDK_PATH=/usr/local/lib/android/sdk/ndk/21.4.7075529
661+
NDK_PATH=/usr/local/lib/android/sdk/ndk/21.1.6352462
648662
NDK_BIN=$NDK_PATH/toolchains/llvm/prebuilt/linux-x86_64/bin
649663
ln -sfn $NDK_PATH /usr/local/lib/android/sdk/ndk-bundle
650664
rm -rf /usr/local/lib/android/sdk/ndk/25.1.8937393
@@ -711,8 +725,12 @@ jobs:
711725
- name: Build QZ for Android (4 ABIs)
712726
run: |
713727
lrelease src/qdomyos-zwift.pri
714-
qmake -spec android-clang 'ANDROID_ABIS=armeabi-v7a arm64-v8a x86 x86_64' 'ANDROID_NDK_ROOT=/usr/local/lib/android/sdk/ndk/21.4.7075529' && make -j4 && make INSTALL_ROOT=${{ github.workspace }}/output/android/ install
715-
sed -i '1s|{|{\n "android-extra-libs": "${{ github.workspace }}/android_openssl/no-asm/latest/arm/libcrypto_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/arm/libssl_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/arm64/libcrypto_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/arm64/libssl_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/x86/libcrypto_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/x86/libssl_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/x86_64/libcrypto_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/x86_64/libssl_1_1.so",|' src/android-qdomyos-zwift-deployment-settings.json
728+
# CONFIG+=debug matches the real reference build validated against the Mac-built
729+
# APK: it keeps .so unstripped (matching the reference almost byte-for-byte) and,
730+
# with this custom Qt, naturally leaves android-extra-libs unset - the bundled
731+
# android_openssl libs are not 16K-page-aligned, so we must NOT inject them (see
732+
# below); Qt's own QtNetwork already has openssl linked in.
733+
qmake -spec android-clang 'ANDROID_ABIS=armeabi-v7a arm64-v8a x86 x86_64' 'ANDROID_NDK_ROOT=/usr/local/lib/android/sdk/ndk/21.1.6352462' 'CONFIG+=debug' && make -j4 && make INSTALL_ROOT=${{ github.workspace }}/output/android/ install
716734
cat src/android-qdomyos-zwift-deployment-settings.json
717735
718736
- name: Cache Gradle
@@ -2304,10 +2322,20 @@ jobs:
23042322
sed -i 's/property string ${{ matrix.variant.setting_key }}: ""/property string ${{ matrix.variant.setting_key }}: "${{ matrix.variant.setting_value }}"/' settings.qml
23052323
cd ..
23062324
2325+
# Keep FitPro APKs usable on older 32-bit iFIT/ProForm consoles.
2326+
# qmake reads defaults.pri while generating the Android deployment JSON,
2327+
# so force all ABIs there before the build starts.
2328+
sed -i 's/^ANDROID_ABIS = .*/ANDROID_ABIS = armeabi-v7a arm64-v8a x86 x86_64/' defaults.pri
2329+
23072330
ln -sfn $ANDROID_SDK_ROOT/ndk/21.4.7075529 $ANDROID_NDK
23082331
rm -rf /usr/local/lib/android/sdk/ndk/25.1.8937393
23092332
lrelease src/qdomyos-zwift.pri
23102333
2334+
# Keep FitPro APKs usable on older 32-bit iFIT/ProForm consoles.
2335+
# qmake reads defaults.pri while generating the Android deployment JSON,
2336+
# so force all ABIs there before the build starts.
2337+
sed -i 's/^ANDROID_ABIS = .*/ANDROID_ABIS = armeabi-v7a arm64-v8a x86 x86_64/' defaults.pri
2338+
23112339
# QTHTTPSERVER must use the same NDK
23122340
cd src/qthttpserver
23132341
qmake
@@ -2349,6 +2377,15 @@ jobs:
23492377
fi
23502378
"$GRADLE_DIST_DIR/bin/gradle" -g "$GRADLE_USER_HOME" --no-daemon -p ${{ github.workspace }}/output/android assembleDebug bundleDebug
23512379
mv ${{ github.workspace }}/output/android/build/outputs/apk/debug/android-debug.apk ${{ github.workspace }}/output/android/build/outputs/apk/debug/android-debug-fitpro-${{ matrix.variant.name }}.apk
2380+
APK="${{ github.workspace }}/output/android/build/outputs/apk/debug/android-debug-fitpro-${{ matrix.variant.name }}.apk"
2381+
for ABI in armeabi-v7a arm64-v8a x86 x86_64; do
2382+
for LIB in "libqdomyos-zwift_$ABI.so" "libQt5Core_$ABI.so"; do
2383+
if ! unzip -l "$APK" "lib/$ABI/$LIB" | grep -q "$LIB"; then
2384+
echo "::error::Missing lib/$ABI/$LIB in $APK - ABI packaging is broken"
2385+
exit 1
2386+
fi
2387+
done
2388+
done
23522389
23532390
- name: Archive fitpro binary
23542391
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)