This commit is contained in:
pika 2025-05-19 17:19:30 +02:00
parent f3e92f52fa
commit 23c9d9d62a

View file

@ -88,6 +88,7 @@ getDependencies() {
debian) debian)
cloneAndBuildUtils cloneAndBuildUtils
cloneAndBuildGraphics cloneAndBuildGraphics
cloneAndBuildScanner
;; ;;
esac esac
;; ;;
@ -147,6 +148,31 @@ cloneAndBuildUtils() {
fi fi
} }
buildScanner() {
echo_pkg build "Building hyprwayland-scanner"
run cmake -DCMAKE_INSTALL_PREFIX=/usr -B build
run cmake --build build -j $(nproc)
}
cloneAndBuildScanner() {
local cloneDir="$(mktemp -d)"
cd $cloneDir || mkdir -p $cloneDir && cd $cloneDir
echo_pkg git "Cloning hyprwayland-scanner into $cloneDir/hyprwayland-scanner"
git clone https://github.com/hyprwm/hyprwayland-scanner &&
cd hyprwayland-scanner
if buildScanner; then
echo_pkg install
$_sudo cmake --install build
else
echo_error "Build has failed for $distro compiling hyprlock"
return 69
fi
}
build() { build() {
echo_pkg build "Building hyprlock" echo_pkg build "Building hyprlock"
run cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -S . -B ./build run cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -S . -B ./build
@ -186,8 +212,6 @@ main() {
_install hyprlock _install hyprlock
;; ;;
debian) debian)
cloneAndBuildUtils
cloneAndBuildGraphics
cloneAndBuildLock cloneAndBuildLock
;; ;;
*) *)