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)
endif()
if(NOT ENABLE_INNOEXTRACT)
add_definitions(-DVCMI_NO_INNOEXTRACT)
endif()
############################################
# Documentation section #
############################################

View File

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

View File

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