add brand QtCreator to something else feature

- this patch enables branding QtCreator to something else
   excluding the logo icons which will follow in a later patch
 - qtcreator_ide_branding.pri is always included, so only
   need to write the values we want to override in a
   IDE_BRANDING_PRI file
 - if there is no BINARY_ARTIFACTS_BRANCH it won't checkout
   that repository

Task-number: QTCREATORBUG-22226
Change-Id: I592b40025cc53988224770b704622874f2174593
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Tim Jenssen
2019-04-30 18:54:03 +02:00
parent b32c1453b4
commit 8000a3e70b
7 changed files with 39 additions and 17 deletions

View File

@@ -1,18 +1,11 @@
!isEmpty(QTCREATOR_PRI_INCLUDED):error("qtcreator.pri already included")
QTCREATOR_PRI_INCLUDED = 1
QTCREATOR_VERSION = 4.9.82
QTCREATOR_COMPAT_VERSION = 4.9.82
include($$PWD/qtcreator_ide_branding.pri)
!isEmpty(IDE_BRANDING_PRI): include($$IDE_BRANDING_PRI)
PRODUCT_BUNDLE_IDENTIFIER=$${PRODUCT_BUNDLE_ORGANIZATION}.$${IDE_ID}
VERSION = $$QTCREATOR_VERSION
QTCREATOR_DISPLAY_VERSION = 4.10.0-beta1
QTCREATOR_COPYRIGHT_YEAR = 2019
BINARY_ARTIFACTS_BRANCH = master
isEmpty(IDE_DISPLAY_NAME): IDE_DISPLAY_NAME = Qt Creator
isEmpty(IDE_ID): IDE_ID = qtcreator
isEmpty(IDE_CASED_ID): IDE_CASED_ID = QtCreator
isEmpty(PRODUCT_BUNDLE_IDENTIFIER): PRODUCT_BUNDLE_IDENTIFIER = org.qt-project.$$IDE_ID
CONFIG += c++14

View File

@@ -124,7 +124,7 @@ macx {
BINDIST_EXCLUDE_ARG.debug = $${BINDIST_EXCLUDE_ARG.release}
deployqt.commands = python -u $$PWD/scripts/deployqt.py -i \"$(INSTALL_ROOT)$$QTC_PREFIX/bin/$${IDE_APP_TARGET}\" \"$(QMAKE)\"
deployqt.depends = install
win32 {
win32:!isEmpty(BINARY_ARTIFACTS_BRANCH) {
deployartifacts.depends = install
deployartifacts.commands = git clone --depth 1 -b $$BINARY_ARTIFACTS_BRANCH \
"http://code.qt.io/qt-creator/binary-artifacts.git" \

View File

@@ -0,0 +1,12 @@
QTCREATOR_VERSION = 4.9.82
QTCREATOR_COMPAT_VERSION = 4.9.82
QTCREATOR_DISPLAY_VERSION = 4.10.0-beta1
QTCREATOR_COPYRIGHT_YEAR = 2019
BINARY_ARTIFACTS_BRANCH = master
IDE_DISPLAY_NAME = Qt Creator
IDE_ID = qtcreator
IDE_CASED_ID = QtCreator
PRODUCT_BUNDLE_ORGANIZATION = org.qt-project
PROJECT_USER_FILE_EXTENSION = .user

View File

@@ -23,7 +23,10 @@ win32 {
# 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 \
APPLICATION_NAME = "$${IDE_DISPLAY_NAME}"
DEFINES += \
RC_APPLICATION_NAME=\"$$replace(APPLICATION_NAME, " ", "\\x20")\" \
RC_VERSION=$$replace(QTCREATOR_VERSION, "\\.", ","),0 \
RC_VERSION_STRING=\"$${QTCREATOR_DISPLAY_VERSION}\" \
RC_COPYRIGHT=\"$$replace(COPYRIGHT, " ", "\\x20")\"
RC_FILE = qtcreator.rc

View File

@@ -21,9 +21,9 @@ VS_VERSION_INFO VERSIONINFO
// U.S. English - Windows, Multilingual
BLOCK "040904E4"
{
VALUE "FileDescription", "Qt Creator"
VALUE "FileDescription", STRINGIFY(RC_APPLICATION_NAME)
VALUE "FileVersion", STRINGIFY(RC_VERSION_STRING)
VALUE "ProductName", "Qt Creator"
VALUE "ProductName", STRINGIFY(RC_APPLICATION_NAME)
VALUE "ProductVersion", STRINGIFY(RC_VERSION_STRING)
VALUE "LegalCopyright", STRINGIFY(RC_COPYRIGHT)
}

View File

@@ -350,3 +350,7 @@ journald {
RESOURCES += projectexplorer.qrc
DEFINES += PROJECTEXPLORER_LIBRARY
!isEmpty(PROJECT_USER_FILE_EXTENSION) {
DEFINES += PROJECT_USER_FILE_EXTENSION=$${PROJECT_USER_FILE_EXTENSION}
}

View File

@@ -52,6 +52,16 @@ const char OBSOLETE_VERSION_KEY[] = "ProjectExplorer.Project.Updater.FileVersion
const char SHARED_SETTINGS[] = "SharedSettings";
const char USER_STICKY_KEYS_KEY[] = "UserStickyKeys";
#ifdef PROJECT_USER_FILE_EXTENSION
#define STRINGIFY_INTERNAL(x) #x
#define STRINGIFY(x) STRINGIFY_INTERNAL(x)
const char FILE_EXTENSION_STR[] = STRINGIFY(PROJECT_USER_FILE_EXTENSION);
#else
const char FILE_EXTENSION_STR[] = ".user";
#endif
// Version 14 Move builddir into BuildConfiguration
class UserFileVersion14Upgrader : public VersionUpgrader
{
@@ -379,7 +389,7 @@ FileName UserFileAccessor::projectUserFile() const
{
static const QString qtcExt = QLatin1String(qgetenv("QTC_EXTENSION"));
FileName projectUserFile = m_project->projectFilePath();
projectUserFile.appendString(generateSuffix(qtcExt.isEmpty() ? ".user" : qtcExt));
projectUserFile.appendString(generateSuffix(qtcExt.isEmpty() ? PROJECT_USER_FILE_EXTENSION_STR : qtcExt));
return projectUserFile;
}
@@ -387,7 +397,7 @@ FileName UserFileAccessor::externalUserFile() const
{
static const QString qtcExt = QFile::decodeName(qgetenv("QTC_EXTENSION"));
return externalUserFilePath(m_project->projectFilePath(),
generateSuffix(qtcExt.isEmpty() ? ".user" : qtcExt));
generateSuffix(qtcExt.isEmpty() ? PROJECT_USER_FILE_EXTENSION_STR : qtcExt));
}
FileName UserFileAccessor::sharedFile() const