Browse Source

process of innoextract extraction

Laserlicht 1 year ago
parent
commit
2dfff3a53d
2 changed files with 8 additions and 2 deletions
  1. 7 1
      launcher/firstLaunch/firstlaunch_moc.cpp
  2. 1 1
      launcher/lib/innoextract

+ 7 - 1
launcher/firstLaunch/firstlaunch_moc.cpp

@@ -341,7 +341,13 @@ void FirstLaunchView::extractGogData()
 
 			o.preserve_file_times = true; // also correctly closes file -> without it: on Windows the files are not written completly
 
-			process_file(tmpFileExe.toStdString(), o);
+			this->setEnabled(false);
+			process_file(tmpFileExe.toStdString(), o, [this](float percent) {
+				ui->pushButtonGogInstall->setText(tr("Installing...") + " " + QString::number(static_cast<int>(percent * 100)) + "%");
+				ui->pushButtonGogInstall->update();
+				qApp->processEvents();
+			});
+			this->setEnabled(true);
 
 			QStringList dirData = tempDir.entryList({"data"}, QDir::Filter::Dirs);
 			if(dirData.empty() || QDir(tempDir.filePath(dirData.front())).entryList({"*.lod"}, QDir::Filter::Files).empty())

+ 1 - 1
launcher/lib/innoextract

@@ -1 +1 @@
-Subproject commit 46adb5762331aa3f19113fe09c72fc2d37caf90c
+Subproject commit 9977089412ebafe9f79936aa65a2edf16a84ae3e