From 05506486a91f343bcc7e622dfe2de9d303dd44ce Mon Sep 17 00:00:00 2001 From: Denes Matetelki Date: Tue, 28 Jun 2011 14:00:11 +0200 Subject: [PATCH] desktop file and .pro INSTALL section update thanks to Eugene, locale.pri file to automatic .ts -> .qm generation --- lang/locale.pri | 24 ++++++++++++++++++++++++ qtmindmap.desktop | 10 ++++++++++ qtmindmap.pro | 20 +++++++++++++++----- 3 files changed, 49 insertions(+), 5 deletions(-) create mode 100644 lang/locale.pri create mode 100644 qtmindmap.desktop diff --git a/lang/locale.pri b/lang/locale.pri new file mode 100644 index 0000000..3116692 --- /dev/null +++ b/lang/locale.pri @@ -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 diff --git a/qtmindmap.desktop b/qtmindmap.desktop new file mode 100644 index 0000000..7c1c506 --- /dev/null +++ b/qtmindmap.desktop @@ -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 diff --git a/qtmindmap.pro b/qtmindmap.pro index 26de43e..8c24f90 100644 --- a/qtmindmap.pro +++ b/qtmindmap.pro @@ -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