desktop file and .pro INSTALL section update thanks to Eugene, locale.pri file to automatic .ts -> .qm generation

master
Denes Matetelki 14 years ago
parent da288747b5
commit 05506486a9

@ -0,0 +1,24 @@
CODECFORTR = UTF-8
TRANSLATIONS = lang/qtmindmap_hu.ts \
lang/qtmindmap_nb_NO.ts
qmfiles = .qm/i18n/qtmindmap_hu.qm \
.qm/i18n/qtmindmap_nb_NO.qm
system(mkdir -p .qm/i18n && touch $${qmfiles})
isEmpty(QMAKE_LRELEASE)
{
win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe
else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
}
updateqm.input = TRANSLATIONS
updateqm.output = .qm/i18n/${QMAKE_FILE_BASE}.qm
updateqm.commands = $$QMAKE_LRELEASE -silent ${QMAKE_FILE_IN} -qm .qm/i18n/${QMAKE_FILE_BASE}.qm
updateqm.CONFIG += no_link target_predeps
QMAKE_EXTRA_COMPILERS += updateqm
PRE_TARGETDEPS += compiler_updateqm_make_all

@ -0,0 +1,10 @@
[Desktop Entry]
Encoding=UTF-8
Name=QtMindMap
TryExec=qtmindmap
Exec=qtmindmap
Icon=qtmindmap
Terminal=false
Type=Application
Categories=Application;Office;
StartupNotify=true

@ -31,11 +31,21 @@ HEADERS += include/mainwindow.h \
FORMS += ui/mainwindow.ui
RESOURCES = images/qtmindmap.qrc
RESOURCES += images/qtmindmap.qrc
TRANSLATIONS += lang/qtmindmap_hu.ts \
lang/qtmindmap_nb_NO.ts
CODECFORTR = UTF-8
# the translation hack
include(lang/locale.pri)
#DESTDIR = usr/bin
INSTALLS += target translations desktop icon
target.path = /usr/bin
translations.files += .qm/i18n
translations.path += /usr/share/qtmindmap
desktop.files += qtmindmap.desktop
desktop.path += /usr/share/applications
icon.files += images/qtmindmap.svg
icon.path += /usr/share/pixmaps

Loading…
Cancel
Save