Skip to content

Commit

Permalink
Android APK support
Browse files Browse the repository at this point in the history
  • Loading branch information
DonLakeFlyer committed Dec 1, 2021
1 parent e58c307 commit 70d98ca
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/android_32_release.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# The 32 and 64 bit version of these actions should be kept in sync
name: Android 32-bit Release

on:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/android_64_release.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# The 32 and 64 bit version of these actions should be kept in sync
name: Android 64-bit Release

on:
Expand Down
12 changes: 7 additions & 5 deletions QGCCommon.pri
Original file line number Diff line number Diff line change
Expand Up @@ -229,22 +229,24 @@ AndroidBuild {
DEV_VERSION = $$join(DEV_VERSION, "", "0")
}

# Bitness is 66/34 instead of 64/32 in because of a required version number bump screw-up ages ago
# Bitness for android version number is 66/34 instead of 64/32 in because of a required version number bump screw-up ages ago
equals(ANDROID_TARGET_ARCH, arm64-v8a) {
ANDROID_BITNESS = 66
ANDROID_TRUE_BITNESS = 64
ANDROID_VERSION_BITNESS = 66
} else {
ANDROID_BITNESS = 34
ANDROID_TRUE_BITNESS = 32
ANDROID_VERSION_BITNESS = 34
}

# Version code format: BBMIPPDDD (B=Bitness, I=Minor)
ANDROID_VERSION_CODE = "BBMIPPDDD"
ANDROID_VERSION_CODE = $$replace(ANDROID_VERSION_CODE, "BB", $$ANDROID_BITNESS)
ANDROID_VERSION_CODE = $$replace(ANDROID_VERSION_CODE, "BB", $$ANDROID_VERSION_BITNESS)
ANDROID_VERSION_CODE = $$replace(ANDROID_VERSION_CODE, "M", $$MAJOR_VERSION)
ANDROID_VERSION_CODE = $$replace(ANDROID_VERSION_CODE, "I", $$MINOR_VERSION)
ANDROID_VERSION_CODE = $$replace(ANDROID_VERSION_CODE, "PP", $$PATCH_VERSION)
ANDROID_VERSION_CODE = $$replace(ANDROID_VERSION_CODE, "DDD", $$DEV_VERSION)

message(Android version info: $${ANDROID_VERSION_CODE} bitness:$${ANDROID_BITNESS} major:$${MAJOR_VERSION} minor:$${MINOR_VERSION} patch:$${PATCH_VERSION} dev:$${DEV_VERSION})
message(Android version info: $${ANDROID_VERSION_CODE} bitness:$${ANDROID_VERSION_BITNESS} major:$${MAJOR_VERSION} minor:$${MINOR_VERSION} patch:$${PATCH_VERSION} dev:$${DEV_VERSION})

ANDROID_VERSION_NAME = GIT_VERSION
}
Expand Down
4 changes: 2 additions & 2 deletions QGCPostLinkInstaller.pri
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ installer {
message(Skipping androiddeployqt since keystore password is not available)
} else {
QMAKE_POST_LINK += && mkdir -p package
QMAKE_POST_LINK += && make apk_install_target INSTALL_ROOT=android-build/
QMAKE_POST_LINK += && make apk_install_target INSTALL_ROOT=android-build
QMAKE_POST_LINK += && androiddeployqt --verbose --input android-QGroundControl-deployment-settings.json --output android-build --release --sign $${SOURCE_DIR}/android/android_release.keystore QGCAndroidKeyStore --storepass $$(ANDROID_KEYSTORE_PASSWORD)
QMAKE_POST_LINK += && cp android-build/build/outputs/apk/release/android-build-release-signed.apk package/QGroundControl.apk
QMAKE_POST_LINK += && cp android-build/build/outputs/apk/release/android-build-release-signed.apk package/QGroundControl$${ANDROID_TRUE_BITNESS}.apk
}
}
}

0 comments on commit 70d98ca

Please sign in to comment.