fix(build): cmake

This commit is contained in:
BlackAngelTV committed 2026-08-26 20:49:05 +02:00
1 parent 1242753962
commit 4a773c63ce
17 files changed
+80 -75

No files matched your search

+2 -2
View File
@@ -3,6 +3,6 @@ target_include_directories(apt_plugin PRIVATE ${CMAKE_SOURCE_DIR}/include)
set_target_properties(apt_plugin PROPERTIES
PREFIX ""
OUTPUT_NAME "apt"
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib/PackageMapper/plugins"
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib/PacManager/plugins"
)
install(TARGETS apt_plugin DESTINATION lib/PackageMapper/plugins)
install(TARGETS apt_plugin DESTINATION lib/PacManager/plugins)
+5 -5
View File
@@ -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;
}
}