diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 95ad342..348d9aa 100755 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -590,7 +590,7 @@ void MainWindow::on_launchGame_pushButton_clicked(bool returnTooltip, QString ex #if defined Q_OS_MACOS out << "\"" + launcherfolder + "/../Resources/" + gameName + "\" -iwad \"" + ui->iwad_comboBox->itemData(ui->iwad_comboBox->currentIndex(), Qt::ToolTipRole).toString() + "\" " + argStrComplete; -#elif Q_OS_LINUX +#elif defined Q_OS_LINUX out << "\"" + launcherfolder + "/" + gameName + "\" -iwad \"" + ui->iwad_comboBox->itemData(ui->iwad_comboBox->currentIndex(), Qt::ToolTipRole).toString() + "\" " + argStrComplete; #else std::replace(launcherfolder.begin(), launcherfolder.end(), '/', '\\'); @@ -613,7 +613,7 @@ void MainWindow::on_launchGame_pushButton_clicked(bool returnTooltip, QString ex QClipboard *clip = QApplication::clipboard(); #if defined Q_OS_MACOS clip->setText("\"" + launcherfolder + "/../Resources/" + gameName + "\" -iwad \"" + ui->iwad_comboBox->itemData(ui->iwad_comboBox->currentIndex(), Qt::ToolTipRole).toString() + "\" " + argStrComplete); -#elif Q_OS_LINUX +#elif define Q_OS_LINUX clip->setText("\"" + launcherfolder + "/" + gameName + "\" -iwad \"" + ui->iwad_comboBox->itemData(ui->iwad_comboBox->currentIndex(), Qt::ToolTipRole).toString() + "\" " + argStrComplete); #else std::replace(launcherfolder.begin(), launcherfolder.end(), '/', '\\'); @@ -664,7 +664,7 @@ void MainWindow::Launch(QStringList arguments) { QMessageBox::warning(this, "dsda-launcher", gameName + " was not found in dsda-launcher.app/Contents/Resources/" + gameName); } -#elif Q_OS_LINUX +#elif defined Q_OS_LINUX QFile port = QFile(launcherfolder + "/" + gameName); QString homePath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation); // Run "which" command to check if dsda-doom exists. if it does then no need to specify a path, just run a process with gameName. diff --git a/src/mainwindow_actions.cpp b/src/mainwindow_actions.cpp index 9adef7e..4d8f773 100644 --- a/src/mainwindow_actions.cpp +++ b/src/mainwindow_actions.cpp @@ -91,7 +91,7 @@ void MainWindow::on_actionCheckForUpdatesDsdadoom_triggered() #if defined Q_OS_MACOS path = launcherfolder + "/../Resources/" + gameName; -#elif Q_OS_LINUX +#elif defined Q_OS_LINUX path = launcherfolder + "/" + gameName; #else path = launcherfolder + "\\" + gameName + ".exe"; diff --git a/src/mainwindow_bottom.cpp b/src/mainwindow_bottom.cpp index 30ee55f..8f3e9d6 100644 --- a/src/mainwindow_bottom.cpp +++ b/src/mainwindow_bottom.cpp @@ -16,7 +16,7 @@ void MainWindow::on_additionalArguments_pushButton_clicked() #if defined Q_OS_MACOS path = launcherfolder + "/../Resources/" + gameName; -#elif Q_OS_LINUX +#elif defined Q_OS_LINUX path = launcherfolder + "/" + gameName; #else path = launcherfolder + "\\" + gameName + ".exe"; @@ -29,7 +29,7 @@ void MainWindow::on_additionalArguments_pushButton_clicked() QProcess *process = new QProcess; process->startDetached("sh", {"-c", "echo \"" + path + " --help ; rm /tmp/dsda-doom-params.sh\" > /tmp/dsda-doom-params.sh ; chmod +x /tmp/dsda-doom-params.sh ; open -a Terminal /tmp/dsda-doom-params.sh"}); process->deleteLater(); -#elif Q_OS_WIN +#elif defined Q_OS_WIN system(("start cmd.exe /k \"" + path.toStdString() + "\" --help").c_str()); #else // xterm is the most reliable terminal to use, but it seems a few distros do not have it diff --git a/src/settings.cpp b/src/settings.cpp index 4a6164c..4025772 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -195,7 +195,7 @@ void Settings::on_darkTheme_checkBox_clicked(bool checked) "QPushButton:pressed{border: 1px solid rgb(120, 120, 120); border-radius:7px; background-color: rgb(75, 75, 75); color: rgb(150, 150, 150)}"); ui->IWADFolders_pushButton->setStyleSheet("QPushButton{border: 1px solid rgb(120, 120, 120); border-radius:7px; background-color: rgb(50, 50, 50); color: rgb(150, 150, 150)}" "QPushButton:pressed{border: 1px solid rgb(120, 120, 120); border-radius:7px; background-color: rgb(75, 75, 75); color: rgb(150, 150, 150)}"); -#elif Q_OS_LINUX +#elif defined Q_OS_LINUX QPalette darkPalette; darkPalette.setColor(QPalette::Window, QColor(53, 53, 53)); darkPalette.setColor(QPalette::WindowText, Qt::white); @@ -213,7 +213,7 @@ void Settings::on_darkTheme_checkBox_clicked(bool checked) qApp->setPalette(darkPalette); qApp->setStyleSheet("QToolTip { color: #ffffff; background-color: #2a82da; border: 1px solid white; }"); -#elif Q_OS_WIN +#elif defined Q_OS_WIN qApp->setStyleSheet("* {color: rgb(221, 221, 221);background: rgb(53, 53, 53);}" "QLabel {border: none; margin: 0px;background-color: rgba(50, 50, 50, 0);font: 13px}" "QLabel::disabled {color: rgb(120, 120, 120);}"