From 42eee8a2e1f10a5cc7e91f96af2e08b9525db623 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 4 May 2016 13:55:14 -0700 Subject: iOS build: create the translations to be bundled And add them to the bundle. Signed-off-by: Dirk Hohndel --- .../ios/Subsurface-mobile/Subsurface-mobile.pro | 2 +- packaging/ios/Subsurface-mobile/translations.qrc | 26 ++++++++++++++++++++++ packaging/ios/build.sh | 13 ++++++++++- 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 packaging/ios/Subsurface-mobile/translations.qrc (limited to 'packaging/ios') 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 @@ + + + translations/subsurface_bg_BG.qm + translations/subsurface_cs.qm + translations/subsurface_da_DK.qm + translations/subsurface_de_CH.qm + translations/subsurface_de_DE.qm + translations/subsurface_en_GB.qm + translations/subsurface_es_ES.qm + translations/subsurface_et_EE.qm + translations/subsurface_fi_FI.qm + translations/subsurface_fr_FR.qm + translations/subsurface_he.qm + translations/subsurface_it_IT.qm + translations/subsurface_nb_NO.qm + translations/subsurface_nl_NL.qm + translations/subsurface_pl_PL.qm + translations/subsurface_pt_BR.qm + translations/subsurface_pt_PT.qm + translations/subsurface_ro_RO.qm + translations/subsurface_ru_RU.qm + translations/subsurface_sk_SK.qm + translations/subsurface_sv_SE.qm + translations/subsurface_zh_TW.qm + + 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 -- cgit v1.2.3-70-g09d2