From 35865efef2b14efcaff20b884cd11cbfd1efc49a Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 4 Apr 2018 16:52:44 +0100 Subject: [PATCH] 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. --- renderdoc/android/android.cpp | 2 +- renderdoccmd/CMakeLists.txt | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/renderdoc/android/android.cpp b/renderdoc/android/android.cpp index db4541d1a..2a9551a22 100644 --- a/renderdoc/android/android.cpp +++ b/renderdoc/android/android.cpp @@ -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)) diff --git a/renderdoccmd/CMakeLists.txt b/renderdoccmd/CMakeLists.txt index 656ce6cab..3643c2f9e 100644 --- a/renderdoccmd/CMakeLists.txt +++ b/renderdoccmd/CMakeLists.txt @@ -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