diff options
author | glowiak <52356948+glowiak@users.noreply.github.com> | 2022-02-16 18:36:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-16 18:36:28 +0100 |
commit | 45f89c625533b7e65b70aab1d96ae6eddcbe9051 (patch) | |
tree | 546fcf5723ead2d0d793c490d15d53f50c4e8c9c /buildconfig | |
parent | b1cf77e84780ce8b88599cde2e878a21019365d9 (diff) | |
parent | 2cd837896dc66344b53141325d76bcb045036abf (diff) | |
download | PrismLauncher-45f89c625533b7e65b70aab1d96ae6eddcbe9051.tar.gz PrismLauncher-45f89c625533b7e65b70aab1d96ae6eddcbe9051.tar.bz2 PrismLauncher-45f89c625533b7e65b70aab1d96ae6eddcbe9051.zip |
Merge branch 'develop' into patch-1
Diffstat (limited to 'buildconfig')
-rw-r--r-- | buildconfig/BuildConfig.cpp.in | 15 | ||||
-rw-r--r-- | buildconfig/BuildConfig.h | 9 |
2 files changed, 20 insertions, 4 deletions
diff --git a/buildconfig/BuildConfig.cpp.in b/buildconfig/BuildConfig.cpp.in index 2595f78b..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,24 +30,32 @@ 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@"; BUG_TRACKER_URL = "@Launcher_BUG_TRACKER_URL@"; + TRANSLATIONS_URL = "@Launcher_TRANSLATIONS_URL@"; DISCORD_URL = "@Launcher_DISCORD_URL@"; SUBREDDIT_URL = "@Launcher_SUBREDDIT_URL@"; } diff --git a/buildconfig/BuildConfig.h b/buildconfig/BuildConfig.h index d09d5288..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; @@ -83,6 +89,7 @@ public: QString META_URL; QString BUG_TRACKER_URL; + QString TRANSLATIONS_URL; QString DISCORD_URL; QString SUBREDDIT_URL; @@ -91,7 +98,7 @@ public: QString AUTH_BASE = "https://authserver.mojang.com/"; QString IMGUR_BASE_URL = "https://api.imgur.com/3/"; QString FMLLIBS_BASE_URL = "https://files.multimc.org/fmllibs/"; - QString TRANSLATIONS_BASE_URL = "https://files.multimc.org/translations/"; + QString TRANSLATIONS_BASE_URL = "https://meta.polymc.org/translations/"; QString MODPACKSCH_API_BASE_URL = "https://api.modpacks.ch/"; |