mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-22 23:06:18 +00:00
Changed: Rerun Installer from a specific directory with right arguments
This commit is contained in:
parent
684afebf6b
commit
1c63238884
1 changed files with 6 additions and 2 deletions
|
@ -98,6 +98,10 @@ int main(int argc, char *argv[])
|
||||||
QApplication::setApplicationVersion(RYZOM_VERSION);
|
QApplication::setApplicationVersion(RYZOM_VERSION);
|
||||||
QApplication::setWindowIcon(QIcon(":/icons/ryzom.ico"));
|
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();
|
QLocale locale = QLocale::system();
|
||||||
|
|
||||||
// load application translations
|
// load application translations
|
||||||
|
@ -199,7 +203,7 @@ int main(int argc, char *argv[])
|
||||||
nlinfo("Launching %s", Q2C(tempFile));
|
nlinfo("Launching %s", Q2C(tempFile));
|
||||||
|
|
||||||
// launch copy in TEMP directory with same arguments
|
// 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));
|
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);
|
QFile::setPermissions(config.getInstallerInstalledFilePath(), QFile::permissions(config.getInstallerInstalledFilePath()) | QFile::ExeGroup | QFile::ExeUser | QFile::ExeOther);
|
||||||
#endif
|
#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()));
|
nlwarning("Unable to restart Installer %s", Q2C(config.getInstallerInstalledFilePath()));
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue