fix(build): cmake
This commit is contained in:
1 parent
1242753962
commit
4a773c63ce
17 files changed
+80
-75
No files matched your search
@@ -63,7 +63,7 @@ public:
|
||||
std::function<void(const std::string&)> progressCallback) override {
|
||||
if (progressCallback) progressCallback("Installation de " + packageName + "...");
|
||||
|
||||
std::string output = exec(("sudo apt install -y " + packageName + " 2>&1").c_str());
|
||||
std::string output = exec(("pkexec apt install -y " + packageName + " 2>&1").c_str());
|
||||
|
||||
if (progressCallback) {
|
||||
std::istringstream iss(output);
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
std::function<void(const std::string&)> progressCallback) override {
|
||||
if (progressCallback) progressCallback("Suppression de " + packageName + "...");
|
||||
|
||||
std::string output = exec(("sudo apt remove -y " + packageName + " 2>&1").c_str());
|
||||
std::string output = exec(("pkexec apt remove -y " + packageName + " 2>&1").c_str());
|
||||
|
||||
if (progressCallback) {
|
||||
std::istringstream iss(output);
|
||||
@@ -97,12 +97,12 @@ public:
|
||||
std::function<void(const std::string&)> progressCallback = nullptr) override {
|
||||
if (packageName.empty()) {
|
||||
if (progressCallback) progressCallback("Mise à jour des paquets...");
|
||||
exec("sudo apt update 2>&1");
|
||||
exec("sudo apt upgrade -y 2>&1");
|
||||
exec("pkexec apt update 2>&1");
|
||||
exec("pkexec apt upgrade -y 2>&1");
|
||||
return true;
|
||||
} else {
|
||||
if (progressCallback) progressCallback("Mise à jour de " + packageName + "...");
|
||||
exec(("sudo apt install --only-upgrade -y " + packageName + " 2>&1").c_str());
|
||||
exec(("pkexec apt install --only-upgrade -y " + packageName + " 2>&1").c_str());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user