Have Mac and Linux use install wizard destination as fs_basepath

This commit is contained in:
Zack Middleton 2015-01-04 14:14:33 -06:00
parent ed18c08161
commit 32cd52895b
3 changed files with 13 additions and 7 deletions

View file

@ -46,6 +46,7 @@ InstallWizard::InstallWizard(QWidget *parent, Settings *settings) :
ui->setupUi(this); ui->setupUi(this);
connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel())); connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
connect(this, SIGNAL(finished(int)), this, SLOT(finished(int)));
setPage(Page_Setup, new InstallWizard_Setup(this, settings)); setPage(Page_Setup, new InstallWizard_Setup(this, settings));
setPage(Page_Eula, new InstallWizard_Eula(this)); setPage(Page_Eula, new InstallWizard_Eula(this));
@ -111,14 +112,10 @@ void InstallWizard::cancel()
reject(); reject();
} }
void InstallWizard::on_InstallWizard_finished(int result) void InstallWizard::finished(int result)
{ {
#ifdef Q_OS_WIN32
if (result == QDialog::Accepted) if (result == QDialog::Accepted)
{ {
settings->setQuakePath(quakePath); settings->setQuakePath(quakePath);
} }
#else
result = result; // Silence warning.
#endif
} }

View file

@ -62,7 +62,7 @@ public:
private slots: private slots:
void cancel(); void cancel();
void on_InstallWizard_finished(int result); void finished(int result);
private: private:
Ui::InstallWizard *ui; Ui::InstallWizard *ui;

View file

@ -102,7 +102,9 @@ void ioLaunch::on_btnLaunch_clicked()
} }
ioq3 = QString("\"") + settings.getQuakePath() + "/ioquake3.x86.exe\""; ioq3 = QString("\"") + settings.getQuakePath() + "/ioquake3.x86.exe\"";
#elif defined Q_OS_MAC #else
#if defined Q_OS_MAC
ioq3 = "open -a ioquake3 --args"; ioq3 = "open -a ioquake3 --args";
#elif defined Q_OS_UNIX #elif defined Q_OS_UNIX
ioq3 = "ioquake3"; ioq3 = "ioquake3";
@ -110,6 +112,13 @@ void ioLaunch::on_btnLaunch_clicked()
#error "Unsupported platform" #error "Unsupported platform"
#endif #endif
QString quakePath = settings.getQuakePath();
if ( !quakePath.isEmpty() )
{
ioq3 += QString(" +set fs_basepath \"%1\"").arg(quakePath);
}
#endif
int r_mode = settings.getResolutionMode(); int r_mode = settings.getResolutionMode();
int r_width = settings.getResolutionWidth(); int r_width = settings.getResolutionWidth();
int r_height = settings.getResolutionHeight(); int r_height = settings.getResolutionHeight();