diff options
author | Kai Koehne <kai.koehne@qt.io> | 2017-07-25 09:03:08 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@qt.io> | 2017-07-25 09:05:43 +0000 |
commit | 68fe72e99abebd4602103b523b6c46eabaf3c667 (patch) | |
tree | fc7f5cda6425b4f51f021088a66ccac3dfd6e9fe | |
parent | 3ed88cda2f44ce97569f59c4d83dc930016af92b (diff) |
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>
-rw-r--r-- | qbs/modules/qtc/qtc.qbs | 2 | ||||
-rw-r--r-- | qtcreator.pri | 1 | ||||
-rw-r--r-- | src/app/app_version.h.in | 2 | ||||
-rw-r--r-- | src/app/app_version_header.qbs | 2 |
4 files changed, 6 insertions, 1 deletions
diff --git a/qbs/modules/qtc/qtc.qbs b/qbs/modules/qtc/qtc.qbs index 1d9e0deac2..ab1c2aee8a 100644 --- a/qbs/modules/qtc/qtc.qbs +++ b/qbs/modules/qtc/qtc.qbs @@ -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" diff --git a/qtcreator.pri b/qtcreator.pri index 24853d5ba2..7a94a1595d 100644 --- a/qtcreator.pri +++ b/qtcreator.pri @@ -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 diff --git a/src/app/app_version.h.in b/src/app/app_version.h.in index 19bff44d49..97fd0735a4 100644 --- a/src/app/app_version.h.in +++ b/src/app/app_version.h.in @@ -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); diff --git a/src/app/app_version_header.qbs b/src/app/app_version_header.qbs index 5730be7542..e6903d6cc5 100644 --- a/src/app/app_version_header.qbs +++ b/src/app/app_version_header.qbs @@ -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); |