Install qt translations into Mac bundle

This is much harder than it should be...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-10-11 13:51:03 -07:00
parent 344fc98bfc
commit d031b54d16
2 changed files with 14 additions and 1 deletions

View file

@ -2,6 +2,7 @@ marbledir.files = $$MARBLEDIR
xslt.files = $$XSLT_FILES
doc.files = $$DOC_FILES
translation.files = $$replace(TRANSLATIONS, .ts, .qm)
qttranslation.files = $$join(QTTRANSLATIONS," "$$[QT_INSTALL_TRANSLATIONS]/,$$[QT_INSTALL_TRANSLATIONS]/)
nltab = $$escape_expand(\\n\\t)
@ -22,8 +23,9 @@ mac {
xslt.path = $$datadir
doc.path = $$datadir/doc
translation.path = Contents/Resources/translations
qttranslation.path = Contents/Resources/translations
doc.files = $$files($$doc.files)
QMAKE_BUNDLE_DATA += marbledir xslt doc translation
QMAKE_BUNDLE_DATA += marbledir xslt doc translation qttranslation
mac_deploy.target = mac-deploy
mac_deploy.commands += $$[QT_INSTALL_BINS]/macdeployqt $${TARGET}.app

View file

@ -143,6 +143,17 @@ TRANSLATIONS = \
translations/subsurface_sk_SK.ts \
translations/subsurface_sv_SE.ts
QTTRANSLATIONS = \
qt_da.qm \
qt_de.qm \
qt_es.qm \
qt_fr.qm \
qt_pl.qm \
qt_pt.qm \
qt_ru.qm \
qt_sk.qm \
qt_sv.qm
doc.commands += $$escape_expand(\\n\\t)$(MAKE) -C $$PWD/Documentation OUT=$$OUT_PWD/Documentation/ doc
all.depends += doc
QMAKE_EXTRA_TARGETS += doc all