Test builds use settings key of oscar-test, branch builds oscar-branch, and release builds just oscar. Default data directory named similarly.

This commit is contained in:
Seeker4 2019-08-12 16:02:53 -07:00
parent 3492323216
commit e315baf6df

View File

@ -90,23 +90,35 @@ const QString getDeveloperDomain()
const QString getAppName() const QString getAppName()
{ {
QString name = STR_AppName; QString name = STR_AppName;
if ((GIT_BRANCH != "master") ||
(!((ReleaseStatus.compare("r", Qt::CaseInsensitive)==0) || // Append branch if there is a branch specified
(ReleaseStatus.compare("rc", Qt::CaseInsensitive)==0) || if (GIT_BRANCH != "master") {
(ReleaseStatus.compare("beta", Qt::CaseInsensitive)==0)))) {
name += "-"+GIT_BRANCH; name += "-"+GIT_BRANCH;
// qDebug() << "getAppName, not master, name is" << name << "branch is" << GIT_BRANCH;
} }
// Append "-test" if not release
else if (!((ReleaseStatus.compare("r", Qt::CaseInsensitive)==0) ||
(ReleaseStatus.compare("rc", Qt::CaseInsensitive)==0) )) {
name += "-test";
// qDebug() << "getAppName, not release, name is" << name << "release type is" << ReleaseStatus;
}
return name; return name;
} }
const QString getModifiedAppData() const QString getModifiedAppData()
{ {
QString appdata = STR_AppData; QString appdata = STR_AppData;
if ((GIT_BRANCH != "master") ||
(!((ReleaseStatus.compare("r", Qt::CaseInsensitive)==0) || // Append branch if there is a branch specified
(ReleaseStatus.compare("rc", Qt::CaseInsensitive)==0) || if (GIT_BRANCH != "master")
(ReleaseStatus.compare("beta", Qt::CaseInsensitive)==0)))) {
appdata += "-"+GIT_BRANCH; appdata += "-"+GIT_BRANCH;
// Append "-test" if not release
else if (!((ReleaseStatus.compare("r", Qt::CaseInsensitive)==0) ||
(ReleaseStatus.compare("rc", Qt::CaseInsensitive)==0) )) {
appdata += "-test";
} }
return appdata; return appdata;
} }
@ -230,7 +242,7 @@ QStringList makeBuildInfo (QString relinfo, QString forcedEngine){
branch = QObject::tr("Branch:") + " " + GIT_BRANCH + ", "; branch = QObject::tr("Branch:") + " " + GIT_BRANCH + ", ";
} }
buildInfo << branch + (QObject::tr("Revision")) + " " + GIT_REVISION; buildInfo << branch + (QObject::tr("Revision")) + " " + GIT_REVISION;
if (GIT_BRANCH != "master") if (getAppName() != STR_AppName) // Report any non-standard app key
buildInfo << (QObject::tr("App key:") + " " + getAppName()); buildInfo << (QObject::tr("App key:") + " " + getAppName());
buildInfo << QString(""); buildInfo << QString("");
buildInfo << (QObject::tr("Operating system:") + " " + QSysInfo::prettyProductName()); buildInfo << (QObject::tr("Operating system:") + " " + QSysInfo::prettyProductName());