mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Bazaar/Updater : Uses SysExecGui package to run tasks as admin
git-svn-id: svn://ultimatepp.org/upp/trunk@3057 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
87919d1abb
commit
8295288b80
3 changed files with 7 additions and 7 deletions
|
|
@ -27,6 +27,7 @@ String Updater::GetPlatformRoot(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
// constructor
|
||||
Updater::Updater()
|
||||
{
|
||||
|
|
@ -207,10 +208,9 @@ bool Updater::START_Updater(String const &operation)
|
|||
if(chmod(~tempName, 0755) != 0)
|
||||
return true;
|
||||
|
||||
// note the -k to gksu -- it makes it preserve the environment
|
||||
String params = "-k -u root \"" + tempName + "\"";
|
||||
if(SysStart("gksu", params, environ) == -1)
|
||||
return true;
|
||||
// executes the file asking for password
|
||||
return SysStartAdmin(tempName, "", environ);
|
||||
|
||||
#else
|
||||
// for windows, simply execute the file
|
||||
if(SysStart(tempName, "", environ) == -1)
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ description "Web Installer/Updater module\377";
|
|||
|
||||
uses
|
||||
CtrlLib,
|
||||
SysExec,
|
||||
Web;
|
||||
Web,
|
||||
SysExecGui;
|
||||
|
||||
file
|
||||
Updater.iml,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#ifndef _Updater_icpp_init_stub
|
||||
#define _Updater_icpp_init_stub
|
||||
#include "CtrlLib/init"
|
||||
#include "SysExec/init"
|
||||
#include "Web/init"
|
||||
#include "SysExecGui/init"
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue