updated generation of translations

This commit is contained in:
Martchus 2015-06-12 02:29:30 +02:00
parent 7e3953dda9
commit 2f3568e70b
3 changed files with 16 additions and 7 deletions

1
.gitignore vendored
View File

@ -22,6 +22,7 @@
moc_*.cpp
qrc_*.cpp
ui_*.h
*.qm
Makefile*
*-build-*

View File

@ -12,7 +12,17 @@ unix {
QMAKE_LFLAGS += "-Wl,--rpath=./"
}
# prefix
targetprefix = .
targetprefix = $$(TARGET_PREFIX)
equals(targetprefix, "") {
win32 {
targetprefix = ../../..
} else {
targetprefix = ../..
}
}
message("Using target prefix \"$${targetprefix}\".")
# print install root
message("Using install root \"$$(INSTALL_ROOT)\".")
# target
CONFIG(debug, debug|release) {
TARGET = $$targetprefix/$${projectname}d

View File

@ -78,9 +78,7 @@ guiqtquick {
TRANSLATIONS = translations/passwordmanager_en_US.ts \
translations/passwordmanager_de_DE.ts
}
updateqm.commands = lrelease $${projectname}.pro
updateqm.target = updateqm
QMAKE_EXTRA_TARGETS += updateqm
include(translations.pri)
OTHER_FILES += \
README.md \
@ -108,11 +106,11 @@ INCLUDEPATH += ../
target.path = $$(INSTALL_ROOT)/bin
INSTALLS += target
icon.path = $$(INSTALL_ROOT)/share/icons/hicolor/scalable/apps/
icon.files = ./resources/icons/hicolor/scalable/apps/$${projectname}.svg
icon.files = $${PWD}/resources/icons/hicolor/scalable/apps/$${projectname}.svg
INSTALLS += icon
menu.path = $$(INSTALL_ROOT)/share/applications/
menu.files = ./resources/desktop/applications/$${projectname}.desktop
menu.files = $${PWD}/resources/desktop/applications/$${projectname}.desktop
INSTALLS += menu
translations.path = $$(INSTALL_ROOT)/share/$${projectname}/translations/
translations.files = ./translations/*.qm
translations.files = $${OUT_PWD}/translations/*.qm
INSTALLS += translations