forked from qt-creator/qt-creator
Fix compilation breakage with mingw / windres
The replacement of string defines in the .rc file that was introduced in commit b5703bcd029fd does not work with windres. Here the string literals have to be explicitly quoted by STRINGIFY. Also, we need to replace literal spaces with \x20. Task-number: QTCREATORBUG-18635 Change-Id: Ie01886ea680c3c07c4e0a031f12b6fe60e896263 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -23,9 +23,11 @@ win32 {
|
|||||||
# We need the version in two separate formats for the .rc file
|
# We need the version in two separate formats for the .rc file
|
||||||
# RC_VERSION=4,3,82,0 (quadruple)
|
# RC_VERSION=4,3,82,0 (quadruple)
|
||||||
# RC_VERSION_STRING="4.4.0-beta1" (free text)
|
# RC_VERSION_STRING="4.4.0-beta1" (free text)
|
||||||
|
# Also, we need to replace space with \x20 to be able to work with both rc and windres
|
||||||
|
COPYRIGHT = "2008-$${QTCREATOR_COPYRIGHT_YEAR} The Qt Company Ltd"
|
||||||
DEFINES += RC_VERSION=$$replace(QTCREATOR_VERSION, "\\.", ","),0 \
|
DEFINES += RC_VERSION=$$replace(QTCREATOR_VERSION, "\\.", ","),0 \
|
||||||
RC_VERSION_STRING=\\\"$${QTCREATOR_DISPLAY_VERSION}\\\" \
|
RC_VERSION_STRING=\"$${QTCREATOR_DISPLAY_VERSION}\" \
|
||||||
RC_COPYRIGHT='"\\\"2008-$${QTCREATOR_COPYRIGHT_YEAR} The Qt Company Ltd\\\""'
|
RC_COPYRIGHT=\"$$replace(COPYRIGHT, " ", "\\x20")\"
|
||||||
RC_FILE = qtcreator.rc
|
RC_FILE = qtcreator.rc
|
||||||
} else:macx {
|
} else:macx {
|
||||||
LIBS += -framework CoreFoundation
|
LIBS += -framework CoreFoundation
|
||||||
|
@@ -54,9 +54,11 @@ QtcProduct {
|
|||||||
// We need the version in two separate formats for the .rc file
|
// We need the version in two separate formats for the .rc file
|
||||||
// RC_VERSION=4,3,82,0 (quadruple)
|
// RC_VERSION=4,3,82,0 (quadruple)
|
||||||
// RC_VERSION_STRING="4.4.0-beta1" (free text)
|
// RC_VERSION_STRING="4.4.0-beta1" (free text)
|
||||||
|
// Also, we need to replace space with \x20 to be able to work with both rc and windres
|
||||||
cpp.defines: outer.concat(["RC_VERSION=" + qtc.qtcreator_version.replace(/\./g, ",") + ",0",
|
cpp.defines: outer.concat(["RC_VERSION=" + qtc.qtcreator_version.replace(/\./g, ",") + ",0",
|
||||||
"RC_VERSION_STRING=\"" + qtc.qtcreator_display_version + "\"",
|
"RC_VERSION_STRING=" + qtc.qtcreator_display_version,
|
||||||
"RC_COPYRIGHT=\"2008-" + qtc.qtcreator_copyright_year + " The Qt Company Ltd\""])
|
"RC_COPYRIGHT=2008-" + qtc.qtcreator_copyright_year
|
||||||
|
+ " The Qt Company Ltd".replace(/ /g, "\\x20")])
|
||||||
files: "qtcreator.rc"
|
files: "qtcreator.rc"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,5 +1,8 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
#define STRINGIFY1(x) #x
|
||||||
|
#define STRINGIFY(x) STRINGIFY1(x)
|
||||||
|
|
||||||
IDI_ICON1 ICON DISCARDABLE "qtcreator.ico"
|
IDI_ICON1 ICON DISCARDABLE "qtcreator.ico"
|
||||||
IDI_ICON2 ICON DISCARDABLE "winicons/c.ico"
|
IDI_ICON2 ICON DISCARDABLE "winicons/c.ico"
|
||||||
IDI_ICON3 ICON DISCARDABLE "winicons/cpp.ico"
|
IDI_ICON3 ICON DISCARDABLE "winicons/cpp.ico"
|
||||||
@@ -19,10 +22,10 @@ VS_VERSION_INFO VERSIONINFO
|
|||||||
BLOCK "040904E4"
|
BLOCK "040904E4"
|
||||||
{
|
{
|
||||||
VALUE "FileDescription", "Qt Creator"
|
VALUE "FileDescription", "Qt Creator"
|
||||||
VALUE "FileVersion", RC_VERSION_STRING
|
VALUE "FileVersion", STRINGIFY(RC_VERSION_STRING)
|
||||||
VALUE "ProductName", "Qt Creator"
|
VALUE "ProductName", "Qt Creator"
|
||||||
VALUE "ProductVersion", RC_VERSION_STRING
|
VALUE "ProductVersion", STRINGIFY(RC_VERSION_STRING)
|
||||||
VALUE "LegalCopyright", RC_COPYRIGHT
|
VALUE "LegalCopyright", STRINGIFY(RC_COPYRIGHT)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
Reference in New Issue
Block a user