From 23c9d9d62a04e9f8e145a8e8707cdcb66aacdfe3 Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 19 May 2025 17:19:30 +0200 Subject: [PATCH] testing --- hyprlock.sh | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/hyprlock.sh b/hyprlock.sh index eac9786..447cdc8 100644 --- a/hyprlock.sh +++ b/hyprlock.sh @@ -88,6 +88,7 @@ getDependencies() { debian) cloneAndBuildUtils cloneAndBuildGraphics + cloneAndBuildScanner ;; esac ;; @@ -147,6 +148,31 @@ cloneAndBuildUtils() { 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() { echo_pkg build "Building hyprlock" run cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -S . -B ./build @@ -186,8 +212,6 @@ main() { _install hyprlock ;; debian) - cloneAndBuildUtils - cloneAndBuildGraphics cloneAndBuildLock ;; *)