hb.pro
changeset 30 80e4d18b72f5
parent 28 b7da29130b0e
--- a/hb.pro	Fri Sep 17 08:32:10 2010 +0300
+++ b/hb.pro	Mon Oct 04 00:38:12 2010 +0300
@@ -51,12 +51,9 @@
     BLD_INF_RULES.prj_exports += "mkspecs/docml2bin.prf $$HB_SYMBIAN_PRF_EXPORT_DIR/docml2bin.prf"
 
     host_tools {
-        exists($${HB_BUILD_DIR}/bin/docml2bin) {
-            hbPrjExport("$${HB_BUILD_DIR}/bin/docml2bin", "$${HB_BIN_DIR}/docml2bin")
-        }
-        exists($${HB_BUILD_DIR}/bin/docml2bin.exe) {
-            hbPrjExport("$${HB_BUILD_DIR}/bin/docml2bin.exe", "$${HB_BIN_DIR}/docml2bin.exe")
-        }
+        hbToolExport("$${HB_BUILD_DIR}/bin/docml2bin", "$${HB_BIN_DIR}/docml2bin")
+        hbToolExport("$${HB_BUILD_DIR}/bin/hbbincssmaker", "$${HB_BIN_DIR}/hbbincssmaker")
+        hbToolExport("$${HB_BUILD_DIR}/bin/hbthemeindexer", "$${HB_BIN_DIR}/hbthemeindexer")
     }
 }
 
@@ -97,17 +94,24 @@
 !symbian {
     LRELEASE = $$hbNativePath($$[QT_INSTALL_BINS]/lrelease)
     COMMON_EXTENSIONS = ar eu bg ca hr cs da nl en_US et fi fr fr_CA gl de el he hi zh_HK hu is id it ja ko lv lt ms nb pl pt pt_BR zh ro ru sr sk sl es es_419 sv tl zh_TW th tr uk ur vi
-    translations.input = $$HB_SOURCE_DIR/src/hbcore/i18n/translations/commonstrings
+    translations.input = $$HB_SOURCE_DIR/src/hbcore/i18n/translations
     translations.path = $${HB_TRANSLATIONS_DIR}
 
-    translations.commands = $$LRELEASE -silent -idbased $$translations.input/commonstrings_en.ts -qm $$translations.path/commonstrings_en.qm
-#    for(ext, COMMON_EXTENSIONS) {
-#        file = commonstrings_$$ext
-#        eval(trans_$${ext}.commands += $$LRELEASE -silent -idbased $$translations.input/$${file}.ts -qm $$translations.path/$${file}.qm)
-#        QMAKE_EXTRA_TARGETS += trans_$${ext}
-#        eval(translations.depends += trans_$${ext})
-#    }
+    pre_translations.commands = $$hbCreateDir($${HB_TRANSLATIONS_DIR})
+    translations.depends += pre_translations
+    translations.commands = $$LRELEASE -silent -idbased $$translations.input/commonstrings/commonstrings_en.ts -qm $$translations.path/commonstrings_en.qm
+    translations.commands += && $$LRELEASE -silent -idbased $$translations.input/directorynamelocalizer/directorynamelocalizer_en.ts -qm $$translations.path/directorynamelocalizer_en.qm
+    for(ext, COMMON_EXTENSIONS) {
+        file1 = commonstrings_$$ext
+        file2 = directorynamelocalizer_$$ext
+        commands = trans_$${ext}.commands
+        $$commands += $$LRELEASE -silent -idbased $$translations.input/commonstrings/$${file1}.ts -qm $$translations.path/$${file1}.qm
+        $$commands += && $$LRELEASE -silent -idbased $$translations.input/directorynamelocalizer/$${file2}.ts -qm $$translations.path/$${file2}.qm
+        QMAKE_EXTRA_TARGETS += trans_$${ext}
+        translations.depends += trans_$${ext}
+    }
 
+    QMAKE_EXTRA_TARGETS += pre_translations
     QMAKE_EXTRA_TARGETS += translations
     INSTALLS += translations
 }