aboutsummaryrefslogtreecommitdiff
path: root/buildconfig
diff options
context:
space:
mode:
Diffstat (limited to 'buildconfig')
-rw-r--r--buildconfig/BuildConfig.cpp.in14
-rw-r--r--buildconfig/BuildConfig.h6
2 files changed, 17 insertions, 3 deletions
diff --git a/buildconfig/BuildConfig.cpp.in b/buildconfig/BuildConfig.cpp.in
index c71a4c7b..0ffc9326 100644
--- a/buildconfig/BuildConfig.cpp.in
+++ b/buildconfig/BuildConfig.cpp.in
@@ -12,6 +12,7 @@ Config::Config()
LAUNCHER_DOMAIN = "@Launcher_Domain@";
LAUNCHER_CONFIGFILE = "@Launcher_ConfigFile@";
LAUNCHER_GIT = "@Launcher_Git@";
+ LAUNCHER_DESKTOPFILENAME = "@Launcher_DesktopFileName@";
USER_AGENT = "@Launcher_UserAgent@";
USER_AGENT_UNCACHED = USER_AGENT + " (Uncached)";
@@ -29,19 +30,26 @@ 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@";
NEWS_RSS_URL = "@Launcher_NEWS_RSS_URL@";
+ NEWS_OPEN_URL = "@Launcher_NEWS_OPEN_URL@";
IMGUR_CLIENT_ID = "@Launcher_IMGUR_CLIENT_ID@";
MSA_CLIENT_ID = "@Launcher_MSA_CLIENT_ID@";
META_URL = "@Launcher_META_URL@";
diff --git a/buildconfig/BuildConfig.h b/buildconfig/BuildConfig.h
index a85da74e..111381ab 100644
--- a/buildconfig/BuildConfig.h
+++ b/buildconfig/BuildConfig.h
@@ -14,6 +14,7 @@ public:
QString LAUNCHER_DOMAIN;
QString LAUNCHER_CONFIGFILE;
QString LAUNCHER_GIT;
+ QString LAUNCHER_DESKTOPFILENAME;
/// The major version number.
int VERSION_MAJOR;
@@ -68,6 +69,11 @@ public:
QString NEWS_RSS_URL;
/**
+ * URL that gets opened when the user clicks "More News"
+ */
+ QString NEWS_OPEN_URL;
+
+ /**
* Client ID you can get from Imgur when you register an application
*/
QString IMGUR_CLIENT_ID;