2013-12-08 20:35:57 +00:00
|
|
|
#include "conclusionpage.hpp"
|
|
|
|
|
2013-12-13 12:38:49 +00:00
|
|
|
#include <QDebug>
|
|
|
|
|
|
|
|
#include "mainwizard.hpp"
|
|
|
|
|
2014-04-18 11:17:37 +00:00
|
|
|
Wizard::ConclusionPage::ConclusionPage(QWidget* parent)
|
|
|
|
: QWizardPage(parent)
|
2013-12-08 20:35:57 +00:00
|
|
|
{
|
2014-04-18 11:17:37 +00:00
|
|
|
mWizard = qobject_cast<MainWizard*>(parent);
|
|
|
|
|
2013-12-08 20:35:57 +00:00
|
|
|
setupUi(this);
|
2014-03-29 10:57:25 +00:00
|
|
|
setPixmap(QWizard::WatermarkPixmap, QPixmap(QLatin1String(":/images/intropage-background.png")));
|
2013-12-08 20:35:57 +00:00
|
|
|
}
|
2013-12-08 21:58:29 +00:00
|
|
|
|
2013-12-13 12:38:49 +00:00
|
|
|
void Wizard::ConclusionPage::initializePage()
|
|
|
|
{
|
2014-03-17 20:33:44 +00:00
|
|
|
// Write the path to openmw.cfg
|
2017-08-09 05:20:49 +00:00
|
|
|
if (field(QLatin1String("installation.retailDisc")).toBool() == true)
|
|
|
|
{
|
2014-03-17 20:33:44 +00:00
|
|
|
QString path(field(QLatin1String("installation.path")).toString());
|
|
|
|
mWizard->addInstallation(path);
|
|
|
|
}
|
2014-02-25 14:33:30 +00:00
|
|
|
|
|
|
|
if (!mWizard->mError)
|
|
|
|
{
|
2017-08-09 05:20:49 +00:00
|
|
|
if ((field(QLatin1String("installation.retailDisc")).toBool() == true)
|
2014-03-17 13:31:05 +00:00
|
|
|
|| (field(QLatin1String("installation.import-settings")).toBool() == true))
|
2014-02-25 14:33:30 +00:00
|
|
|
{
|
|
|
|
qDebug() << "IMPORT SETTINGS";
|
|
|
|
mWizard->runSettingsImporter();
|
|
|
|
}
|
2014-02-18 11:44:27 +00:00
|
|
|
}
|
|
|
|
|
2014-01-28 00:03:47 +00:00
|
|
|
if (!mWizard->mError)
|
2013-12-13 12:38:49 +00:00
|
|
|
{
|
2017-08-09 05:20:49 +00:00
|
|
|
if (field(QLatin1String("installation.retailDisc")).toBool() == true)
|
2014-01-28 00:03:47 +00:00
|
|
|
{
|
|
|
|
textLabel->setText(
|
2023-12-24 14:44:50 +00:00
|
|
|
tr("<html><head/><body><p>The OpenMW Wizard successfully installed Morrowind on your "
|
|
|
|
"computer.</p></body></html>"));
|
2014-01-28 00:03:47 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2023-11-29 05:28:40 +00:00
|
|
|
textLabel->setText(
|
|
|
|
tr("<html><head/><body><p>The OpenMW Wizard successfully modified your existing Morrowind "
|
2023-12-24 14:44:50 +00:00
|
|
|
"installation.</body></html>"));
|
2014-01-28 00:03:47 +00:00
|
|
|
}
|
2013-12-13 12:38:49 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2014-01-28 00:03:47 +00:00
|
|
|
textLabel->setText(
|
2023-11-29 05:28:40 +00:00
|
|
|
tr("<html><head/><body><p>The OpenMW Wizard failed to install Morrowind on your computer.</p>"
|
|
|
|
"<p>Please report any bugs you might have encountered to our "
|
|
|
|
"<a href=\"https://gitlab.com/OpenMW/openmw/issues\">bug tracker</a>.<br/>Make sure to include the "
|
|
|
|
"installation log.</p><br/></body></html>"));
|
2013-12-13 12:38:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-08 21:58:29 +00:00
|
|
|
int Wizard::ConclusionPage::nextId() const
|
|
|
|
{
|
|
|
|
return -1;
|
|
|
|
}
|