-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android: Set proper versionCode and versionName #2398
Changes from all commits
cc533bd
1afc082
b49dec4
079a52a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -203,6 +203,11 @@ win32 { | |
LIBS += -framework AVFoundation \ | ||
-framework AudioToolbox | ||
} else:android { | ||
ANDROID_ABIS = armeabi-v7a arm64-v8a x86 x86_64 | ||
ANDROID_VERSION_NAME = $$VERSION | ||
ANDROID_VERSION_CODE = $$system(git log --oneline | wc -l) | ||
message("Setting ANDROID_VERSION_NAME=$${ANDROID_VERSION_NAME} ANDROID_VERSION_CODE=$${ANDROID_VERSION_CODE}") | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I couldn't see in the build log where these get used. If they are used silently, then perhaps they could be echoed too? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, they're qmake-internal variables. I've added a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just tried installing jamulus_3.8.2dev-5f108fd_android.apk over 3.8.0 ... result is as before, i.e. version number is reported as being different (see screenshot attached), but install ends with message "App not installed". I suspect this is "as expected" at the moment! BTW, if you want me to check any functionality on any new build let me know - I have several Android devices at my disposal, and can force a new build to install by uninstalling any old one, of course. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, first time I've posted an image - didn't realise it'd come out that big on screen! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (I've edited your comment to use
Thanks for the screenshot. Yes, seeing the real version number here is definitely an improvement. And yes, it's expected that this PR does not solve all update problems on Android. While I had hoped for this to be the case, the PR doesn't claim to do it :)
Great, thanks! I'll likely ask again as part of #2404. |
||
# we want to compile with C++14 | ||
CONFIG += c++14 | ||
|
||
|
@@ -221,7 +226,7 @@ win32 { | |
|
||
LIBS += -lOpenSLES | ||
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android | ||
OTHER_FILES += android/AndroidManifest.xml | ||
DISTFILES += android/AndroidManifest.xml | ||
|
||
# if compiling for android you need to use Oboe library which is included as a git submodule | ||
# make sure you git pull with submodules to pull the latest Oboe library | ||
|
@@ -1166,5 +1171,3 @@ contains(CONFIG, "disable_version_check") { | |
message(The version check is disabled.) | ||
DEFINES += DISABLE_VERSION_CHECK | ||
} | ||
|
||
ANDROID_ABIS = armeabi-v7a arm64-v8a x86 x86_64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the
checkout_fetch_depth: '0'
further up evaluate here as false or true?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't found explicit documentation, but the CI confirms that it does what it should: Android uses a full checkout while the other targets (e.g. Linux) only fetch the most recent commit:
Therefore, I assume that
'0'
as a non-empty string evaluates totrue
(probably like Python).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And unlike Perl and PHP!