|
|
|
@ -164,6 +164,11 @@ void Launcher::MainDialog::createPages()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool Launcher::MainDialog::showFirstRunDialog()
|
|
|
|
|
{
|
|
|
|
|
if (!setupLauncherSettings())
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
if (mLauncherSettings.value(QString("General/firstrun"), QString("true")) == QLatin1String("true"))
|
|
|
|
|
{
|
|
|
|
|
QMessageBox msgBox;
|
|
|
|
|
msgBox.setWindowTitle(tr("First run"));
|
|
|
|
@ -173,10 +178,12 @@ bool Launcher::MainDialog::showFirstRunDialog()
|
|
|
|
|
<p>It is recommended to run the Installation Wizard.</p> \
|
|
|
|
|
<p>The Wizard will let you select an existing Morrowind installation, \
|
|
|
|
|
or install Morrowind for OpenMW to use.</p></body></html>"));
|
|
|
|
|
|
|
|
|
|
QAbstractButton *wizardButton =
|
|
|
|
|
msgBox.addButton(tr("Run &Installation Wizard"), QMessageBox::AcceptRole); // ActionRole doesn't work?!
|
|
|
|
|
QAbstractButton *skipButton =
|
|
|
|
|
msgBox.addButton(tr("Skip"), QMessageBox::RejectRole);
|
|
|
|
|
|
|
|
|
|
Q_UNUSED(skipButton); // Surpress compiler unused warning
|
|
|
|
|
|
|
|
|
|
msgBox.exec();
|
|
|
|
@ -189,16 +196,13 @@ bool Launcher::MainDialog::showFirstRunDialog()
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
show();
|
|
|
|
|
return true;
|
|
|
|
|
return setup();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool Launcher::MainDialog::setup()
|
|
|
|
|
{
|
|
|
|
|
if (!setupLauncherSettings())
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
if (!setupGameSettings())
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
@ -214,17 +218,7 @@ bool Launcher::MainDialog::setup()
|
|
|
|
|
|
|
|
|
|
loadSettings();
|
|
|
|
|
|
|
|
|
|
// Check if we need to run the wizard
|
|
|
|
|
if (mLauncherSettings.value(QString("General/firstrun"), QString("true")) == QLatin1String("true"))
|
|
|
|
|
{
|
|
|
|
|
if (!showFirstRunDialog()) {
|
|
|
|
|
return false;
|
|
|
|
|
} else {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
show(); // Show ourselves if the wizard is not being run
|
|
|
|
|
show();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -629,6 +623,9 @@ void Launcher::MainDialog::wizardFinished(int exitCode, QProcess::ExitStatus exi
|
|
|
|
|
if (exitCode != 0 || exitStatus == QProcess::CrashExit)
|
|
|
|
|
return qApp->quit();
|
|
|
|
|
|
|
|
|
|
if (!setup())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
reloadSettings();
|
|
|
|
|
show();
|
|
|
|
|
}
|
|
|
|
|