aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/ios
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-05-04 13:55:14 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-05-04 14:00:43 -0700
commit42eee8a2e1f10a5cc7e91f96af2e08b9525db623 (patch)
tree690383ae5598992c4f4a8525d9690fd3be3647af /packaging/ios
parentd668a89df7a92d5fa34f580280932a2bbd5076fc (diff)
downloadsubsurface-42eee8a2e1f10a5cc7e91f96af2e08b9525db623.tar.gz
iOS build: create the translations to be bundled
And add them to the bundle. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'packaging/ios')
-rw-r--r--packaging/ios/Subsurface-mobile/Subsurface-mobile.pro2
-rw-r--r--packaging/ios/Subsurface-mobile/translations.qrc26
-rw-r--r--packaging/ios/build.sh13
3 files changed, 39 insertions, 2 deletions
diff --git a/packaging/ios/Subsurface-mobile/Subsurface-mobile.pro b/packaging/ios/Subsurface-mobile/Subsurface-mobile.pro
index 27125fe50..5cbf876f8 100644
--- a/packaging/ios/Subsurface-mobile/Subsurface-mobile.pro
+++ b/packaging/ios/Subsurface-mobile/Subsurface-mobile.pro
@@ -100,7 +100,7 @@ SOURCES += ../../../subsurface-mobile-main.cpp \
../../../profile-widget/diverectitem.cpp \
../../../profile-widget/divetextitem.cpp
-RESOURCES += qml.qrc ../../../subsurface.qrc ../../../mobile-widgets/qml/mobile-resources.qrc
+RESOURCES += qml.qrc ../../../subsurface.qrc ../../../mobile-widgets/qml/mobile-resources.qrc translations.qrc
LIBS += ../install-root/lib/libcrypto.a \
../install-root/lib/libdivecomputer.a \
diff --git a/packaging/ios/Subsurface-mobile/translations.qrc b/packaging/ios/Subsurface-mobile/translations.qrc
new file mode 100644
index 000000000..7a6bade70
--- /dev/null
+++ b/packaging/ios/Subsurface-mobile/translations.qrc
@@ -0,0 +1,26 @@
+<RCC>
+ <qresource prefix="/">
+ <file>translations/subsurface_bg_BG.qm</file>
+ <file>translations/subsurface_cs.qm</file>
+ <file>translations/subsurface_da_DK.qm</file>
+ <file>translations/subsurface_de_CH.qm</file>
+ <file>translations/subsurface_de_DE.qm</file>
+ <file>translations/subsurface_en_GB.qm</file>
+ <file>translations/subsurface_es_ES.qm</file>
+ <file>translations/subsurface_et_EE.qm</file>
+ <file>translations/subsurface_fi_FI.qm</file>
+ <file>translations/subsurface_fr_FR.qm</file>
+ <file>translations/subsurface_he.qm</file>
+ <file>translations/subsurface_it_IT.qm</file>
+ <file>translations/subsurface_nb_NO.qm</file>
+ <file>translations/subsurface_nl_NL.qm</file>
+ <file>translations/subsurface_pl_PL.qm</file>
+ <file>translations/subsurface_pt_BR.qm</file>
+ <file>translations/subsurface_pt_PT.qm</file>
+ <file>translations/subsurface_ro_RO.qm</file>
+ <file>translations/subsurface_ru_RU.qm</file>
+ <file>translations/subsurface_sk_SK.qm</file>
+ <file>translations/subsurface_sv_SE.qm</file>
+ <file>translations/subsurface_zh_TW.qm</file>
+ </qresource>
+</RCC>
diff --git a/packaging/ios/build.sh b/packaging/ios/build.sh
index dd1531792..e872346e3 100644
--- a/packaging/ios/build.sh
+++ b/packaging/ios/build.sh
@@ -355,7 +355,18 @@ done
# now combine the arm libraries into fat libraries
cp -a install-root-arm64 install-root
-cd install-root/lib
+pushd install-root/lib
for LIB in $(find . -type f -name \*.a); do
lipo ../../install-root-armv7/lib/$LIB ../../install-root-arm64/lib/$LIB ../../install-root-x86_64/lib/$LIB -create -output $LIB
done
+popd
+
+pushd ${SUBSURFACE_SOURCE}/translations
+SRCS=$(ls *.ts | grep -v source)
+popd
+pushd Subsurface-mobile
+mkdir -p translations
+for src in $SRCS; do
+ ${IOS_QT}/5.6/ios/bin/lrelease ${SUBSURFACE_SOURCE}/translations/$src -qm translations/${src/.ts/.qm}
+done
+popd