From cbb05e8bfd163d645c82fb23b8835577117b589e Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 16 May 2016 14:52:16 +0200 Subject: [PATCH] Changed: Launch upgd_nl.bat/sh script after extracting BNP client files --- .../ryzom_installer/src/operationdialog.cpp | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp b/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp index f7f953d6c..923c01aec 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp @@ -358,8 +358,37 @@ void COperationDialog::extractBnpClient() CFilesExtractor extractor(this); extractor.setSourceFile(config->getSrcServerClientBNPFullPath()); - extractor.setDesinationDirectory(config->getInstallationDirectory() + "/" + server.id); + extractor.setDesinationDirectory(destinationDirectory); extractor.exec(); + + QString upgradeScript = destinationDirectory + "/upgd_nl."; + +#ifdef Q_OS_WIN + upgradeScript += "bat"; +#else + upgradeScript += "sh"; +#endif + + if (QFile::exists(upgradeScript)) + { + QProcess process; + + QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); + env.insert("RYZOM_CLIENT", QDir::toNativeSeparators(destinationDirectory + "/ryzom_client_r.exe")); + env.insert("UNPACKPATH", QDir::toNativeSeparators(destinationDirectory + "/unpack")); + env.insert("ROOTPATH", QDir::toNativeSeparators(destinationDirectory)); + env.insert("STARTUPPATH", ""); + process.setProcessEnvironment(env); + + process.start(upgradeScript); + + while (process.waitForFinished()) + { + qDebug() << "waiting"; + } + } + + emit done(); } void COperationDialog::cleanFiles()