diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-02-14 16:56:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-14 16:56:53 +0100 |
commit | 2cd837896dc66344b53141325d76bcb045036abf (patch) | |
tree | 7574c471e6ed02b27d5a9a5487c4b64f1ac5f6b8 /buildconfig | |
parent | 48c20f5aaa3fff0bb6b9b5b400f767f972fb43b5 (diff) | |
parent | 9ddbaaf7e8b844200b5d33c7b4702beaf201c55f (diff) | |
download | PrismLauncher-2cd837896dc66344b53141325d76bcb045036abf.tar.gz PrismLauncher-2cd837896dc66344b53141325d76bcb045036abf.tar.bz2 PrismLauncher-2cd837896dc66344b53141325d76bcb045036abf.zip |
Merge pull request #160 from Scrumplex/custom-be-gone
Diffstat (limited to 'buildconfig')
-rw-r--r-- | buildconfig/BuildConfig.cpp.in | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/buildconfig/BuildConfig.cpp.in b/buildconfig/BuildConfig.cpp.in index 5d5167ec..0ffc9326 100644 --- a/buildconfig/BuildConfig.cpp.in +++ b/buildconfig/BuildConfig.cpp.in @@ -30,15 +30,21 @@ Config::Config() GIT_COMMIT = "@Launcher_GIT_COMMIT@"; GIT_REFSPEC = "@Launcher_GIT_REFSPEC@"; - if(GIT_REFSPEC.startsWith("refs/heads/") && !UPDATER_BASE.isEmpty() && !BUILD_PLATFORM.isEmpty() && VERSION_BUILD >= 0) + if(GIT_REFSPEC.startsWith("refs/heads/")) { VERSION_CHANNEL = GIT_REFSPEC; VERSION_CHANNEL.remove("refs/heads/"); - UPDATER_ENABLED = true; + if(!UPDATER_BASE.isEmpty() && !BUILD_PLATFORM.isEmpty() && VERSION_BUILD >= 0) { + UPDATER_ENABLED = true; + } + } + else if (!GIT_COMMIT.isEmpty()) + { + VERSION_CHANNEL = GIT_COMMIT.mid(0, 8); } else { - VERSION_CHANNEL = QObject::tr("custom"); + VERSION_CHANNEL = QObject::tr("unknown"); } VERSION_STR = "@Launcher_VERSION_STRING@"; |