mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Bazaar/Updater : Now using SysExecGui package to run installer tasks
git-svn-id: svn://ultimatepp.org/upp/trunk@3074 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
177dae8edf
commit
c49bf7d075
1 changed files with 7 additions and 12 deletions
|
|
@ -3,7 +3,7 @@
|
|||
#include <Draw/Draw.h>
|
||||
#include <Web/Web.h>
|
||||
|
||||
#include <SysExec/SysExec.h>
|
||||
#include <SysExecGui/SysExecGui.h>
|
||||
|
||||
#define IMAGECLASS UpdaterImg
|
||||
#define IMAGEFILE <Updater/Updater.iml>
|
||||
|
|
@ -207,18 +207,12 @@ bool Updater::START_Updater(String const &operation)
|
|||
// allowing its execution and executes it as a superuser
|
||||
if(chmod(~tempName, 0755) != 0)
|
||||
return true;
|
||||
#endif
|
||||
|
||||
// executes the file asking for password
|
||||
return SysStartAdmin(tempName, "", environ);
|
||||
|
||||
#else
|
||||
// for windows, simply execute the file
|
||||
if(SysStart(tempName, "", environ) == -1)
|
||||
return true;
|
||||
#endif
|
||||
// installer process is spawned correctly
|
||||
// main app must leave
|
||||
return false;
|
||||
bool res = !SysStartAdmin(tempName, "", environ);
|
||||
return res;
|
||||
|
||||
}
|
||||
|
||||
// uninstall app
|
||||
|
|
@ -520,7 +514,8 @@ void Updater::RestartApp(RestartModes restartMode)
|
|||
#endif
|
||||
break;
|
||||
}
|
||||
SysStart(path, commandLine, environ);
|
||||
// restart app in user mode, no gui, no password should be needed
|
||||
SysStartUser(user, "", path, commandLine, environ);
|
||||
}
|
||||
|
||||
// fetch list of available app versions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue