mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 01:09:50 +00:00
Changed: Rerun Installer from a specific directory with right arguments
--HG-- branch : develop
This commit is contained in:
parent
a9c3982d21
commit
f9117d8e94
1 changed files with 6 additions and 2 deletions
|
@ -98,6 +98,10 @@ int main(int argc, char *argv[])
|
|||
QApplication::setApplicationVersion(RYZOM_VERSION);
|
||||
QApplication::setWindowIcon(QIcon(":/icons/ryzom.ico"));
|
||||
|
||||
// remove first argument because it's not really an argument
|
||||
QStringList args = QApplication::arguments();
|
||||
args.removeFirst();
|
||||
|
||||
QLocale locale = QLocale::system();
|
||||
|
||||
// load application translations
|
||||
|
@ -199,7 +203,7 @@ int main(int argc, char *argv[])
|
|||
nlinfo("Launching %s", Q2C(tempFile));
|
||||
|
||||
// launch copy in TEMP directory with same arguments
|
||||
if (QProcess::startDetached(tempFile, QApplication::arguments())) return 0;
|
||||
if (QProcess::startDetached(tempFile, args, tempPath)) return 0;
|
||||
|
||||
nlwarning("Unable to launch %s", Q2C(tempFile));
|
||||
}
|
||||
|
@ -309,7 +313,7 @@ int main(int argc, char *argv[])
|
|||
QFile::setPermissions(config.getInstallerInstalledFilePath(), QFile::permissions(config.getInstallerInstalledFilePath()) | QFile::ExeGroup | QFile::ExeUser | QFile::ExeOther);
|
||||
#endif
|
||||
|
||||
if (QProcess::startDetached(config.getInstallerInstalledFilePath())) return 0;
|
||||
if (QProcess::startDetached(config.getInstallerInstalledFilePath(), args, config.getInstallationDirectory())) return 0;
|
||||
|
||||
nlwarning("Unable to restart Installer %s", Q2C(config.getInstallerInstalledFilePath()));
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue