mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Fix detecting renderdoccmd as a replay application on android
* Force loading librenderdoccmd.so in the Loader * Build renderdoc as libVkLayer_GLES_RenderDoc.so, link renderdoccmd against it, otherwise we will get UnsatisfiedLinkError when running
This commit is contained in:
committed by
Baldur Karlsson
parent
06cfd5383f
commit
ff084037a5
@@ -319,6 +319,8 @@ endif()
|
||||
|
||||
if(ANDROID)
|
||||
set_target_properties(renderdoc PROPERTIES LINK_FLAGS "-Wl,--build-id")
|
||||
# rename output library
|
||||
set_target_properties(renderdoc PROPERTIES OUTPUT_NAME "VkLayer_GLES_RenderDoc")
|
||||
endif()
|
||||
|
||||
install (TARGETS renderdoc DESTINATION lib${LIB_SUFFIX})
|
||||
|
||||
@@ -99,7 +99,7 @@ if(ANDROID)
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory libs/lib/${ANDROID_ABI}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory obj
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory bin
|
||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:renderdoc> libs/lib/${ANDROID_ABI}/libVkLayer_GLES_RenderDoc.so
|
||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:renderdoc> libs/lib/${ANDROID_ABI}/$<TARGET_FILE_NAME:renderdoc>
|
||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:renderdoccmd> libs/lib/${ANDROID_ABI}/$<TARGET_FILE_NAME:renderdoccmd>
|
||||
COMMAND ${BUILD_TOOLS}/aapt package -f -m -S res -J src -M AndroidManifest.xml -I ${ANDROID_JAR}
|
||||
COMMAND ${JAVA_BIN}/javac -d ./obj -source 1.7 -target 1.7 -bootclasspath ${RT_JAR} -classpath "${CLASS_PATH}" -sourcepath src src/org/renderdoc/renderdoccmd/*.java
|
||||
|
||||
@@ -5,7 +5,7 @@ public class Loader extends android.app.NativeActivity
|
||||
{
|
||||
/* load our native library */
|
||||
static {
|
||||
System.loadLibrary("VkLayer_GLES_RenderDoc");
|
||||
System.loadLibrary("renderdoccmd"); // this will load VkLayer_GLES_RenderDoc as well
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-2
@@ -59,7 +59,7 @@ if [ -f bin-android32/RenderDocCmd.apk ]; then
|
||||
mkdir -p dist/Release64/android/apk dist/Release64/android/lib/armeabi-v7a
|
||||
|
||||
cp bin-android32/RenderDocCmd.apk dist/Release64/android/apk
|
||||
cp bin-android32/librenderdoc.so dist/Release64/android/lib/armeabi-v7a/libVkLayer_GLES_RenderDoc.so
|
||||
cp bin-android32/libVkLayer_GLES_RenderDoc.so dist/Release64/android/lib/armeabi-v7a/libVkLayer_GLES_RenderDoc.so
|
||||
fi
|
||||
|
||||
if [ -f bin-android64/RenderDocCmd.apk ]; then
|
||||
@@ -69,7 +69,7 @@ if [ -f bin-android64/RenderDocCmd.apk ]; then
|
||||
mkdir -p dist/Release64/android/lib/arm64-v8a
|
||||
|
||||
#cp bin-android64/RenderDocCmd.apk dist/Release64/android/apk/64
|
||||
cp bin-android64/librenderdoc.so dist/Release64/android/lib/arm64-v8a/libVkLayer_GLES_RenderDoc.so
|
||||
cp bin-android64/libVkLayer_GLES_RenderDoc.so dist/Release64/android/lib/arm64-v8a/libVkLayer_GLES_RenderDoc.so
|
||||
fi
|
||||
|
||||
# try to copy adb.exe in as well, with its dll dependencies
|
||||
|
||||
Reference in New Issue
Block a user