Save work.

This commit is contained in:
Martin Rotter 2016-06-01 13:43:50 +02:00
parent 686e17f04a
commit 9fe5765fb7
5 changed files with 68 additions and 44 deletions

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View file

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

@ -22,10 +22,14 @@
# #
# Usage: # Usage:
# a) DEBUG build for testing. # 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. # 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: # Other information:
# - supports Windows, Linux, # - supports Windows, Linux,
@ -42,9 +46,16 @@ TEMPLATE = app
TARGET = rssguard TARGET = rssguard
DEFINES *= QT_USE_QSTRINGBUILDER 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_NAME = "RSS Guard"
APP_LOW_NAME = "rssguard" APP_LOW_NAME = "rssguard"
APP_LOW_H_NAME = ".rssguard" APP_LOW_H_NAME = ".rssguard"
APP_COPYRIGHT = "(C) 2011-2016 Martin Rotter"
APP_VERSION = "3.3.0" APP_VERSION = "3.3.0"
APP_LONG_NAME = "$$APP_NAME $$APP_VERSION" APP_LONG_NAME = "$$APP_NAME $$APP_VERSION"
APP_AUTHOR = "Martin Rotter" 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_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" 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. # Custom definitions.
DEFINES += APP_PREFIX=\"$$PREFIX\"
DEFINES += APP_VERSION=\"$$APP_VERSION\" DEFINES += APP_VERSION=\"$$APP_VERSION\"
DEFINES += APP_NAME=\"$$APP_NAME\" DEFINES += APP_NAME=\"$$APP_NAME\"
DEFINES += APP_LOW_NAME=\"$$APP_LOW_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_URL_WIKI=\"$$APP_URL_WIKI\"
DEFINES += APP_USERAGENT=\"$$APP_USERAGENT\" DEFINES += APP_USERAGENT=\"$$APP_USERAGENT\"
DEFINES += APP_DONATE_URL=\"$$APP_DONATE_URL\" DEFINES += APP_DONATE_URL=\"$$APP_DONATE_URL\"
DEFINES += APP_SYSTEM_NAME=\"$$QMAKE_HOST.os\"
DEFINES += APP_SYSTEM_VERSION=\"$$QMAKE_HOST.arch\"
CODECFORTR = UTF-8 CODECFORTR = UTF-8
CODECFORSRC = UTF-8 CODECFORSRC = UTF-8
message(rssguard: Welcomeo RSS Guard qmake script.) exists(.git) {
message(rssguard: RSS Guard version is: '$$APP_VERSION'.) APP_REVISION = $$system(git rev-parse --short HEAD)
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.)
} }
isEmpty(PREFIX) { isEmpty(APP_REVISION) {
error(rssguard: Variable PREFIX is not set.) 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: 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 QT += core gui widgets sql network xml printsupport
CONFIG += c++11 debug_and_release 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 \ HEADERS += src/core/feeddownloader.h \
src/core/feedsmodel.h \ src/core/feedsmodel.h \
src/core/feedsproxymodel.h \ src/core/feedsproxymodel.h \
@ -450,12 +478,10 @@ win32 {
ico.files = resources/graphics/$${TARGET}.ico ico.files = resources/graphics/$${TARGET}.ico
ico.path = $$quote($$PREFIX/) ico.path = $$quote($$PREFIX/)
app_icon.files = $$quote($$PREFIX/$${TARGET}.png) app_icon.files = resources/graphics/$${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.path = $$quote($$PREFIX/) app_icon.path = $$quote($$PREFIX/)
app_plain_icon.files = $$quote($$PREFIX/$${TARGET}_plain.png) app_plain_icon.files = resources/graphics/$${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.path = $$quote($$PREFIX/) app_plain_icon.path = $$quote($$PREFIX/)
translations.files = $$OUT_PWD/*.qm translations.files = $$OUT_PWD/*.qm
@ -468,38 +494,38 @@ win32 {
# Install all files on Linux. # Install all files on Linux.
unix:!mac { unix:!mac {
target.path = $$PREFIX/usr/bin target.path = $$PREFIX/bin
# Install SQL initializers. # Install SQL initializers.
misc_sql.files = resources/misc/*.sql 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.
misc_icons.files = resources/graphics/misc/*.png 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.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. # Initial feeds.
misc_feeds.files = resources/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.files = $$quote($$OUT_PWD/$${TARGET}.png)
misc_icon.extra = cp $$quote($$PWD/resources/graphics/$${TARGET}_128.png) $$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.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.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.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.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.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 \ INSTALLS += target misc_sql misc_icons misc_flags misc_feeds \
misc_icon misc_plain_icon misc_texts desktop_file translations misc_icon misc_plain_icon misc_texts desktop_file translations

View file

@ -118,12 +118,6 @@
#define APP_LOG_PATH "data/log" #define APP_LOG_PATH "data/log"
#define APP_LOG_FILE "log.txt" #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_QUIT_INSTANCE "app_quit"
#define APP_IS_RUNNING "app_is_running" #define APP_IS_RUNNING "app_is_running"
#define APP_SKIN_DEFAULT "base/vergilius.xml" #define APP_SKIN_DEFAULT "base/vergilius.xml"
@ -213,16 +207,16 @@
#endif #endif
#if defined(Q_OS_LINUX) #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_DESKTOP_ENTRY_FILE "rssguard.desktop"
#define APP_LANG_PATH APP_PREFIX + QString("/share/rssguard/l10n") #define APP_LANG_PATH STRFY(APP_PREFIX) + QString("/share/rssguard/l10n")
#define APP_SKIN_PATH APP_PREFIX + QString("/share/rssguard/skins") #define APP_SKIN_PATH STRFY(APP_PREFIX) + QString("/share/rssguard/skins")
#define APP_INFO_PATH APP_PREFIX + QString("/share/rssguard/information") #define APP_INFO_PATH STRFY(APP_PREFIX) + QString("/share/rssguard/information")
#define APP_THEME_PATH APP_PREFIX + QString("/share/rssguard/icons") #define APP_THEME_PATH STRFY(APP_PREFIX) + QString("/share/rssguard/icons")
#define APP_MISC_PATH APP_PREFIX + QString("/share/rssguard/misc") #define APP_MISC_PATH STRFY(APP_PREFIX) + QString("/share/rssguard/misc")
#define APP_ICON_PATH APP_PREFIX + QString("/share/pixmaps/rssguard.png") #define APP_ICON_PATH STRFY(APP_PREFIX) + QString("/share/pixmaps/rssguard.png")
#define APP_ICON_PLAIN_PATH APP_PREFIX + QString("/share/rssguard/icons/rssguard_plain.png") #define APP_ICON_PLAIN_PATH STRFY(APP_PREFIX) + QString("/share/rssguard/icons/rssguard_plain.png")
#define APP_INITIAL_FEEDS_PATH APP_PREFIX + QString("/share/rssguard/initial_feeds") #define APP_INITIAL_FEEDS_PATH STRFY(APP_PREFIX) + QString("/share/rssguard/initial_feeds")
#elif defined(Q_OS_WIN) #elif defined(Q_OS_WIN)
#define APP_LANG_PATH QApplication::applicationDirPath() + QString("/l10n") #define APP_LANG_PATH QApplication::applicationDirPath() + QString("/l10n")
#define APP_SKIN_PATH QApplication::applicationDirPath() + QString("/skins") #define APP_SKIN_PATH QApplication::applicationDirPath() + QString("/skins")

View file

@ -99,9 +99,13 @@ void FormAbout::loadLicenseAndInformation() {
// Set other informative texts. // Set other informative texts.
m_ui->m_lblDesc->setText(tr("<b>%8</b><br>" m_ui->m_lblDesc->setText(tr("<b>%8</b><br>"
"<b>Version:</b> %1<br>" "<b>Version:</b> %1 (built on %2/%3)<br>"
"<b>Build date:</b> %2<br>" "<b>Revision:</b> %4<br>"
"<b>Qt:</b> %3 (compiled against %4)<br>").arg(qApp->applicationVersion(), "<b>Build date:</b> %5<br>"
"<b>Qt:</b> %6 (compiled against %7)<br>").arg(qApp->applicationVersion(),
STRFY(APP_SYSTEM_NAME),
STRFY(APP_SYSTEM_VERSION),
STRFY(APP_REVISION),
TextFactory::parseDateTime(QString("%1 %2").arg(__DATE__, TextFactory::parseDateTime(QString("%1 %2").arg(__DATE__,
__TIME__)).toString(Qt::DefaultLocaleShortDate), __TIME__)).toString(Qt::DefaultLocaleShortDate),
qVersion(), qVersion(),