forked from qt-creator/qt-creator
Add name, version as metadata to Windows executable
The description and version is seen e.g. in the file dialogs, but also in the task manager and crash dialogs. Change-Id: I65f7076a55ecbdcaa6b7c9ab57fecaab59bcaa08 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
@@ -20,6 +20,12 @@ QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH)
|
||||
include($$QT_BREAKPAD_ROOT_PATH/qtbreakpad.pri)
|
||||
}
|
||||
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)
|
||||
DEFINES += RC_VERSION=$$replace(QTCREATOR_VERSION, "\\.", ","),0 \
|
||||
RC_VERSION_STRING=\\\"$${QTCREATOR_DISPLAY_VERSION}\\\" \
|
||||
RC_COPYRIGHT='"\\\"2008-$${QTCREATOR_COPYRIGHT_YEAR} The Qt Company Ltd\\\""'
|
||||
RC_FILE = qtcreator.rc
|
||||
} else:macx {
|
||||
LIBS += -framework CoreFoundation
|
||||
|
@@ -41,7 +41,6 @@ QtcProduct {
|
||||
"Info.plist",
|
||||
"main.cpp",
|
||||
"qtcreator.xcassets",
|
||||
"qtcreator.rc",
|
||||
"../shared/qtsingleapplication/qtsingleapplication.h",
|
||||
"../shared/qtsingleapplication/qtsingleapplication.cpp",
|
||||
"../shared/qtsingleapplication/qtlocalpeer.h",
|
||||
@@ -51,6 +50,16 @@ QtcProduct {
|
||||
"../tools/qtcreatorcrashhandler/crashhandlersetup.h"
|
||||
]
|
||||
|
||||
Group {
|
||||
// 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)
|
||||
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\""])
|
||||
files: "qtcreator.rc"
|
||||
}
|
||||
|
||||
Group {
|
||||
name: "qtcreator.sh"
|
||||
condition: qbs.targetOS.contains("unix") && !qbs.targetOS.contains("macos")
|
||||
|
@@ -1,3 +1,5 @@
|
||||
#include <windows.h>
|
||||
|
||||
IDI_ICON1 ICON DISCARDABLE "qtcreator.ico"
|
||||
IDI_ICON2 ICON DISCARDABLE "winicons/c.ico"
|
||||
IDI_ICON3 ICON DISCARDABLE "winicons/cpp.ico"
|
||||
@@ -6,3 +8,25 @@ IDI_ICON5 ICON DISCARDABLE "winicons/ui.ico"
|
||||
IDI_ICON6 ICON DISCARDABLE "winicons/pro.ico"
|
||||
IDI_ICON7 ICON DISCARDABLE "winicons/pri.ico"
|
||||
IDI_ICON8 ICON DISCARDABLE "winicons/qml.ico"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION RC_VERSION
|
||||
PRODUCTVERSION RC_VERSION
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
// U.S. English - Windows, Multilingual
|
||||
BLOCK "040904E4"
|
||||
{
|
||||
VALUE "FileDescription", "Qt Creator"
|
||||
VALUE "FileVersion", RC_VERSION_STRING
|
||||
VALUE "ProductName", "Qt Creator"
|
||||
VALUE "ProductVersion", RC_VERSION_STRING
|
||||
VALUE "LegalCopyright", RC_COPYRIGHT
|
||||
}
|
||||
}
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 0x409, 1252 // 1252 = 0x04E4
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user