1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

inverse flag; simplify

This commit is contained in:
Laserlicht 2024-04-16 22:23:41 +02:00 committed by GitHub
parent e4b59f34d1
commit 44a31910e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 8 deletions

View File

@ -193,10 +193,6 @@ else()
endmacro(enable_pch) endmacro(enable_pch)
endif() endif()
if(NOT ENABLE_INNOEXTRACT)
add_definitions(-DVCMI_NO_INNOEXTRACT)
endif()
############################################ ############################################
# Documentation section # # Documentation section #
############################################ ############################################

View File

@ -1,5 +1,6 @@
if(ENABLE_INNOEXTRACT) if(ENABLE_INNOEXTRACT)
add_subdirectory("lib/innoextract") add_subdirectory("lib/innoextract")
add_definitions(-DENABLE_INNOEXTRACT)
endif() endif()
set(launcher_SRCS set(launcher_SRCS

View File

@ -21,7 +21,7 @@
#include "../../lib/filesystem/Filesystem.h" #include "../../lib/filesystem/Filesystem.h"
#include "../languages.h" #include "../languages.h"
#ifndef VCMI_NO_INNOEXTRACT #ifdef ENABLE_INNOEXTRACT
#include "cli/extract.hpp" #include "cli/extract.hpp"
#endif #endif
@ -37,7 +37,7 @@ FirstLaunchView::FirstLaunchView(QWidget * parent)
ui->lineEditDataSystem->setText(pathToQString(boost::filesystem::absolute(VCMIDirs::get().dataPaths().front()))); ui->lineEditDataSystem->setText(pathToQString(boost::filesystem::absolute(VCMIDirs::get().dataPaths().front())));
ui->lineEditDataUser->setText(pathToQString(boost::filesystem::absolute(VCMIDirs::get().userDataPath()))); ui->lineEditDataUser->setText(pathToQString(boost::filesystem::absolute(VCMIDirs::get().userDataPath())));
#ifdef VCMI_NO_INNOEXTRACT #ifndef ENABLE_INNOEXTRACT
ui->pushButtonGogInstall->hide(); ui->pushButtonGogInstall->hide();
#endif #endif
} }
@ -295,7 +295,7 @@ QString FirstLaunchView::getHeroesInstallDir()
void FirstLaunchView::extractGogData() void FirstLaunchView::extractGogData()
{ {
#ifndef VCMI_NO_INNOEXTRACT #ifdef ENABLE_INNOEXTRACT
QString filterExe = tr("GOG executable") + " (*.exe)"; QString filterExe = tr("GOG executable") + " (*.exe)";
QString fileExe = QFileDialog::getOpenFileName(this, tr("Select a GOG installer (exe) file..."), QDir::homePath(), filterExe); QString fileExe = QFileDialog::getOpenFileName(this, tr("Select a GOG installer (exe) file..."), QDir::homePath(), filterExe);
if(fileExe.isEmpty()) if(fileExe.isEmpty())
@ -309,7 +309,7 @@ void FirstLaunchView::extractGogData()
QTimer::singleShot(100, this, [this, fileExe, fileBin](){ // background to make sure FileDialog is closed... QTimer::singleShot(100, this, [this, fileExe, fileBin](){ // background to make sure FileDialog is closed...
QTemporaryDir dir; QTemporaryDir dir;
if(dir.isValid()) { if(dir.isValid()) {
QDir tempDir = QDir(dir.path()); QDir tempDir{dir.path()};
ui->pushButtonGogInstall->setText(tr("Installing... Please wait!")); ui->pushButtonGogInstall->setText(tr("Installing... Please wait!"));
QPalette pal = ui->pushButtonGogInstall->palette(); QPalette pal = ui->pushButtonGogInstall->palette();