mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Add run0 support
This commit is contained in:
parent
ef98d4ece7
commit
c93f047056
1 changed files with 4 additions and 2 deletions
|
@ -49,7 +49,9 @@ bool Launcher::launchUpdater(UpdaterLaunch action) {
|
||||||
const auto launching = justRelaunch
|
const auto launching = justRelaunch
|
||||||
? (cExeDir() + cExeName())
|
? (cExeDir() + cExeName())
|
||||||
: cWriteProtected()
|
: cWriteProtected()
|
||||||
? u"pkexec"_q
|
? GLib::find_program_in_path("run0")
|
||||||
|
? u"run0"_q
|
||||||
|
: u"pkexec"_q
|
||||||
: (cExeDir() + u"Updater"_q);
|
: (cExeDir() + u"Updater"_q);
|
||||||
argumentsList.push_back(launching.toStdString());
|
argumentsList.push_back(launching.toStdString());
|
||||||
|
|
||||||
|
@ -61,7 +63,7 @@ bool Launcher::launchUpdater(UpdaterLaunch action) {
|
||||||
: launching;
|
: launching;
|
||||||
argumentsList.push_back(argv0.toStdString());
|
argumentsList.push_back(argv0.toStdString());
|
||||||
} else if (cWriteProtected()) {
|
} else if (cWriteProtected()) {
|
||||||
// Elevated process that pkexec should launch.
|
// Elevated process that run0/pkexec should launch.
|
||||||
const auto elevated = cWorkingDir() + u"tupdates/temp/Updater"_q;
|
const auto elevated = cWorkingDir() + u"tupdates/temp/Updater"_q;
|
||||||
argumentsList.push_back(elevated.toStdString());
|
argumentsList.push_back(elevated.toStdString());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue