2010-02-01 15:10:06 +01:00
|
|
|
include(../../../openpilotgcs.pri)
|
|
|
|
|
2010-09-25 20:07:33 +02:00
|
|
|
LANGUAGES = de es fr it ru zh_CN
|
2010-02-01 15:10:06 +01:00
|
|
|
|
|
|
|
# var, prepend, append
|
|
|
|
defineReplace(prependAll) {
|
|
|
|
for(a,$$1):result += $$2$${a}$$3
|
|
|
|
return($$result)
|
|
|
|
}
|
|
|
|
|
|
|
|
XMLPATTERNS = $$targetPath($$[QT_INSTALL_BINS]/xmlpatterns)
|
2010-09-01 03:03:31 +02:00
|
|
|
LUPDATE = $$targetPath($$[QT_INSTALL_BINS]/lupdate) -locations relative -no-ui-lines -no-sort -noobsolete
|
2010-02-01 15:10:06 +01:00
|
|
|
LRELEASE = $$targetPath($$[QT_INSTALL_BINS]/lrelease)
|
|
|
|
|
2010-02-03 22:02:29 +01:00
|
|
|
TRANSLATIONS = $$prependAll(LANGUAGES, $$PWD/openpilotgcs_,.ts)
|
2010-02-01 15:10:06 +01:00
|
|
|
|
2010-07-12 19:24:55 +02:00
|
|
|
MIME_TR_H = $$PWD/mime_tr.h
|
2010-02-01 15:10:06 +01:00
|
|
|
|
|
|
|
contains(QT_VERSION, ^4\.[0-5]\..*) {
|
|
|
|
ts.commands = @echo This Qt version is too old for the ts target. Need Qt 4.6+.
|
|
|
|
} else {
|
2010-02-04 00:26:47 +01:00
|
|
|
for(dir, $$list($$files($$GCS_SOURCE_TREE/src/plugins/*))):MIMETYPES_FILES += $$files($$dir/*.mimetypes.xml)
|
2010-02-01 15:10:06 +01:00
|
|
|
MIMETYPES_FILES = \"$$join(MIMETYPES_FILES, \", \")\"
|
|
|
|
QMAKE_SUBSTITUTES += extract-mimetypes.xq.in
|
|
|
|
ts.commands += \
|
|
|
|
$$XMLPATTERNS -output $$MIME_TR_H $$PWD/extract-mimetypes.xq && \
|
2010-02-04 00:26:47 +01:00
|
|
|
(cd $$GCS_SOURCE_TREE && $$LUPDATE src $$MIME_TR_H -ts $$TRANSLATIONS) && \
|
2010-07-12 19:24:55 +02:00
|
|
|
$$QMAKE_DEL_FILE $$targetPath($$MIME_TR_H)
|
2010-02-01 15:10:06 +01:00
|
|
|
}
|
|
|
|
QMAKE_EXTRA_TARGETS += ts
|
|
|
|
|
|
|
|
TEMPLATE = app
|
|
|
|
TARGET = phony_target2
|
|
|
|
CONFIG -= qt
|
|
|
|
QT =
|
|
|
|
LIBS =
|
|
|
|
|
|
|
|
updateqm.input = TRANSLATIONS
|
2010-02-04 00:43:40 +01:00
|
|
|
updateqm.output = $$GCS_DATA_PATH/translations/${QMAKE_FILE_BASE}.qm
|
2010-02-01 15:10:06 +01:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2010-02-03 22:02:29 +01:00
|
|
|
qmfiles.files = $$prependAll(LANGUAGES, $$OUT_PWD/openpilotgcs_,.qm)
|
2010-02-03 16:26:03 +01:00
|
|
|
qmfiles.path = /share/openpilotgcs/translations
|
2010-02-01 15:10:06 +01:00
|
|
|
qmfiles.CONFIG += no_check_exist
|
|
|
|
INSTALLS += qmfiles
|