Add version checking to Android workflow

* Tag the RenderDoc layer with a version string that
  matches the host, including git hash.
* In developer builds, check the version when scanning the
  application for RenderDoc support.
* Pass the warning back to the UI to offer ways to fix.
* Update APK patching to remove existing layer.
This commit is contained in:
Cody Northrop
2017-09-20 10:04:20 -06:00
committed by Baldur Karlsson
parent 03a0a06f60
commit 82f4e82155
3 changed files with 111 additions and 13 deletions
+11 -1
View File
@@ -430,8 +430,9 @@ void CaptureDialog::CheckAndroidSetup(QString &filename)
const bool missingLibrary = bool(m_AndroidFlags & AndroidFlags::MissingLibrary);
const bool missingPermissions = bool(m_AndroidFlags & AndroidFlags::MissingPermissions);
const bool wrongLayerVersion = bool(m_AndroidFlags & AndroidFlags::WrongLayerVersion);
if(missingLibrary || missingPermissions)
if(missingLibrary || missingPermissions || wrongLayerVersion)
{
// Check failed - set the warning visible
GUIInvoke::call([this]() {
@@ -463,6 +464,7 @@ void CaptureDialog::androidWarn_mouseClick()
bool missingPermissions = bool(m_AndroidFlags & AndroidFlags::MissingPermissions);
bool missingLibrary = bool(m_AndroidFlags & AndroidFlags::MissingLibrary);
bool wrongLayerVersion = bool(m_AndroidFlags & AndroidFlags::WrongLayerVersion);
bool rootAccess = bool(m_AndroidFlags & AndroidFlags::RootAccess);
if(missingPermissions)
@@ -481,6 +483,14 @@ void CaptureDialog::androidWarn_mouseClick()
"installed application.<br><br>");
}
if(wrongLayerVersion)
{
msg +=
tr("<b>Wrong layer version</b><br>"
"The RenderDoc library was found, but its version "
"does not match that of the host.<br><br>");
}
if(missingPermissions)
{
// Don't prompt for patching if permissions are wrong - we can't fix that