From 5717e44d47bf5f6be59a59844223ce71b094b08e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 9 Jun 2009 17:08:44 +0200 Subject: turn qm generation into a build time target consequently, remove the qm files from the repository this uses some really black magic to convince qmake to do the right thing. this will be fixed properly in a later version. Reviewed-by: mariusSO --- projects.pro | 5 ++++- translations/assistant_adp_de.qm | Bin 23139 -> 0 bytes translations/assistant_adp_ja.qm | Bin 18357 -> 0 bytes translations/assistant_adp_pl.qm | Bin 22726 -> 0 bytes translations/assistant_adp_zh_CN.qm | Bin 16631 -> 0 bytes translations/assistant_adp_zh_TW.qm | Bin 16555 -> 0 bytes translations/assistant_de.qm | Bin 18688 -> 0 bytes translations/assistant_pl.qm | Bin 18457 -> 0 bytes translations/assistant_zh_CN.qm | Bin 15595 -> 0 bytes translations/assistant_zh_TW.qm | Bin 15567 -> 0 bytes translations/designer_de.qm | Bin 151189 -> 0 bytes translations/designer_ja.qm | Bin 105573 -> 0 bytes translations/designer_pl.qm | Bin 150544 -> 0 bytes translations/designer_zh_CN.qm | Bin 113745 -> 0 bytes translations/designer_zh_TW.qm | Bin 113449 -> 0 bytes translations/linguist_de.qm | Bin 45915 -> 0 bytes translations/linguist_ja.qm | Bin 30494 -> 0 bytes translations/linguist_pl.qm | Bin 50952 -> 0 bytes translations/linguist_zh_CN.qm | Bin 33492 -> 0 bytes translations/linguist_zh_TW.qm | Bin 33735 -> 0 bytes translations/qt_ar.qm | Bin 58499 -> 0 bytes translations/qt_de.qm | Bin 181348 -> 0 bytes translations/qt_es.qm | Bin 117693 -> 0 bytes translations/qt_fr.qm | Bin 148544 -> 0 bytes translations/qt_help_de.qm | Bin 9583 -> 0 bytes translations/qt_help_pl.qm | Bin 9058 -> 0 bytes translations/qt_help_zh_CN.qm | Bin 6434 -> 0 bytes translations/qt_help_zh_TW.qm | Bin 6384 -> 0 bytes translations/qt_iw.qm | Bin 55269 -> 0 bytes translations/qt_ja_JP.qm | Bin 64337 -> 0 bytes translations/qt_pl.qm | Bin 143971 -> 0 bytes translations/qt_pt.qm | Bin 78828 -> 0 bytes translations/qt_ru.qm | Bin 60815 -> 0 bytes translations/qt_sk.qm | Bin 79787 -> 0 bytes translations/qt_sv.qm | Bin 73493 -> 0 bytes translations/qt_uk.qm | Bin 81429 -> 0 bytes translations/qt_zh_CN.qm | Bin 118981 -> 0 bytes translations/qt_zh_TW.qm | Bin 118967 -> 0 bytes translations/qtconfig_pl.qm | Bin 17940 -> 0 bytes translations/qtconfig_zh_CN.qm | Bin 21688 -> 0 bytes translations/qtconfig_zh_TW.qm | Bin 20262 -> 0 bytes translations/qvfb_pl.qm | Bin 4742 -> 0 bytes translations/qvfb_zh_CN.qm | Bin 4853 -> 0 bytes translations/qvfb_zh_TW.qm | Bin 4853 -> 0 bytes translations/translations.pri | 38 +++------------------------------ translations/translations.pro | 41 ++++++++++++++++++++++++++++++++++++ 46 files changed, 48 insertions(+), 36 deletions(-) delete mode 100644 translations/assistant_adp_de.qm delete mode 100644 translations/assistant_adp_ja.qm delete mode 100644 translations/assistant_adp_pl.qm delete mode 100644 translations/assistant_adp_zh_CN.qm delete mode 100644 translations/assistant_adp_zh_TW.qm delete mode 100644 translations/assistant_de.qm delete mode 100644 translations/assistant_pl.qm delete mode 100644 translations/assistant_zh_CN.qm delete mode 100644 translations/assistant_zh_TW.qm delete mode 100644 translations/designer_de.qm delete mode 100644 translations/designer_ja.qm delete mode 100644 translations/designer_pl.qm delete mode 100644 translations/designer_zh_CN.qm delete mode 100644 translations/designer_zh_TW.qm delete mode 100644 translations/linguist_de.qm delete mode 100644 translations/linguist_ja.qm delete mode 100644 translations/linguist_pl.qm delete mode 100644 translations/linguist_zh_CN.qm delete mode 100644 translations/linguist_zh_TW.qm delete mode 100644 translations/qt_ar.qm delete mode 100644 translations/qt_de.qm delete mode 100644 translations/qt_es.qm delete mode 100644 translations/qt_fr.qm delete mode 100644 translations/qt_help_de.qm delete mode 100644 translations/qt_help_pl.qm delete mode 100644 translations/qt_help_zh_CN.qm delete mode 100644 translations/qt_help_zh_TW.qm delete mode 100644 translations/qt_iw.qm delete mode 100644 translations/qt_ja_JP.qm delete mode 100644 translations/qt_pl.qm delete mode 100644 translations/qt_pt.qm delete mode 100644 translations/qt_ru.qm delete mode 100644 translations/qt_sk.qm delete mode 100644 translations/qt_sv.qm delete mode 100644 translations/qt_uk.qm delete mode 100644 translations/qt_zh_CN.qm delete mode 100644 translations/qt_zh_TW.qm delete mode 100644 translations/qtconfig_pl.qm delete mode 100644 translations/qtconfig_zh_CN.qm delete mode 100644 translations/qtconfig_zh_TW.qm delete mode 100644 translations/qvfb_pl.qm delete mode 100644 translations/qvfb_zh_CN.qm delete mode 100644 translations/qvfb_zh_TW.qm create mode 100644 translations/translations.pro diff --git a/projects.pro b/projects.pro index 2596c0a..03ce098 100644 --- a/projects.pro +++ b/projects.pro @@ -37,7 +37,10 @@ for(PROJECT, $$list($$lower($$unique(QT_BUILD_PARTS)))) { } else:isEqual(PROJECT, docs) { contains(QT_BUILD_PARTS, tools):include(doc/doc.pri) } else:isEqual(PROJECT, translations) { - contains(QT_BUILD_PARTS, tools):include(translations/translations.pri) + contains(QT_BUILD_PARTS, tools) { + include(translations/translations.pri) # ts targets + SUBDIRS += translations # qm build step + } } else:isEqual(PROJECT, qmake) { # SUBDIRS += qmake } else { diff --git a/translations/assistant_adp_de.qm b/translations/assistant_adp_de.qm deleted file mode 100644 index 15ef713..0000000 Binary files a/translations/assistant_adp_de.qm and /dev/null differ diff --git a/translations/assistant_adp_ja.qm b/translations/assistant_adp_ja.qm deleted file mode 100644 index a3b4383..0000000 Binary files a/translations/assistant_adp_ja.qm and /dev/null differ diff --git a/translations/assistant_adp_pl.qm b/translations/assistant_adp_pl.qm deleted file mode 100644 index 1b144e1..0000000 Binary files a/translations/assistant_adp_pl.qm and /dev/null differ diff --git a/translations/assistant_adp_zh_CN.qm b/translations/assistant_adp_zh_CN.qm deleted file mode 100644 index 1685e47..0000000 Binary files a/translations/assistant_adp_zh_CN.qm and /dev/null differ diff --git a/translations/assistant_adp_zh_TW.qm b/translations/assistant_adp_zh_TW.qm deleted file mode 100644 index 8e055c4..0000000 Binary files a/translations/assistant_adp_zh_TW.qm and /dev/null differ diff --git a/translations/assistant_de.qm b/translations/assistant_de.qm deleted file mode 100644 index 5b31aea..0000000 Binary files a/translations/assistant_de.qm and /dev/null differ diff --git a/translations/assistant_pl.qm b/translations/assistant_pl.qm deleted file mode 100644 index 14560b3..0000000 Binary files a/translations/assistant_pl.qm and /dev/null differ diff --git a/translations/assistant_zh_CN.qm b/translations/assistant_zh_CN.qm deleted file mode 100644 index 22a770d..0000000 Binary files a/translations/assistant_zh_CN.qm and /dev/null differ diff --git a/translations/assistant_zh_TW.qm b/translations/assistant_zh_TW.qm deleted file mode 100644 index 41f320e..0000000 Binary files a/translations/assistant_zh_TW.qm and /dev/null differ diff --git a/translations/designer_de.qm b/translations/designer_de.qm deleted file mode 100644 index f9b0a03..0000000 Binary files a/translations/designer_de.qm and /dev/null differ diff --git a/translations/designer_ja.qm b/translations/designer_ja.qm deleted file mode 100644 index 6cf5f89..0000000 Binary files a/translations/designer_ja.qm and /dev/null differ diff --git a/translations/designer_pl.qm b/translations/designer_pl.qm deleted file mode 100644 index bf8d5f7..0000000 Binary files a/translations/designer_pl.qm and /dev/null differ diff --git a/translations/designer_zh_CN.qm b/translations/designer_zh_CN.qm deleted file mode 100644 index 9267123..0000000 Binary files a/translations/designer_zh_CN.qm and /dev/null differ diff --git a/translations/designer_zh_TW.qm b/translations/designer_zh_TW.qm deleted file mode 100644 index fd6460d..0000000 Binary files a/translations/designer_zh_TW.qm and /dev/null differ diff --git a/translations/linguist_de.qm b/translations/linguist_de.qm deleted file mode 100644 index a39c3bf..0000000 Binary files a/translations/linguist_de.qm and /dev/null differ diff --git a/translations/linguist_ja.qm b/translations/linguist_ja.qm deleted file mode 100644 index cdb7c1c..0000000 Binary files a/translations/linguist_ja.qm and /dev/null differ diff --git a/translations/linguist_pl.qm b/translations/linguist_pl.qm deleted file mode 100644 index 2604ffe..0000000 Binary files a/translations/linguist_pl.qm and /dev/null differ diff --git a/translations/linguist_zh_CN.qm b/translations/linguist_zh_CN.qm deleted file mode 100644 index d8081c5..0000000 Binary files a/translations/linguist_zh_CN.qm and /dev/null differ diff --git a/translations/linguist_zh_TW.qm b/translations/linguist_zh_TW.qm deleted file mode 100644 index 9477e56..0000000 Binary files a/translations/linguist_zh_TW.qm and /dev/null differ diff --git a/translations/qt_ar.qm b/translations/qt_ar.qm deleted file mode 100644 index 3d55bf4..0000000 Binary files a/translations/qt_ar.qm and /dev/null differ diff --git a/translations/qt_de.qm b/translations/qt_de.qm deleted file mode 100644 index 9ea09a7..0000000 Binary files a/translations/qt_de.qm and /dev/null differ diff --git a/translations/qt_es.qm b/translations/qt_es.qm deleted file mode 100644 index 0fa1226..0000000 Binary files a/translations/qt_es.qm and /dev/null differ diff --git a/translations/qt_fr.qm b/translations/qt_fr.qm deleted file mode 100644 index 5553086..0000000 Binary files a/translations/qt_fr.qm and /dev/null differ diff --git a/translations/qt_help_de.qm b/translations/qt_help_de.qm deleted file mode 100644 index e3d8d87..0000000 Binary files a/translations/qt_help_de.qm and /dev/null differ diff --git a/translations/qt_help_pl.qm b/translations/qt_help_pl.qm deleted file mode 100644 index bf7fd10..0000000 Binary files a/translations/qt_help_pl.qm and /dev/null differ diff --git a/translations/qt_help_zh_CN.qm b/translations/qt_help_zh_CN.qm deleted file mode 100644 index 11748b7..0000000 Binary files a/translations/qt_help_zh_CN.qm and /dev/null differ diff --git a/translations/qt_help_zh_TW.qm b/translations/qt_help_zh_TW.qm deleted file mode 100644 index b97aae4..0000000 Binary files a/translations/qt_help_zh_TW.qm and /dev/null differ diff --git a/translations/qt_iw.qm b/translations/qt_iw.qm deleted file mode 100644 index 59c1c7e..0000000 Binary files a/translations/qt_iw.qm and /dev/null differ diff --git a/translations/qt_ja_JP.qm b/translations/qt_ja_JP.qm deleted file mode 100644 index b695c97..0000000 Binary files a/translations/qt_ja_JP.qm and /dev/null differ diff --git a/translations/qt_pl.qm b/translations/qt_pl.qm deleted file mode 100644 index f6847d0..0000000 Binary files a/translations/qt_pl.qm and /dev/null differ diff --git a/translations/qt_pt.qm b/translations/qt_pt.qm deleted file mode 100644 index 253a007..0000000 Binary files a/translations/qt_pt.qm and /dev/null differ diff --git a/translations/qt_ru.qm b/translations/qt_ru.qm deleted file mode 100644 index 63b7b8b..0000000 Binary files a/translations/qt_ru.qm and /dev/null differ diff --git a/translations/qt_sk.qm b/translations/qt_sk.qm deleted file mode 100644 index a73ddc6..0000000 Binary files a/translations/qt_sk.qm and /dev/null differ diff --git a/translations/qt_sv.qm b/translations/qt_sv.qm deleted file mode 100644 index 6b1e9cf..0000000 Binary files a/translations/qt_sv.qm and /dev/null differ diff --git a/translations/qt_uk.qm b/translations/qt_uk.qm deleted file mode 100644 index 7cd604a..0000000 Binary files a/translations/qt_uk.qm and /dev/null differ diff --git a/translations/qt_zh_CN.qm b/translations/qt_zh_CN.qm deleted file mode 100644 index e73b0cd..0000000 Binary files a/translations/qt_zh_CN.qm and /dev/null differ diff --git a/translations/qt_zh_TW.qm b/translations/qt_zh_TW.qm deleted file mode 100644 index 699bd5c..0000000 Binary files a/translations/qt_zh_TW.qm and /dev/null differ diff --git a/translations/qtconfig_pl.qm b/translations/qtconfig_pl.qm deleted file mode 100644 index 1a2faa3..0000000 Binary files a/translations/qtconfig_pl.qm and /dev/null differ diff --git a/translations/qtconfig_zh_CN.qm b/translations/qtconfig_zh_CN.qm deleted file mode 100644 index 9998e81..0000000 Binary files a/translations/qtconfig_zh_CN.qm and /dev/null differ diff --git a/translations/qtconfig_zh_TW.qm b/translations/qtconfig_zh_TW.qm deleted file mode 100644 index 3d36679..0000000 Binary files a/translations/qtconfig_zh_TW.qm and /dev/null differ diff --git a/translations/qvfb_pl.qm b/translations/qvfb_pl.qm deleted file mode 100644 index 7230cb6..0000000 Binary files a/translations/qvfb_pl.qm and /dev/null differ diff --git a/translations/qvfb_zh_CN.qm b/translations/qvfb_zh_CN.qm deleted file mode 100644 index 5592f07..0000000 Binary files a/translations/qvfb_zh_CN.qm and /dev/null differ diff --git a/translations/qvfb_zh_TW.qm b/translations/qvfb_zh_TW.qm deleted file mode 100644 index b378ad8..0000000 Binary files a/translations/qvfb_zh_TW.qm and /dev/null differ diff --git a/translations/translations.pri b/translations/translations.pri index 0c5c1ee..c143043 100644 --- a/translations/translations.pri +++ b/translations/translations.pri @@ -8,16 +8,8 @@ defineReplace(prependAll) { return ($$result) } -defineReplace(fixPath) { -WIN { - return ($$replace($$1, /, \)) -} ELSE { - return ($$1) -} -} - -LUPDATE = $$fixPath($$QT_BUILD_TREE/bin/lupdate) -locations relative -no-ui-lines -LRELEASE = $$fixPath($$QT_BUILD_TREE/bin/lrelease) +LUPDATE = $$QT_BUILD_TREE/bin/lupdate -locations relative -no-ui-lines +win32:LUPDATE ~= s|/|\|g ###### Qt Libraries @@ -41,27 +33,18 @@ ts-qt.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \ -ts $$prependAll($$[QT_INSTALL_TRANSLATIONS]/qt_,$$QT_TS,.ts)) ts-qt.depends = sub-tools -qm-qt.commands = $$LRELEASE $$prependAll($$[QT_INSTALL_TRANSLATIONS]/qt_,$$QT_TS,.ts) -qm-qt.depends = sub-tools - ###### Designer ts-designer.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \ ../tools/designer/translations/translations.pro) ts-designer.depends = sub-tools -qm-designer.commands = $$LRELEASE $$QT_SOURCE_TREE/tools/designer/translations/translations.pro -qm-designer.depends = sub-tools - ###### Linguist ts-linguist.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \ ../tools/linguist/linguist/linguist.pro) ts-linguist.depends = sub-tools -qm-linguist.commands = $$LRELEASE $$QT_SOURCE_TREE/tools/linguist/linguist/linguist.pro -qm-linguist.depends = sub-tools - ###### Assistant ts-assistant.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \ @@ -72,36 +55,21 @@ ts-assistant.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \ ../tools/assistant/translations/translations_adp.pro) ts-assistant.depends = sub-tools -qm-assistant.commands = ($$LRELEASE $$QT_SOURCE_TREE/tools/assistant/translations/translations.pro \ - && $$LRELEASE \ - $$QT_SOURCE_TREE/tools/assistant/translations/qt_help.pro \ - && $$LRELEASE \ - $$QT_SOURCE_TREE/tools/assistant/translations/translations_adp.pro) -qm-assistant.depends = sub-tools - ###### Qtconfig ts-qtconfig.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \ ../tools/qtconfig/translations/translations.pro) ts-qtconfig.depends = sub-tools -qm-qtconfig.commands = $$LRELEASE $$QT_SOURCE_TREE/tools/qtconfig/translations/translations.pro -qm-qtconfig.depends = sub-tools - ###### Qvfp ts-qvfb.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \ ../tools/qvfb/translations/translations.pro) ts-qvfb.depends = sub-tools -qm-qvfb.commands = $$LRELEASE $$QT_SOURCE_TREE/tools/qvfb/translations/translations.pro -qm-qvfb.depends = sub-tools - ###### Overall Rules ts.depends = ts-qt ts-designer ts-linguist ts-assistant ts-qtconfig ts-qvfb -qm.depends = qm-qt qm-designer qm-linguist qm-assistant qm-qtconfig qm-qvfb QMAKE_EXTRA_TARGETS += ts-qt ts-designer ts-linguist ts-assistant ts-qtconfig ts-qvfb \ - qm-qt qm-designer qm-linguist qm-assistant qm-qtconfig qm-qvfb \ - ts qm + ts diff --git a/translations/translations.pro b/translations/translations.pro new file mode 100644 index 0000000..d1962fe --- /dev/null +++ b/translations/translations.pro @@ -0,0 +1,41 @@ +TRANSLATIONS = $$files(*.ts) + +LRELEASE = $$QT_BUILD_TREE/bin/lrelease +win32:LRELEASE ~= s|/|\|g + +contains(TEMPLATE_PREFIX, vc):vcproj = 1 + +TEMPLATE = app +TARGET = qm_phony_target +CONFIG -= qt separate_debug_info +QT = +LIBS = + +updateqm.input = TRANSLATIONS +updateqm.output = ${QMAKE_FILE_BASE}.qm +isEmpty(vcproj):updateqm.variable_out = PRE_TARGETDEPS +updateqm.commands = $$LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT} +updateqm.name = LRELEASE ${QMAKE_FILE_IN} +updateqm.CONFIG += no_link +QMAKE_EXTRA_COMPILERS += updateqm + +isEmpty(vcproj) { + QMAKE_LINK = @: IGNORE THIS LINE + OBJECTS_DIR = + win32:CONFIG -= embed_manifest_exe +} else { + CONFIG += console + PHONY_DEPS = . + phony_src.input = PHONY_DEPS + phony_src.output = phony.c + phony_src.variable_out = GENERATED_SOURCES + phony_src.commands = echo int main() { return 0; } > phony.c + phony_src.name = CREATE phony.c + phony_src.CONFIG += combine + QMAKE_EXTRA_COMPILERS += phony_src +} + +translations.path = $$[QT_INSTALL_TRANSLATIONS] +translations.files = $$TRANSLATIONS +translations.files ~= s,\\.ts$,.qm,g +INSTALLS += translations -- cgit v0.12