Always use git commit hash to identify android build

* This prevents reinstall issues if the UI is looking for a plain major/
  minor versionName and the apk was built with a commit hash.
This commit is contained in:
baldurk
2018-04-04 16:52:44 +01:00
parent c5612dc7dc
commit 35865efef2
2 changed files with 2 additions and 6 deletions
+1 -1
View File
@@ -435,7 +435,7 @@ bool CheckAndroidServerVersion(const string &deviceID)
// Compare the server's versionCode and versionName with the host's for compatibility
std::string hostVersionCode =
string(STRINGIZE(RENDERDOC_VERSION_MAJOR)) + string(STRINGIZE(RENDERDOC_VERSION_MINOR));
std::string hostVersionName = RENDERDOC_STABLE_BUILD ? MAJOR_MINOR_VERSION_STRING : GitVersionHash;
std::string hostVersionName = GitVersionHash;
// False positives will hurt us, so check for explicit matches
if((hostVersionCode == versionCode) && (hostVersionName == versionName))
+1 -5
View File
@@ -95,11 +95,7 @@ if(ANDROID)
# APK_VERSION_CODE corresponds to android:versionCode, an internal integer value that can be queried. Higher numbers indicate more recent versions.
# APK_VERSION_NAME corresponds to android:versionName, a string value that is displayed to the user.
set(APK_VERSION_CODE "${RENDERDOC_VERSION_MAJOR}${RENDERDOC_VERSION_MINOR}")
if(BUILD_VERSION_STABLE)
set(APK_VERSION_NAME "${RENDERDOC_VERSION}")
else()
set(APK_VERSION_NAME ${GIT_COMMIT_HASH})
endif()
set(APK_VERSION_NAME ${GIT_COMMIT_HASH})
message(STATUS "Building APK versionCode ${APK_VERSION_CODE}, versionName ${APK_VERSION_NAME}")
# Set the package name based on the ABI