diff --git a/resources/graphics/rssguard_128.png b/resources/graphics/rssguard.png
similarity index 100%
rename from resources/graphics/rssguard_128.png
rename to resources/graphics/rssguard.png
diff --git a/resources/graphics/rssguard_plain_128.png b/resources/graphics/rssguard_plain.png
similarity index 100%
rename from resources/graphics/rssguard_plain_128.png
rename to resources/graphics/rssguard_plain.png
diff --git a/rssguard.pro b/rssguard.pro
index 1b8568993..3c879d21a 100644
--- a/rssguard.pro
+++ b/rssguard.pro
@@ -22,10 +22,14 @@
#
# Usage:
# a) DEBUG build for testing.
-# qmake -r CONFIG+=debug PREFIX=/where/is/install/root/folder
+# qmake -r CONFIG+=debug PREFIX=C:\Program Files\RSS Guard
#
# b) RELEASE build for production use.
-# qmake -r CONFIG+=release PREFIX=/where/is/install/root/folder
+# qmake -r CONFIG+=release PREFIX=/usr
+#
+# Variables:
+# PREFIX - specifies parent folder structure under which installed files will really lie.
+# !!! This is usually needed on Linux and its typical value would be "/usr".
#
# Other information:
# - supports Windows, Linux,
@@ -42,9 +46,16 @@ TEMPLATE = app
TARGET = rssguard
DEFINES *= QT_USE_QSTRINGBUILDER
+message(rssguard: Welcome RSS Guard qmake script.)
+
+lessThan(QT_MAJOR_VERSION, 5)|lessThan(QT_MINOR_VERSION, 4) {
+ error(rssguard: At least Qt 5.4.0 is required.)
+}
+
APP_NAME = "RSS Guard"
APP_LOW_NAME = "rssguard"
APP_LOW_H_NAME = ".rssguard"
+APP_COPYRIGHT = "(C) 2011-2016 Martin Rotter"
APP_VERSION = "3.3.0"
APP_LONG_NAME = "$$APP_NAME $$APP_VERSION"
APP_AUTHOR = "Martin Rotter"
@@ -57,7 +68,12 @@ APP_URL_WIKI = "https://bitbucket.org/skunkos/rssguard/wiki/Hom
APP_USERAGENT = "RSS Guard/3.3.0 (http://bitbucket.org/skunkos/rssguard)"
APP_DONATE_URL = "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XMWPLPK893VH4"
+isEmpty(PREFIX) {
+ message(rssguard: PREFIX variable is not set. This might indicate error.)
+}
+
# Custom definitions.
+DEFINES += APP_PREFIX=\"$$PREFIX\"
DEFINES += APP_VERSION=\"$$APP_VERSION\"
DEFINES += APP_NAME=\"$$APP_NAME\"
DEFINES += APP_LOW_NAME=\"$$APP_LOW_NAME\"
@@ -72,29 +88,41 @@ DEFINES += APP_URL_ISSUES_NEW_BITBUCKET=\"$$APP_URL_ISSUES_NEW_BITBUCKET\"
DEFINES += APP_URL_WIKI=\"$$APP_URL_WIKI\"
DEFINES += APP_USERAGENT=\"$$APP_USERAGENT\"
DEFINES += APP_DONATE_URL=\"$$APP_DONATE_URL\"
+DEFINES += APP_SYSTEM_NAME=\"$$QMAKE_HOST.os\"
+DEFINES += APP_SYSTEM_VERSION=\"$$QMAKE_HOST.arch\"
CODECFORTR = UTF-8
CODECFORSRC = UTF-8
-message(rssguard: Welcomeo RSS Guard qmake script.)
-message(rssguard: RSS Guard version is: '$$APP_VERSION'.)
-message(rssguard: Detected Qt version: '$$QT_VERSION'.)
-message(rssguard: Destination directory: '$$PREFIX'.)
-
-lessThan(QT_MAJOR_VERSION, 5)|lessThan(QT_MINOR_VERSION, 4) {
- error(rssguard: At least Qt 5.4.0 is required.)
+exists(.git) {
+ APP_REVISION = $$system(git rev-parse --short HEAD)
}
-isEmpty(PREFIX) {
- error(rssguard: Variable PREFIX is not set.)
+isEmpty(APP_REVISION) {
+ APP_REVISION = "-"
}
+DEFINES += APP_REVISION=\"$$APP_REVISION\"
+
+message(rssguard: RSS Guard version is: $$APP_VERSION.)
+message(rssguard: Detected Qt version: $$QT_VERSION.)
message(rssguard: Build directory: '$$DESTDIR'.)
-message(rssguard: Install directory: '$$PREFIX'.)
+message(rssguard: Prefix directory: '$$PREFIX'.)
+message(rssguard: Build revision: '$$APP_REVISION'.)
QT += core gui widgets sql network xml printsupport
CONFIG += c++11 debug_and_release
+# Make needed tweaks for RC file getting generated on Windows.
+win32 {
+ VERSION = $$APP_VERSION
+ RC_ICONS = resources/graphics/rssguard.ico
+ QMAKE_TARGET_COMPANY = $$APP_AUTHOR
+ QMAKE_TARGET_DESCRIPTION = $$APP_NAME
+ QMAKE_TARGET_COPYRIGHT = $$APP_COPYRIGHT
+ QMAKE_TARGET_PRODUCT = $$APP_NAME
+}
+
HEADERS += src/core/feeddownloader.h \
src/core/feedsmodel.h \
src/core/feedsproxymodel.h \
@@ -450,12 +478,10 @@ win32 {
ico.files = resources/graphics/$${TARGET}.ico
ico.path = $$quote($$PREFIX/)
- app_icon.files = $$quote($$PREFIX/$${TARGET}.png)
- app_icon.extra = copy /y $$shell_quote($$shell_path($$PWD/resources/graphics/$${TARGET}_128.png)) $$shell_quote($$shell_path($$PREFIX/$${TARGET}.png))
+ app_icon.files = resources/graphics/$${TARGET}.png
app_icon.path = $$quote($$PREFIX/)
- app_plain_icon.files = $$quote($$PREFIX/$${TARGET}_plain.png)
- app_plain_icon.extra = copy /y $$shell_quote($$shell_path($$PWD/resources/graphics/$${TARGET}_plain_128.png)) $$shell_quote($$shell_path($$PREFIX/$${TARGET}_plain.png))
+ app_plain_icon.files = resources/graphics/$${TARGET}_plain.png
app_plain_icon.path = $$quote($$PREFIX/)
translations.files = $$OUT_PWD/*.qm
@@ -468,38 +494,38 @@ win32 {
# Install all files on Linux.
unix:!mac {
- target.path = $$PREFIX/usr/bin
+ target.path = $$PREFIX/bin
# Install SQL initializers.
misc_sql.files = resources/misc/*.sql
- misc_sql.path = $$quote($$PREFIX/usr/share/$$TARGET/misc/)
+ misc_sql.path = $$quote($$PREFIX/share/$$TARGET/misc/)
# Misc icons.
misc_icons.files = resources/graphics/misc/*.png
- misc_icons.path = $$quote($$PREFIX/usr/share/$$TARGET/icons/misc/)
+ misc_icons.path = $$quote($$PREFIX/share/$$TARGET/icons/misc/)
misc_flags.files = resources/graphics/misc/flags/*.png
- misc_flags.path = $$quote($$PREFIX/usr/share/$$TARGET/icons/misc/flags/)
+ misc_flags.path = $$quote($$PREFIX/share/$$TARGET/icons/misc/flags/)
# Initial feeds.
misc_feeds.files = resources/initial_feeds
- misc_feeds.path = $$quote($$PREFIX/usr/share/$$TARGET/)
+ misc_feeds.path = $$quote($$PREFIX/share/$$TARGET/)
misc_icon.files = $$quote($$OUT_PWD/$${TARGET}.png)
misc_icon.extra = cp $$quote($$PWD/resources/graphics/$${TARGET}_128.png) $$quote($$OUT_PWD/$${TARGET}.png)
- misc_icon.path = $$quote($$PREFIX/usr/share/pixmaps/)
+ misc_icon.path = $$quote($$PREFIX/share/pixmaps/)
misc_plain_icon.files = $$quote($$OUT_PWD/$${TARGET}_plain.png)
misc_plain_icon.extra = cp $$quote($$PWD/resources/graphics/$${TARGET}_plain_128.png) $$quote($$OUT_PWD/$${TARGET}_plain.png)
- misc_plain_icon.path = $$quote($$PREFIX/usr/share/$$TARGET/icons/)
+ misc_plain_icon.path = $$quote($$PREFIX/share/$$TARGET/icons/)
misc_texts.files = $$TEXTS
- misc_texts.path = $$quote($$PREFIX/usr/share/$$TARGET/information/)
+ misc_texts.path = $$quote($$PREFIX/share/$$TARGET/information/)
desktop_file.files = resources/desktop/$${TARGET}.desktop
- desktop_file.path = $$quote($$PREFIX/usr/share/applications/)
+ desktop_file.path = $$quote($$PREFIX/share/applications/)
translations.files = $$OUT_PWD/*.qm
- translations.path = $$quote($$PREFIX/usr/share/applications/)
+ translations.path = $$quote($$PREFIX/share/applications/)
INSTALLS += target misc_sql misc_icons misc_flags misc_feeds \
misc_icon misc_plain_icon misc_texts desktop_file translations
diff --git a/src/definitions/definitions.h b/src/definitions/definitions.h
index 7ebb59622..18d5542d1 100644
--- a/src/definitions/definitions.h
+++ b/src/definitions/definitions.h
@@ -118,12 +118,6 @@
#define APP_LOG_PATH "data/log"
#define APP_LOG_FILE "log.txt"
-#if defined(Q_OS_OSX)
-#define APP_PREFIX "rssguard.app/Contents/Resources"
-#else
-#define APP_PREFIX ".."
-#endif
-
#define APP_QUIT_INSTANCE "app_quit"
#define APP_IS_RUNNING "app_is_running"
#define APP_SKIN_DEFAULT "base/vergilius.xml"
@@ -213,16 +207,16 @@
#endif
#if defined(Q_OS_LINUX)
-#define APP_DESKTOP_ENTRY_PATH APP_PREFIX + QString("/share/applications")
+#define APP_DESKTOP_ENTRY_PATH STRFY(APP_PREFIX) + QString("/share/applications")
#define APP_DESKTOP_ENTRY_FILE "rssguard.desktop"
-#define APP_LANG_PATH APP_PREFIX + QString("/share/rssguard/l10n")
-#define APP_SKIN_PATH APP_PREFIX + QString("/share/rssguard/skins")
-#define APP_INFO_PATH APP_PREFIX + QString("/share/rssguard/information")
-#define APP_THEME_PATH APP_PREFIX + QString("/share/rssguard/icons")
-#define APP_MISC_PATH APP_PREFIX + QString("/share/rssguard/misc")
-#define APP_ICON_PATH APP_PREFIX + QString("/share/pixmaps/rssguard.png")
-#define APP_ICON_PLAIN_PATH APP_PREFIX + QString("/share/rssguard/icons/rssguard_plain.png")
-#define APP_INITIAL_FEEDS_PATH APP_PREFIX + QString("/share/rssguard/initial_feeds")
+#define APP_LANG_PATH STRFY(APP_PREFIX) + QString("/share/rssguard/l10n")
+#define APP_SKIN_PATH STRFY(APP_PREFIX) + QString("/share/rssguard/skins")
+#define APP_INFO_PATH STRFY(APP_PREFIX) + QString("/share/rssguard/information")
+#define APP_THEME_PATH STRFY(APP_PREFIX) + QString("/share/rssguard/icons")
+#define APP_MISC_PATH STRFY(APP_PREFIX) + QString("/share/rssguard/misc")
+#define APP_ICON_PATH STRFY(APP_PREFIX) + QString("/share/pixmaps/rssguard.png")
+#define APP_ICON_PLAIN_PATH STRFY(APP_PREFIX) + QString("/share/rssguard/icons/rssguard_plain.png")
+#define APP_INITIAL_FEEDS_PATH STRFY(APP_PREFIX) + QString("/share/rssguard/initial_feeds")
#elif defined(Q_OS_WIN)
#define APP_LANG_PATH QApplication::applicationDirPath() + QString("/l10n")
#define APP_SKIN_PATH QApplication::applicationDirPath() + QString("/skins")
diff --git a/src/gui/dialogs/formabout.cpp b/src/gui/dialogs/formabout.cpp
index e4ec1b64c..9d7d754e9 100755
--- a/src/gui/dialogs/formabout.cpp
+++ b/src/gui/dialogs/formabout.cpp
@@ -99,9 +99,13 @@ void FormAbout::loadLicenseAndInformation() {
// Set other informative texts.
m_ui->m_lblDesc->setText(tr("%8
"
- "Version: %1
"
- "Build date: %2
"
- "Qt: %3 (compiled against %4)
").arg(qApp->applicationVersion(),
+ "Version: %1 (built on %2/%3)
"
+ "Revision: %4
"
+ "Build date: %5
"
+ "Qt: %6 (compiled against %7)
").arg(qApp->applicationVersion(),
+ STRFY(APP_SYSTEM_NAME),
+ STRFY(APP_SYSTEM_VERSION),
+ STRFY(APP_REVISION),
TextFactory::parseDateTime(QString("%1 %2").arg(__DATE__,
__TIME__)).toString(Qt::DefaultLocaleShortDate),
qVersion(),