Skip to content

Commit

Permalink
Define VERSION in project file to generate correct Windows RC file
Browse files Browse the repository at this point in the history
  • Loading branch information
Ri0n committed Jul 26, 2017
1 parent 2e288a7 commit 7bc2e9b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 3 deletions.
8 changes: 7 additions & 1 deletion configure
Expand Up @@ -2084,9 +2084,15 @@ public:
bool exec()
{
QString version = psiGetVersion();
QRegExp verre("^\\\\d+(?:\\\\.\\\\d+)+");
if (verre.indexIn(version) == -1) {
conf->debug("Failed to parse version file");
return false;
}
conf->addExtra(QString("PSI_VERSION = %1").arg(verre.cap(0)));
QHash<QString,QString> vars;
vars["VERSION"] = version;
QDir::current().mkpath("mac");
psiGenerateFile(sourceDir + "/mac/Info.plist.in", "mac/Info.plist", vars);
Expand Down
Binary file modified configure.exe
Binary file not shown.
3 changes: 2 additions & 1 deletion psi.pro
Expand Up @@ -20,7 +20,8 @@ OTHER_FILES += options/default.xml \
options/windows.xml \
client_icons.txt \
version \
TODO
TODO \
qcm/*.qcm

webkit {
OTHER_FILES += themes/chatview/util.js \
Expand Down
8 changes: 7 additions & 1 deletion qcm/conf.qcm
Expand Up @@ -38,9 +38,15 @@ public:
bool exec()
{
QString version = psiGetVersion();
QRegExp verre("^\\d+(?:\\.\\d+)+");
if (verre.indexIn(version) == -1) {
conf->debug("Failed to parse version file");
return false;
}
conf->addExtra(QString("PSI_VERSION = %1").arg(verre.cap(0)));

QHash<QString,QString> vars;
vars["VERSION"] = version;

QDir::current().mkpath("mac");
psiGenerateFile(sourceDir + "/mac/Info.plist.in", "mac/Info.plist", vars);

Expand Down
5 changes: 5 additions & 0 deletions src/src.pro
Expand Up @@ -163,6 +163,11 @@ RESOURCES += ../psi.qrc ../iconsets.qrc
# Platform specifics
windows {
RC_ICONS = ../win32/app.ico
VERSION = $$PSI_VERSION
QMAKE_TARGET_PRODUCT = "Psi"
QMAKE_TARGET_COMPANY = psi-im.org
QMAKE_TARGET_DESCRIPTION = "A cross-platform XMPP client designed for the power user."
QMAKE_TARGET_COPYRIGHT = "GNU GPL v2"
}
mac {
# Universal binaries
Expand Down

0 comments on commit 7bc2e9b

Please sign in to comment.