summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/MainWindow.cpp12
-rw-r--r--gui/dialogs/AboutDialog.cpp17
2 files changed, 15 insertions, 14 deletions
diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp
index 480ee3b1..e4d28ca3 100644
--- a/gui/MainWindow.cpp
+++ b/gui/MainWindow.cpp
@@ -17,6 +17,7 @@
* limitations under the License.
*/
#include "MultiMC.h"
+#include "Config.h"
#include "MainWindow.h"
#include "ui_MainWindow.h"
@@ -107,9 +108,9 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
MultiMCPlatform::fixWM_CLASS(this);
ui->setupUi(this);
- QString winTitle = QString("MultiMC 5 - Version %1").arg(MMC->version().toString());
- if (!MMC->version().platform.isEmpty())
- winTitle += " on " + MMC->version().platform;
+ QString winTitle = QString("MultiMC 5 - Version %1").arg(BuildConfig.printableVersionString());
+ if (!BuildConfig.BUILD_PLATFORM.isEmpty())
+ winTitle += " on " + BuildConfig.BUILD_PLATFORM;
setWindowTitle(winTitle);
// OSX magic.
@@ -709,9 +710,8 @@ void MainWindow::downloadUpdates(QString repo, int versionId, bool installOnExit
if (updateDlg.exec(&updateTask))
{
UpdateFlags baseFlags = None;
-#ifdef MultiMC_UPDATER_DRY_RUN
- baseFlags |= DryRun;
-#endif
+ if(BuildConfig.UPDATER_DRY_RUN)
+ baseFlags |= DryRun;
if (installOnExit)
MMC->installUpdates(updateTask.updateFilesDir(), baseFlags | OnExit);
else
diff --git a/gui/dialogs/AboutDialog.cpp b/gui/dialogs/AboutDialog.cpp
index 35c85815..944a61c8 100644
--- a/gui/dialogs/AboutDialog.cpp
+++ b/gui/dialogs/AboutDialog.cpp
@@ -18,6 +18,7 @@
#include <QIcon>
#include "MultiMC.h"
#include "gui/Platform.h"
+#include "Config.h"
AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDialog)
{
@@ -27,19 +28,19 @@ AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDia
ui->urlLabel->setOpenExternalLinks(true);
ui->icon->setPixmap(QIcon(":/icons/multimc/scalable/apps/multimc.svg").pixmap(64));
- ui->title->setText("MultiMC 5 " + MMC->version().toString());
+ ui->title->setText("MultiMC 5 " + BuildConfig.printableVersionString());
- ui->versionLabel->setText(tr("Version") +": " + MMC->version().toString());
- ui->vtypeLabel->setText(tr("Version Type") +": " + MMC->version().typeName());
- ui->platformLabel->setText(tr("Platform") +": " + MMC->version().platform);
+ ui->versionLabel->setText(tr("Version") +": " + BuildConfig.printableVersionString());
+ ui->vtypeLabel->setText(tr("Version Type") +": " + BuildConfig.versionTypeName());
+ ui->platformLabel->setText(tr("Platform") +": " + BuildConfig.BUILD_PLATFORM);
- if (MMC->version().build >= 0)
- ui->buildNumLabel->setText(tr("Build Number") +": " + QString::number(MMC->version().build));
+ if (BuildConfig.VERSION_BUILD >= 0)
+ ui->buildNumLabel->setText(tr("Build Number") +": " + QString::number(BuildConfig.VERSION_BUILD));
else
ui->buildNumLabel->setVisible(false);
- if (!MMC->version().channel.isEmpty())
- ui->channelLabel->setText(tr("Channel") +": " + MMC->version().channel);
+ if (!BuildConfig.VERSION_CHANNEL.isEmpty())
+ ui->channelLabel->setText(tr("Channel") +": " + BuildConfig.VERSION_CHANNEL);
else
ui->channelLabel->setVisible(false);