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:
micio 2011-01-23 17:29:02 +00:00
parent 177dae8edf
commit c49bf7d075

View file

@ -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