mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Android build: automate setting the right version number
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
d42b7f55c4
commit
a64eef7f82
3 changed files with 8 additions and 3 deletions
|
@ -325,9 +325,8 @@ endforeach()
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
# Android template directory
|
# Android template directory
|
||||||
include(${QT_ANDROID_CMAKE})
|
include(${QT_ANDROID_CMAKE})
|
||||||
set(ANDROID_PACKAGE_SOURCE_DIR, ${CMAKE_BINARY_DIR}/android-mobile)
|
|
||||||
add_qt_android_apk(${SUBSURFACE_TARGET}.apk ${SUBSURFACE_TARGET}
|
add_qt_android_apk(${SUBSURFACE_TARGET}.apk ${SUBSURFACE_TARGET}
|
||||||
PACKAGE_SOURCES ${CMAKE_CURRENT_LIST_DIR}/android-mobile
|
PACKAGE_SOURCES ${CMAKE_BINARY_DIR}/android-mobile
|
||||||
)
|
)
|
||||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||||
set(APP_BUNDLE_DIR "${SUBSURFACE_TARGET}.app")
|
set(APP_BUNDLE_DIR "${SUBSURFACE_TARGET}.app")
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
package="org.subsurfacedivelog.mobile"
|
package="org.subsurfacedivelog.mobile"
|
||||||
android:installLocation="auto"
|
android:installLocation="auto"
|
||||||
android:versionCode="1"
|
android:versionCode="1"
|
||||||
android:versionName="1.0" >
|
android:versionName=@SUBSURFACE_MOBILE_VERSION@ >
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:name="org.qtproject.qt5.android.bindings.QtApplication"
|
android:name="org.qtproject.qt5.android.bindings.QtApplication"
|
||||||
|
|
|
@ -348,6 +348,12 @@ cmake $MOBILE_CMAKE \
|
||||||
# libcrypto - that's not helpful
|
# libcrypto - that's not helpful
|
||||||
sed -i -e "s/-lcrypto//g" CMakeFiles/subsurface-mobile.dir/link.txt
|
sed -i -e "s/-lcrypto//g" CMakeFiles/subsurface-mobile.dir/link.txt
|
||||||
|
|
||||||
|
# set up the version number
|
||||||
|
SUBSURFACE_MOBILE_VERSION=$(grep MOBILE_VERSION_STRING ssrf-version.h | awk "{ print \$3 }" )
|
||||||
|
rm -rf android-mobile
|
||||||
|
cp -a $SUBSURFACE_SOURCE/android-mobile .
|
||||||
|
sed -i -e "s/@SUBSURFACE_MOBILE_VERSION@/$SUBSURFACE_MOBILE_VERSION/" android-mobile/AndroidManifest.xml
|
||||||
|
|
||||||
# now build Subsurface and use the rest of the command line arguments
|
# now build Subsurface and use the rest of the command line arguments
|
||||||
make $@
|
make $@
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue