forked from qt-creator/qt-creator
Define COPYRIGHT_YEAR in build files
This allows us to use the copyright year also in the following patch that adds it as metadata to the windows executable. Ideally we'd unify IDE_YEAR and IDE_AUTHOR (because they're only used together anyway) but that would break translations. Change-Id: If0f84eaeb22e9ba71b2b29798324b76a91eda78f Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -17,6 +17,8 @@ Module {
|
||||
property string qtcreator_compat_version: ide_compat_version_major + '.'
|
||||
+ ide_compat_version_minor + '.' + ide_compat_version_release
|
||||
|
||||
property string qtcreator_copyright_year: '2017'
|
||||
|
||||
property string libDirName: "lib"
|
||||
property string ide_app_path: qbs.targetOS.contains("macos") ? "" : "bin"
|
||||
property string ide_app_target: qbs.targetOS.contains("macos") ? "Qt Creator" : "qtcreator"
|
||||
|
@@ -5,6 +5,7 @@ QTCREATOR_VERSION = 4.3.82
|
||||
QTCREATOR_COMPAT_VERSION = 4.3.82
|
||||
VERSION = $$QTCREATOR_VERSION
|
||||
QTCREATOR_DISPLAY_VERSION = 4.4.0-beta1
|
||||
QTCREATOR_COPYRIGHT_YEAR = 2017
|
||||
BINARY_ARTIFACTS_BRANCH = 4.4
|
||||
|
||||
CONFIG += c++14
|
||||
|
@@ -42,7 +42,7 @@ namespace Constants {
|
||||
const char * const IDE_VERSION_LONG = IDE_VERSION_STR;
|
||||
const char * const IDE_VERSION_DISPLAY = STRINGIFY(IDE_VERSION_DISPLAY_DEF);
|
||||
const char * const IDE_AUTHOR = \"The Qt Company Ltd\";
|
||||
const char * const IDE_YEAR = \"2017\";
|
||||
const char * const IDE_YEAR = \"$${QTCREATOR_COPYRIGHT_YEAR}\";
|
||||
|
||||
#ifdef IDE_REVISION
|
||||
const char * const IDE_REVISION_STR = STRINGIFY(IDE_REVISION);
|
||||
|
@@ -42,6 +42,8 @@ Product {
|
||||
+ product.moduleProperty("qtc", "ide_version_minor") + "\n");
|
||||
content = content.replace(/(\n#define IDE_VERSION_RELEASE) .+\n/, "$1 "
|
||||
+ product.moduleProperty("qtc", "ide_version_release") + "\n");
|
||||
content = content.replace(/(\n#define IDE_COPYRIGHT_YEAR) .+\n/, "$1 "
|
||||
+ product.moduleProperty("qtc", "qtcreator_copyright_year") + "\n");
|
||||
file = new TextFile(output.filePath, TextFile.WriteOnly);
|
||||
file.truncate();
|
||||
file.write(content);
|
||||
|
Reference in New Issue
Block a user