aboutsummaryrefslogtreecommitdiffhomepage
path: root/hyprpm
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-06-09 09:42:14 +0200
committerVaxry <[email protected]>2024-06-09 09:42:14 +0200
commitc62f0015aed0c0918281b1ce17def00d7025041b (patch)
treea7e8c0004bdcbacab67b9b58315697a27222f47e /hyprpm
parent9994b73ad0af5c9ba5fc4058234cea77d0a1ddb1 (diff)
downloadHyprland-c62f0015aed0c0918281b1ce17def00d7025041b.tar.gz
Hyprland-c62f0015aed0c0918281b1ce17def00d7025041b.zip
hyprpm: print and fail on missing packages during configure
instead of failing later with something like exit code 2, print out what's missing
Diffstat (limited to 'hyprpm')
-rw-r--r--hyprpm/src/core/PluginManager.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/hyprpm/src/core/PluginManager.cpp b/hyprpm/src/core/PluginManager.cpp
index dc3bc548..fb338d25 100644
--- a/hyprpm/src/core/PluginManager.cpp
+++ b/hyprpm/src/core/PluginManager.cpp
@@ -495,6 +495,16 @@ bool CPluginManager::updateHeaders(bool force) {
if (m_bVerbose)
progress.printMessageAbove(std::string{Colors::BLUE} + "[v] " + Colors::RESET + "cmake returned: " + ret);
+ if (ret.contains("required packages were not found")) {
+ // missing deps, let the user know.
+ std::string missing = ret.substr(ret.find("The following required packages were not found:"));
+ missing = missing.substr(0, missing.find("Call Stack"));
+ missing = missing.substr(0, missing.find_last_of('\n'));
+
+ std::cerr << "\n" << Colors::RED << "✖" << Colors::RESET << " Could not configure the hyprland source, cmake complained:\n" << missing << "\n";
+ return false;
+ }
+
// le hack. Wlroots has to generate its build/include
ret = execAndGet("cd " + WORKINGDIR + "/subprojects/wlroots-hyprland && meson setup -Drenderers=gles2 -Dexamples=false build");
if (m_bVerbose)