diff --git a/src/app/app.pro b/src/app/app.pro index 1414e7d7fca..ed2de942343 100644 --- a/src/app/app.pro +++ b/src/app/app.pro @@ -23,9 +23,11 @@ win32 { # We need the version in two separate formats for the .rc file # RC_VERSION=4,3,82,0 (quadruple) # 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 \ - RC_VERSION_STRING=\\\"$${QTCREATOR_DISPLAY_VERSION}\\\" \ - RC_COPYRIGHT='"\\\"2008-$${QTCREATOR_COPYRIGHT_YEAR} The Qt Company Ltd\\\""' + RC_VERSION_STRING=\"$${QTCREATOR_DISPLAY_VERSION}\" \ + RC_COPYRIGHT=\"$$replace(COPYRIGHT, " ", "\\x20")\" RC_FILE = qtcreator.rc } else:macx { LIBS += -framework CoreFoundation diff --git a/src/app/app.qbs b/src/app/app.qbs index b3023fcbe74..b67ff28a2c4 100644 --- a/src/app/app.qbs +++ b/src/app/app.qbs @@ -54,9 +54,11 @@ QtcProduct { // We need the version in two separate formats for the .rc file // RC_VERSION=4,3,82,0 (quadruple) // 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", - "RC_VERSION_STRING=\"" + qtc.qtcreator_display_version + "\"", - "RC_COPYRIGHT=\"2008-" + qtc.qtcreator_copyright_year + " The Qt Company Ltd\""]) + "RC_VERSION_STRING=" + qtc.qtcreator_display_version, + "RC_COPYRIGHT=2008-" + qtc.qtcreator_copyright_year + + " The Qt Company Ltd".replace(/ /g, "\\x20")]) files: "qtcreator.rc" } diff --git a/src/app/qtcreator.rc b/src/app/qtcreator.rc index 89f03c4708c..bcc6e7f8ab8 100644 --- a/src/app/qtcreator.rc +++ b/src/app/qtcreator.rc @@ -1,5 +1,8 @@ #include +#define STRINGIFY1(x) #x +#define STRINGIFY(x) STRINGIFY1(x) + IDI_ICON1 ICON DISCARDABLE "qtcreator.ico" IDI_ICON2 ICON DISCARDABLE "winicons/c.ico" IDI_ICON3 ICON DISCARDABLE "winicons/cpp.ico" @@ -19,10 +22,10 @@ VS_VERSION_INFO VERSIONINFO BLOCK "040904E4" { VALUE "FileDescription", "Qt Creator" - VALUE "FileVersion", RC_VERSION_STRING + VALUE "FileVersion", STRINGIFY(RC_VERSION_STRING) VALUE "ProductName", "Qt Creator" - VALUE "ProductVersion", RC_VERSION_STRING - VALUE "LegalCopyright", RC_COPYRIGHT + VALUE "ProductVersion", STRINGIFY(RC_VERSION_STRING) + VALUE "LegalCopyright", STRINGIFY(RC_COPYRIGHT) } } BLOCK "VarFileInfo"