mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 09:25:59 +01:00
hyprpm: print and fail on missing packages during configure
instead of failing later with something like exit code 2, print out what's missing
This commit is contained in:
parent
9994b73ad0
commit
c62f0015ae
1 changed files with 10 additions and 0 deletions
|
@ -495,6 +495,16 @@ bool CPluginManager::updateHeaders(bool force) {
|
||||||
if (m_bVerbose)
|
if (m_bVerbose)
|
||||||
progress.printMessageAbove(std::string{Colors::BLUE} + "[v] " + Colors::RESET + "cmake returned: " + ret);
|
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
|
// le hack. Wlroots has to generate its build/include
|
||||||
ret = execAndGet("cd " + WORKINGDIR + "/subprojects/wlroots-hyprland && meson setup -Drenderers=gles2 -Dexamples=false build");
|
ret = execAndGet("cd " + WORKINGDIR + "/subprojects/wlroots-hyprland && meson setup -Drenderers=gles2 -Dexamples=false build");
|
||||||
if (m_bVerbose)
|
if (m_bVerbose)
|
||||||
|
|
Loading…
Reference in a new issue