aboutsummaryrefslogtreecommitdiff
path: root/buildconfig
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-07-23 14:20:52 +0200
committerSefa Eyeoglu <contact@scrumplex.net>2022-08-12 14:22:24 +0200
commit1175461030f7bd90b69cb622f547879d76b54f3d (patch)
treeb2c0ac6d8a9ae7b72b3ac53704a797c24c092e9f /buildconfig
parent74120fe1f3b072b78298dce68aedb397efb522a2 (diff)
downloadPrismLauncher-1175461030f7bd90b69cb622f547879d76b54f3d.tar.gz
PrismLauncher-1175461030f7bd90b69cb622f547879d76b54f3d.tar.bz2
PrismLauncher-1175461030f7bd90b69cb622f547879d76b54f3d.zip
refactor: switch to new versioning scheme
The new versioning system is based on the versioning system used by the GNOME Foundation for the GNOME desktop. We are dropping the "major version" as defined by SemVer and move to a version number with a most and least significant number. The most significant number must be incremented, if there are new features or significant changes since last major release. Otherwise, the least significant number must be incremented, if there are only minor changes since the last release. New features or significant changes mustn't be introduced by a bump of the least significant number. If a minor change would introduce small user-facing changes (like a message-box or slight UI changes), it could still be classified as a minor change. At the end of the day, a human shall decide, if a change is minor or significant, as there is no clear line that would separate a "minor" and a "significant" change in a GUI-application. Definitions: feature: New user-facing functionality significant change: Something that changes user-facing behavior minor change: Something that fixes unexpected behavior Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'buildconfig')
-rw-r--r--buildconfig/BuildConfig.cpp.in14
-rw-r--r--buildconfig/BuildConfig.h10
2 files changed, 6 insertions, 18 deletions
diff --git a/buildconfig/BuildConfig.cpp.in b/buildconfig/BuildConfig.cpp.in
index 7da66f36..50e5e8a4 100644
--- a/buildconfig/BuildConfig.cpp.in
+++ b/buildconfig/BuildConfig.cpp.in
@@ -55,10 +55,9 @@ Config::Config()
// Version information
VERSION_MAJOR = @Launcher_VERSION_MAJOR@;
VERSION_MINOR = @Launcher_VERSION_MINOR@;
- VERSION_HOTFIX = @Launcher_VERSION_HOTFIX@;
- VERSION_BUILD = @Launcher_VERSION_BUILD@;
BUILD_PLATFORM = "@Launcher_BUILD_PLATFORM@";
+ BUILD_DATE = "@Launcher_BUILD_TIMESTAMP@";
UPDATER_BASE = "@Launcher_UPDATER_BASE@";
MAC_SPARKLE_PUB_KEY = "@MACOSX_SPARKLE_UPDATE_PUBLIC_KEY@";
@@ -85,7 +84,7 @@ Config::Config()
{
VERSION_CHANNEL = GIT_REFSPEC;
VERSION_CHANNEL.remove("refs/heads/");
- if(!UPDATER_BASE.isEmpty() && !BUILD_PLATFORM.isEmpty() && VERSION_BUILD >= 0) {
+ if(!UPDATER_BASE.isEmpty() && !BUILD_PLATFORM.isEmpty()) {
UPDATER_ENABLED = true;
}
}
@@ -98,7 +97,6 @@ Config::Config()
VERSION_CHANNEL = "unknown";
}
- VERSION_STR = "@Launcher_VERSION_STRING@";
NEWS_RSS_URL = "@Launcher_NEWS_RSS_URL@";
NEWS_OPEN_URL = "@Launcher_NEWS_OPEN_URL@";
HELP_URL = "@Launcher_HELP_URL@";
@@ -116,7 +114,7 @@ Config::Config()
QString Config::versionString() const
{
- return QString("%1.%2.%3").arg(VERSION_MAJOR).arg(VERSION_MINOR).arg(VERSION_HOTFIX);
+ return QString("%1.%2").arg(VERSION_MAJOR).arg(VERSION_MINOR);
}
QString Config::printableVersionString() const
@@ -128,11 +126,5 @@ QString Config::printableVersionString() const
{
vstr += "-" + VERSION_CHANNEL;
}
-
- // if a build number is set, also add it to the end
- if(VERSION_BUILD >= 0)
- {
- vstr += "+build." + QString::number(VERSION_BUILD);
- }
return vstr;
}
diff --git a/buildconfig/BuildConfig.h b/buildconfig/BuildConfig.h
index 95786d82..de66cec4 100644
--- a/buildconfig/BuildConfig.h
+++ b/buildconfig/BuildConfig.h
@@ -55,10 +55,6 @@ class Config {
int VERSION_MAJOR;
/// The minor version number.
int VERSION_MINOR;
- /// The hotfix number.
- int VERSION_HOTFIX;
- /// The build number.
- int VERSION_BUILD;
/**
* The version channel
@@ -71,6 +67,9 @@ class Config {
/// A short string identifying this build's platform. For example, "lin64" or "win32".
QString BUILD_PLATFORM;
+ /// A string containing the build timestamp
+ QString BUILD_DATE;
+
/// URL for the updater's channel
QString UPDATER_BASE;
@@ -95,9 +94,6 @@ class Config {
/// The git refspec of this build
QString GIT_REFSPEC;
- /// This is printed on start to standard output
- QString VERSION_STR;
-
/**
* This is used to fetch the news RSS feed.
* It defaults in CMakeLists.txt to "https://multimc.org/rss.xml"