1 include(../../../gcs
.pri
)
3 # Commented languages with outdated translations
4 # Allow removing the 'C' language in default config files at first start.
5 # Need to be uncommented for update in all languages files (make ts)
6 LANGUAGES
= fr zh_CN
# de es ru
9 defineReplace(prependAll
) {
10 for(a
,$$
1):result
+= $$
2$$
{a
}$$
3
14 XMLPATTERNS
= $$
[QT_INSTALL_BINS
]/xmlpatterns
15 LUPDATE
= $$
[QT_INSTALL_BINS
]/lupdate
-locations relative
-no
-ui
-lines
-no
-sort
16 LRELEASE
= $$
[QT_INSTALL_BINS
]/lrelease
17 LCONVERT
= $$
[QT_INSTALL_BINS
]/lconvert
19 TRANSLATIONS
= $$
prependAll(LANGUAGES
, $$PWD
/gcs_
,.ts
)
21 MIME_TR_H
= $$PWD
/mime_tr
.h
23 for(dir
, $$
list($$
files($$GCS_SOURCE_TREE
/src
/plugins
/*))):MIMETYPES_FILES += $$files($$dir/*.mimetypes.xml)
24 MIMETYPES_FILES = \"$$join(MIMETYPES_FILES, \", \")\"
25 QMAKE_SUBSTITUTES += extract-mimetypes.xq.in
27 $$XMLPATTERNS -output $$MIME_TR_H $$PWD/extract-mimetypes.xq && \
28 (cd $$GCS_SOURCE_TREE && $$LUPDATE src $$MIME_TR_H -ts $$TRANSLATIONS) && \
29 $$QMAKE_DEL_FILE $$MIME_TR_H
31 QMAKE_EXTRA_TARGETS += ts
34 TARGET = phony_target2
35 CONFIG -= qt sdk separate_debug_info gdb_dwarf_index
39 updateqm.input = TRANSLATIONS
40 updateqm.output = $$GCS_DATA_PATH/translations/${QMAKE_FILE_BASE}.qm
41 updateqm.variable_out = PRE_TARGETDEPS
42 updateqm.commands = $$LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT}
43 updateqm.name = LRELEASE ${QMAKE_FILE_IN}
44 updateqm.CONFIG += no_link
45 QMAKE_EXTRA_COMPILERS += updateqm
47 QMAKE_LINK = @: IGNORE THIS LINE
49 win32:CONFIG -= embed_manifest_exe
51 qmfiles.files = $$prependAll(LANGUAGES, $$OUT_PWD/gcs_,.qm)
52 qmfiles.path = /share/gcs/translations
53 qmfiles.CONFIG += no_check_exist
56 #========= begin block copying qt_*.qm files ==========
57 defineReplace(QtQmExists) {
59 qm_file = $$[QT_INSTALL_TRANSLATIONS]/qt_$${lang}.qm
60 exists($$qm_file) : result += $$qm_file
64 QT_TRANSLATIONS = $$QtQmExists(LANGUAGES)
66 copyQT_QMs.input = QT_TRANSLATIONS
67 copyQT_QMs.output = $$GCS_DATA_PATH/translations/${QMAKE_FILE_BASE}.qm
68 copyQT_QMs.variable_out = PRE_TARGETDEPS
69 copyQT_QMs.commands = $(COPY_FILE) ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
70 copyQT_QMs.name = Copy ${QMAKE_FILE_IN}
71 copyQT_QMs.CONFIG += no_link
72 QMAKE_EXTRA_COMPILERS += copyQT_QMs
73 #========= end block copying qt_*.qm files ============