don't run lupdate on build

add a separate make lupdate and make lrelease step
master
Michael Zanetti 2018-01-26 13:42:02 +01:00
parent 617242ddd2
commit e686adb107
33 changed files with 21 additions and 131 deletions

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginavahimonitor)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginawattar)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_deviceplugincommandlauncher)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginconrad)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_deviceplugindatetime)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_deviceplugindenon)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginelgato)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginelro)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_deviceplugineq3)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_deviceplugingenericelements)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_deviceplugingpio)

View File

@ -39,6 +39,17 @@ CONFIG+=all
message(============================================)
message("Qt version:" $$[QT_VERSION])
# Translations:
# make lupdate to update .ts files
lupdate.depends = FORCE
for (entry, PLUGIN_DIRS):lupdate.commands += make -C $${entry} lupdate;
QMAKE_EXTRA_TARGETS += lupdate
# make lrelease to build .qm from .ts
lrelease.depends = FORCE
for (entry, PLUGIN_DIRS):lrelease.commands += $$[QT_INSTALL_BINS]/lrelease $$files($$PWD/$${entry}/translations/*.ts, true);
QMAKE_EXTRA_TARGETS += lrelease
# Verify if building only a selection of plugins
contains(CONFIG, selection) {
CONFIG-=all

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginintertechno)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginkodi)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginleynew)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginlgsmarttv)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginmailnotification)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginnetatmo)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginnetworkdetector)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginopenweathermap)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginorderbutton)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginosdomotics)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginphilipshue)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginplantcare)

View File

@ -8,6 +8,8 @@ QMAKE_LFLAGS += -std=c++11
INCLUDEPATH += /usr/include/guh
LIBS += -lguh
HEADERS += $${OUT_PWD}/plugininfo.h
PLUGIN_PATH=/usr/lib/$$system('dpkg-architecture -q DEB_HOST_MULTIARCH')/guh/plugins/
@ -26,10 +28,7 @@ plugininfo.commands = touch ${QMAKE_FILE_OUT}; guh-generateplugininfo \
--filetype i \
--jsonfile ${QMAKE_FILE_NAME} \
--output ${QMAKE_FILE_OUT} \
--builddir $$OUT_PWD \
--translations $$TRANSLATIONS; \
mkdir -p $$shadowed($$PWD)/translations/ || true; \
rsync -a "$$OUT_PWD"/translations/*.qm $$shadowed($$PWD)/translations/;
--builddir $$OUT_PWD;
PRE_TARGETDEPS += compiler_plugininfo_make_all
QMAKE_EXTRA_COMPILERS += plugininfo
@ -41,13 +40,17 @@ externplugininfo.commands = touch ${QMAKE_FILE_OUT}; guh-generateplugininfo \
--filetype e \
--jsonfile ${QMAKE_FILE_NAME} \
--output ${QMAKE_FILE_OUT} \
--builddir $$OUT_PWD \
--translations $$TRANSLATIONS;
--builddir $$OUT_PWD;
PRE_TARGETDEPS += compiler_externplugininfo_make_all
QMAKE_EXTRA_COMPILERS += externplugininfo
# Install translation files
TRANSLATIONS *= $$files($${PWD}/$${TARGET}/translations/*ts, true)
lupdate.depends = FORCE
lupdate.depends += plugininfo
lupdate.commands = $$[QT_INSTALL_BINS]/lupdate -recursive -no-obsolete $$PWD/"$$TARGET"/"$$TARGET".pro;
QMAKE_EXTRA_TARGETS += lupdate
translations.path = /usr/share/guh/translations
translations.files = $$[QT_SOURCE_TREE]/translations/*.qm

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginsenic)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginsnapd)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_deviceplugintcpcommander)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginudpcommander)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginunitec)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginwakeonlan)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginwemo)

View File

@ -1,7 +1,3 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginws2812)