mirror of
https://github.com/overte-org/overte.git
synced 2025-04-07 12:53:44 +02:00
handle possibility of HockeyApp inclusion
This commit is contained in:
parent
bf454f3b57
commit
4c338a9950
5 changed files with 27 additions and 9 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -39,4 +39,5 @@ interface/resources/visage/*
|
|||
# Ignore interfaceCache for Linux users
|
||||
interface/interfaceCache/
|
||||
|
||||
gvr-interface/assets/oculussig*
|
||||
gvr-interface/assets/oculussig*
|
||||
gvr-interface/libs/*
|
|
@ -41,10 +41,7 @@
|
|||
<!-- Messages maps -->
|
||||
|
||||
<!-- Splash screen -->
|
||||
<!--
|
||||
<meta-data android:name="android.app.splash_screen_drawable" android:resource="@drawable/logo"/>
|
||||
-->
|
||||
|
||||
<!-- <meta-data android:name="android.app.splash_screen_drawable" android:resource="@drawable/logo"/> -->
|
||||
</activity>
|
||||
|
||||
<activity android:name="com.oculusvr.vrlib.PlatformActivity"
|
||||
|
@ -71,4 +68,6 @@
|
|||
|
||||
<!-- Tell the system this app requires OpenGL ES 3.0. -->
|
||||
<uses-feature android:glEsVersion="0x00030000" android:required="true" />
|
||||
|
||||
${HOCKEY_APP_ACTIVITY}
|
||||
</manifest>
|
|
@ -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()
|
|
@ -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 "<activity android:name='net.hockeyapp.android.UpdateActivity' />")
|
||||
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()
|
5
gvr-interface/res/values/hockeyapp.xml.in
Normal file
5
gvr-interface/res/values/hockeyapp.xml.in
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<resources>
|
||||
<string name="HockeyAppID">${HOCKEY_APP_APP_ID}</string>
|
||||
<bool name="HockeyAppEnabled">${HOCKEY_APP_ENABLED}</bool>
|
||||
</resources>
|
Loading…
Reference in a new issue