ソースを参照

inverse flag; simplify

Laserlicht 1 年間 前
コミット
44a31910e3
3 ファイル変更5 行追加8 行削除
  1. 0 4
      CMakeLists.txt
  2. 1 0
      launcher/CMakeLists.txt
  3. 4 4
      launcher/firstLaunch/firstlaunch_moc.cpp

+ 0 - 4
CMakeLists.txt

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

+ 1 - 0
launcher/CMakeLists.txt

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

+ 4 - 4
launcher/firstLaunch/firstlaunch_moc.cpp

@@ -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();