|
@@ -433,6 +433,11 @@ void PatchInstaller::startGame(bool remove_dat_files) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if (!FileSystem::fileExists(game_folder + "/LotroLauncher.exe")) {
|
|
|
+ qCritical() << __FUNCTION__ << "Starting game FAILED - LotroLauncher.exe not found!";
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
QStringList args;
|
|
|
args << "-nosplashscreen";
|
|
|
if (_current_applied_patches_info.loadscreens_patch_hashsum != "") {
|
|
@@ -460,18 +465,12 @@ void PatchInstaller::startGame(bool remove_dat_files) {
|
|
|
|
|
|
qDebug() << __FUNCTION__ << "Starting game with arguments: " << args;
|
|
|
|
|
|
- QFile f(Settings::getValue("Lotro/game_path").toString() + "/LotroLauncher.exe");
|
|
|
- QProcess process;
|
|
|
+ deinit();
|
|
|
|
|
|
- if (FileSystem::fileExists(f.fileName())) {
|
|
|
- if (f.fileName().contains(" ")) {
|
|
|
- f.setFileName("\"" + f.fileName() + "\"");
|
|
|
- }
|
|
|
- deinit();
|
|
|
- process.startDetached(f.fileName(), args);
|
|
|
- process.waitForFinished(-1);
|
|
|
- QMetaObject::invokeMethod(&LegacyApplication::instance(), &LegacyApplication::close, Qt::QueuedConnection);
|
|
|
- }
|
|
|
+ QProcess process;
|
|
|
+ process.startDetached(game_folder + "/LotroLauncher.exe", args, game_folder);
|
|
|
+ process.waitForFinished(-1);
|
|
|
+ QMetaObject::invokeMethod(&LegacyApplication::instance(), &LegacyApplication::close, Qt::QueuedConnection);
|
|
|
}
|
|
|
|
|
|
void PatchInstaller::startPatchInstallationChain(bool force_reinstall_patches) {
|