mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-17 04:51:52 +00:00
Changed: Only copy installer in TEMP if uninstalling
--HG-- branch : develop
This commit is contained in:
parent
fb4461f00b
commit
6d1e72c748
1 changed files with 17 additions and 17 deletions
|
@ -61,23 +61,6 @@ int main(int argc, char *argv[])
|
|||
QApplication::setApplicationVersion(RYZOM_VERSION);
|
||||
QApplication::setWindowIcon(QIcon(":/icons/ryzom.ico"));
|
||||
|
||||
#if defined(Q_OS_WIN) && !defined(_DEBUG)
|
||||
QString tempPath = QStandardPaths::writableLocation(QStandardPaths::TempLocation);
|
||||
|
||||
// check if launched from TEMP directory
|
||||
if (QApplication::applicationDirPath() != tempPath)
|
||||
{
|
||||
// copy installer and required files to TEMP directory
|
||||
if (copyInstallerExecutable(tempPath))
|
||||
{
|
||||
QString tempFile = tempPath + "/" + QFileInfo(QApplication::applicationFilePath()).fileName();
|
||||
|
||||
// launch copy in TEMP directory with same arguments
|
||||
if (QProcess::startDetached(tempFile, QApplication::arguments())) return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
QLocale locale = QLocale::system();
|
||||
|
||||
// load application translations
|
||||
|
@ -125,6 +108,23 @@ int main(int argc, char *argv[])
|
|||
|
||||
if (parser.isSet(uninstallOption))
|
||||
{
|
||||
#if defined(Q_OS_WIN) && !defined(_DEBUG)
|
||||
QString tempPath = QStandardPaths::writableLocation(QStandardPaths::TempLocation);
|
||||
|
||||
// check if launched from TEMP directory
|
||||
if (QApplication::applicationDirPath() != tempPath)
|
||||
{
|
||||
// copy installer and required files to TEMP directory
|
||||
if (copyInstallerExecutable(tempPath))
|
||||
{
|
||||
QString tempFile = tempPath + "/" + QFileInfo(QApplication::applicationFilePath()).fileName();
|
||||
|
||||
// launch copy in TEMP directory with same arguments
|
||||
if (QProcess::startDetached(tempFile, QApplication::arguments())) return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
SComponents components;
|
||||
|
||||
// add all servers by default
|
||||
|
|
Loading…
Reference in a new issue