From 4c338a99509fdee8d502d689c90549437c70987a Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 27 Jan 2015 17:08:57 -0800 Subject: [PATCH] handle possibility of HockeyApp inclusion --- .gitignore | 3 ++- cmake/android/AndroidManifest.xml.in | 7 +++---- cmake/android/QtCreateAPK.cmake | 12 ++++++++---- gvr-interface/CMakeLists.txt | 9 +++++++++ gvr-interface/res/values/hockeyapp.xml.in | 5 +++++ 5 files changed, 27 insertions(+), 9 deletions(-) create mode 100644 gvr-interface/res/values/hockeyapp.xml.in diff --git a/.gitignore b/.gitignore index 55750d4081..cab7d60928 100644 --- a/.gitignore +++ b/.gitignore @@ -39,4 +39,5 @@ interface/resources/visage/* # Ignore interfaceCache for Linux users interface/interfaceCache/ -gvr-interface/assets/oculussig* \ No newline at end of file +gvr-interface/assets/oculussig* +gvr-interface/libs/* \ No newline at end of file diff --git a/cmake/android/AndroidManifest.xml.in b/cmake/android/AndroidManifest.xml.in index 39c97a6608..111c0c9d3d 100755 --- a/cmake/android/AndroidManifest.xml.in +++ b/cmake/android/AndroidManifest.xml.in @@ -41,10 +41,7 @@ - - + + + ${HOCKEY_APP_ACTIVITY} \ No newline at end of file diff --git a/cmake/android/QtCreateAPK.cmake b/cmake/android/QtCreateAPK.cmake index 8d15b3849e..59f11d3f29 100644 --- a/cmake/android/QtCreateAPK.cmake +++ b/cmake/android/QtCreateAPK.cmake @@ -113,11 +113,15 @@ macro(qt_create_apk) COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/src/java" "${ANDROID_APK_BUILD_DIR}/src" ) + # copy the libs folder from src to the apk build dir + add_custom_target( + ${TARGET_NAME}-copy-libs + COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/libs" "${ANDROID_APK_BUILD_DIR}/libs" + ) + # use androiddeployqt to create the apk add_custom_target(${TARGET_NAME}-apk COMMAND ${ANDROID_DEPLOY_QT} --input "${TARGET_NAME}-deployment.json" --output "${ANDROID_APK_OUTPUT_DIR}" --android-platform android-${ANDROID_API_LEVEL} --install --verbose --deployment bundled "\\$(ARGS)" - DEPENDS ${TARGET_NAME} ${TARGET_NAME}-copy-res ${TARGET_NAME}-copy-assets ${TARGET_NAME}-copy-java - ) - - + DEPENDS ${TARGET_NAME} ${TARGET_NAME}-copy-res ${TARGET_NAME}-copy-assets ${TARGET_NAME}-copy-java ${TARGET_NAME}-copy-libs + ) endmacro() \ No newline at end of file diff --git a/gvr-interface/CMakeLists.txt b/gvr-interface/CMakeLists.txt index 667dafc4e3..c496fd4b8d 100644 --- a/gvr-interface/CMakeLists.txt +++ b/gvr-interface/CMakeLists.txt @@ -31,4 +31,13 @@ file(WRITE "${ANDROID_APK_BUILD_DIR}/project.properties" "android.library.refere list(APPEND IGNORE_COPY_LIBS ${LIBOVR_ANDROID_LIBRARIES}) +if (HOCKEY_APP_APP_ID) + set(HOCKEY_APP_ENABLED true) + set(HOCKEY_APP_ACTIVITY "") +else () + set(HOCKEY_APP_ENABLED false) +endif () + +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/res/values/hockeyapp.xml.in" "${ANDROID_APK_BUILD_DIR}/res/values/hockeyapp.xml") + qt_create_apk() \ No newline at end of file diff --git a/gvr-interface/res/values/hockeyapp.xml.in b/gvr-interface/res/values/hockeyapp.xml.in new file mode 100644 index 0000000000..f8ad90be5f --- /dev/null +++ b/gvr-interface/res/values/hockeyapp.xml.in @@ -0,0 +1,5 @@ + + + ${HOCKEY_APP_APP_ID} + ${HOCKEY_APP_ENABLED} +