summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--BuildConfig.cpp.in51
-rw-r--r--BuildConfig.h23
-rw-r--r--gui/dialogs/AboutDialog.cpp3
-rw-r--r--gui/dialogs/AboutDialog.ui40
4 files changed, 38 insertions, 79 deletions
diff --git a/BuildConfig.cpp.in b/BuildConfig.cpp.in
index 1ea07374..04cfbf05 100644
--- a/BuildConfig.cpp.in
+++ b/BuildConfig.cpp.in
@@ -1,4 +1,5 @@
#include "BuildConfig.h"
+#include <QObject>
Config BuildConfig;
@@ -9,16 +10,7 @@ Config::Config()
VERSION_MINOR = @MultiMC_VERSION_MINOR@;
VERSION_HOTFIX = @MultiMC_VERSION_HOTFIX@;
VERSION_BUILD = @MultiMC_VERSION_BUILD@;
- VERSION_TYPE = "@MultiMC_VERSION_TYPE@";
-
- if(VERSION_TYPE == "Release")
- versionTypeEnum = Release;
- else if(VERSION_TYPE == "ReleaseCandidate")
- versionTypeEnum = ReleaseCandidate;
- else if(VERSION_TYPE == "Development")
- versionTypeEnum = Development;
- else
- versionTypeEnum = Custom;
+
VERSION_CHANNEL = "@MultiMC_VERSION_CHANNEL@";
BUILD_PLATFORM = "@MultiMC_BUILD_PLATFORM@";
CHANLIST_URL = "@MultiMC_CHANLIST_URL@";
@@ -33,22 +25,6 @@ Config::Config()
NEWS_RSS_URL = "@MultiMC_NEWS_RSS_URL@";
}
-QString Config::versionTypeName() const
-{
- switch (versionTypeEnum)
- {
- case Release:
- return "Stable Release";
- case ReleaseCandidate:
- return "Release Candidate";
- case Development:
- return "Development";
- case Custom:
- default:
- return "Custom";
- }
-}
-
QString Config::printableVersionString() const
{
QString vstr = QString("%1.%2").arg(QString::number(VERSION_MAJOR), QString::number(VERSION_MINOR));
@@ -56,8 +32,25 @@ QString Config::printableVersionString() const
if (VERSION_HOTFIX > 0) vstr += "." + QString::number(VERSION_HOTFIX);
// If the build is a development build or release candidate, add that info to the end.
- if (versionTypeEnum == Development) vstr += "-dev" + QString::number(VERSION_BUILD);
- else if (versionTypeEnum == ReleaseCandidate) vstr += "-rc" + QString::number(VERSION_BUILD);
-
+ if(VERSION_CHANNEL == "stable")
+ {
+ return vstr;
+ }
+ else if(VERSION_CHANNEL == "develop")
+ {
+ vstr += "-dev-" + QString::number(VERSION_BUILD);
+ }
+ else if(VERSION_CHANNEL == "unstable")
+ {
+ vstr += "-nuke-" + QString::number(VERSION_BUILD);
+ }
+ else if(VERSION_CHANNEL == "custom")
+ {
+ vstr += "-local";
+ }
+ else
+ {
+ vstr += "-" + VERSION_CHANNEL + "-" + QString::number(VERSION_BUILD);
+ }
return vstr;
}
diff --git a/BuildConfig.h b/BuildConfig.h
index baf2ad6d..60aefeb4 100644
--- a/BuildConfig.h
+++ b/BuildConfig.h
@@ -16,24 +16,6 @@ public:
int VERSION_HOTFIX;
/// The build number.
int VERSION_BUILD;
- /// The build type, as specified at build time.
- QString VERSION_TYPE;
-
- /// The build type, transformed.
- enum Type
- {
- /// Version type for stable release builds.
- Release,
-
- /// Version type for release candidates.
- ReleaseCandidate,
-
- /// Version type for development builds.
- Development,
-
- /// Version type for custom builds. This is the default when no version type is specified.
- Custom
- } versionTypeEnum;
/**
* The version channel
@@ -76,11 +58,6 @@ public:
* \return The version number in string format (major.minor.revision.build).
*/
QString printableVersionString() const;
-
- /**
- * returns a string representation of the version channel type, suitable for printing.
- */
- QString versionTypeName() const;
};
extern Config BuildConfig;
diff --git a/gui/dialogs/AboutDialog.cpp b/gui/dialogs/AboutDialog.cpp
index 6b31113c..e15da142 100644
--- a/gui/dialogs/AboutDialog.cpp
+++ b/gui/dialogs/AboutDialog.cpp
@@ -82,10 +82,9 @@ AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDia
ui->urlLabel->setOpenExternalLinks(true);
ui->icon->setPixmap(MMC->getThemedIcon("multimc").pixmap(64));
- ui->title->setText("MultiMC 5 " + BuildConfig.printableVersionString());
+ ui->title->setText("MultiMC 5");
ui->versionLabel->setText(tr("Version") +": " + BuildConfig.printableVersionString());
- ui->vtypeLabel->setText(tr("Version Type") +": " + BuildConfig.versionTypeName());
ui->platformLabel->setText(tr("Platform") +": " + BuildConfig.BUILD_PLATFORM);
if (BuildConfig.VERSION_BUILD >= 0)
diff --git a/gui/dialogs/AboutDialog.ui b/gui/dialogs/AboutDialog.ui
index caeaf544..2b5f8b78 100644
--- a/gui/dialogs/AboutDialog.ui
+++ b/gui/dialogs/AboutDialog.ui
@@ -100,8 +100,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>689</width>
- <height>311</height>
+ <width>695</width>
+ <height>297</height>
</rect>
</property>
<attribute name="label">
@@ -119,16 +119,6 @@
</widget>
</item>
<item>
- <widget class="QLabel" name="vtypeLabel">
- <property name="text">
- <string>Version Type:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- <item>
<widget class="QLabel" name="platformLabel">
<property name="text">
<string>Platform:</string>
@@ -225,8 +215,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>689</width>
- <height>311</height>
+ <width>695</width>
+ <height>297</height>
</rect>
</property>
<attribute name="label">
@@ -242,7 +232,7 @@
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Bitstream Vera Sans'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Oxygen-Sans'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textInteractionFlags">
@@ -267,8 +257,8 @@ p, li { white-space: pre-wrap; }
<rect>
<x>0</x>
<y>0</y>
- <width>689</width>
- <height>311</height>
+ <width>695</width>
+ <height>297</height>
</rect>
</property>
<attribute name="label">
@@ -481,8 +471,8 @@ p, li { white-space: pre-wrap; }
<rect>
<x>0</x>
<y>0</y>
- <width>689</width>
- <height>311</height>
+ <width>695</width>
+ <height>297</height>
</rect>
</property>
<attribute name="label">
@@ -495,12 +485,12 @@ p, li { white-space: pre-wrap; }
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Bitstream Vera Sans'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;We keep MultiMC open source because we think it's important to be able to see the source code for a project like this, and we do so using the Apache license.&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Part of the reason for using the Apache license is we don't want people using the &amp;quot;MultiMC&amp;quot; name when redistributing the project. This means people must take the time to go through the source code and remove all references to &amp;quot;MultiMC&amp;quot;, including but not limited to the project icon and the title of windows, (no *MultiMC-fork* in the title).&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The Apache license covers reasonable use for the name - a mention of the project's origins in the About dialog and the license is acceptable. However, it should be abundantly clear that the project is a fork &lt;span style=&quot; font-weight:600;&quot;&gt;without&lt;/span&gt; implying that you have our blessing.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Oxygen-Sans'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Bitstream Vera Sans';&quot;&gt;We keep MultiMC open source because we think it's important to be able to see the source code for a project like this, and we do so using the Apache license.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Bitstream Vera Sans';&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Bitstream Vera Sans';&quot;&gt;Part of the reason for using the Apache license is we don't want people using the &amp;quot;MultiMC&amp;quot; name when redistributing the project. This means people must take the time to go through the source code and remove all references to &amp;quot;MultiMC&amp;quot;, including but not limited to the project icon and the title of windows, (no *MultiMC-fork* in the title).&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Bitstream Vera Sans';&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Bitstream Vera Sans';&quot;&gt;The Apache license covers reasonable use for the name - a mention of the project's origins in the About dialog and the license is acceptable. However, it should be abundantly clear that the project is a fork &lt;/span&gt;&lt;span style=&quot; font-family:'Bitstream Vera Sans'; font-weight:600;&quot;&gt;without&lt;/span&gt;&lt;span style=&quot; font-family:'Bitstream Vera Sans';&quot;&gt; implying that you have our blessing.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>