mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 01:20:42 +00:00
Move android support files into /plugins/android/ in the build
* We also don't copy out of the android SDK anymore as that has a licensing impact. Instead we ship our own builds from a local AOSP checkout, the same way as other plugins.
This commit is contained in:
@@ -282,10 +282,10 @@ bool InstallRenderDocServer(const std::string &deviceID)
|
||||
paths.push_back(customPath);
|
||||
#endif
|
||||
|
||||
paths.push_back(exeDir + "/android/apk/"); // Windows install
|
||||
paths.push_back(exeDir + "/../share/renderdoc/android/apk/"); // Linux install
|
||||
paths.push_back(exeDir + "/../../build-android/bin/"); // Local build
|
||||
paths.push_back(exeDir + "/../../../../../build-android/bin/"); // macOS build
|
||||
paths.push_back(exeDir + "/plugins/android/"); // Windows install
|
||||
paths.push_back(exeDir + "/../share/renderdoc/plugins/android/"); // Linux install
|
||||
paths.push_back(exeDir + "/../../build-android/bin/"); // Local build
|
||||
paths.push_back(exeDir + "/../../../../../build-android/bin/"); // macOS build
|
||||
|
||||
// use the first ABI for searching
|
||||
std::string apk = GetRenderDocPackageForABI(abis[0]);
|
||||
|
||||
@@ -193,7 +193,7 @@ std::string getToolPath(ToolDir subdir, const std::string &toolname, bool checkE
|
||||
FileIO::GetExecutableFilename(exepath);
|
||||
std::string exedir = dirname(FileIO::GetFullPathname(exepath));
|
||||
|
||||
toolpath = exedir + "/android/" + toolname;
|
||||
toolpath = exedir + "/plugins/android/" + toolname;
|
||||
if(toolExists(toolpath))
|
||||
return toolpath;
|
||||
}
|
||||
|
||||
+14
-26
@@ -52,38 +52,26 @@ find dist/Release{32,64}/ -iname '*.ipdb' -exec rm '{}' \;
|
||||
find dist/Release{32,64}/ -iname '*.iobj' -exec rm '{}' \;
|
||||
|
||||
# Copy in any android APKs that were built
|
||||
mkdir -p dist/Release64/android/apk
|
||||
find build-android-* -iname 'org.renderdoc.renderdoccmd.*.apk' -exec cp '{}' dist/Release64/android/apk ';'
|
||||
mkdir -p dist/Release64/plugins/android/
|
||||
find build-android-* -iname 'org.renderdoc.renderdoccmd.*.apk' -exec cp '{}' dist/Release64/plugins/android ';'
|
||||
|
||||
# try to copy adb.exe in as well, with its dll dependencies
|
||||
if [ -f $ANDROID_SDK/platform-tools/adb.exe ] && [ -d dist/Release64/android ]; then
|
||||
cp $ANDROID_SDK/platform-tools/{adb.exe,AdbWinApi.dll,AdbWinUsbApi.dll} dist/Release64/android/
|
||||
fi
|
||||
|
||||
# Copy tools needed for patching apks
|
||||
if [ -d "$ANDROID_SDK/build-tools" ] && [ -d dist/Release64/android ]; then
|
||||
BUILD_DIR=$(ls "$ANDROID_SDK/build-tools" | grep -E '^[0-9.]*$' | sort -n | tail -n 1)
|
||||
|
||||
if [ -f "$ANDROID_SDK/build-tools/$BUILD_DIR/aapt.exe" ]; then
|
||||
cp "$ANDROID_SDK/build-tools/$BUILD_DIR/aapt.exe" dist/Release64/android/
|
||||
fi
|
||||
|
||||
if [ -f "$ANDROID_SDK/build-tools/$BUILD_DIR/zipalign.exe" ]; then
|
||||
cp "$ANDROID_SDK/build-tools/$BUILD_DIR/zipalign.exe" dist/Release64/android/
|
||||
fi
|
||||
|
||||
if [ -f "$ANDROID_SDK/build-tools/$BUILD_DIR/lib/apksigner.jar" ]; then
|
||||
cp "$ANDROID_SDK/build-tools/$BUILD_DIR/lib/apksigner.jar" dist/Release64/android/
|
||||
fi
|
||||
# Copy in android adb and patching requirements
|
||||
if [ -f plugins-android/adb.exe ]; then
|
||||
cp -R plugins-android/* dist/Release64/plugins/android/;
|
||||
else
|
||||
echo "ERROR: Couldn't find android dependency (adb.exe and friends)";
|
||||
echo " These files must be in plugins-android/ in the root and";
|
||||
echo " MUST be built locally from an AOSP checkout, not from a";
|
||||
echo " distributed android SDK due to licensing concerns.";
|
||||
fi
|
||||
|
||||
# Generate a debug key for signing purposes
|
||||
if [ -f "$JAVA_HOME/bin/keytool.exe" ] && [ -d dist/Release64/android ]; then
|
||||
"$JAVA_HOME/bin/keytool.exe" -genkey -keystore dist/Release64/android/renderdoc.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 -dname "CN=, OU=, O=, L=, S=, C="
|
||||
if [ -f "$JAVA_HOME/bin/keytool.exe" ] && [ -d dist/Release64/plugins/android ]; then
|
||||
"$JAVA_HOME/bin/keytool.exe" -genkey -keystore dist/Release64/plugins/android/renderdoc.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 -dname "CN=, OU=, O=, L=, S=, C="
|
||||
fi
|
||||
|
||||
if [ -d dist/Release64/android ]; then
|
||||
cp -R dist/Release64/android dist/Release32/
|
||||
if [ -d dist/Release64/plugins/android ]; then
|
||||
cp -R dist/Release64/plugins/android dist/Release32/plugins/
|
||||
fi
|
||||
|
||||
# Make a copy of the main distribution folder that has PDBs
|
||||
|
||||
Reference in New Issue
Block a user