From bb51fccf668c1d6ffc1f1abec7b87baf3f47c763 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Thu, 13 Nov 2025 19:48:18 -0500 Subject: [PATCH] Set install from pkgs as default Source builds need to HYPRLAND_FROM_SOURCE=1 set On branch hl-521 Your branch is up to date with 'origin/hl-521'. Changes to be committed: modified: install-scripts/hyprland.sh modified: install.sh --- install-scripts/hyprland.sh | 25 +++++++++++++++++++++++-- install.sh | 5 +++-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/install-scripts/hyprland.sh b/install-scripts/hyprland.sh index fe212eb..1765684 100755 --- a/install-scripts/hyprland.sh +++ b/install-scripts/hyprland.sh @@ -15,6 +15,10 @@ if [ "$1" = "--dry-run" ] || [ "${DRY_RUN}" = "1" ] || [ "${DRY_RUN}" = "true" ] echo "${NOTE} DRY RUN: install step will be skipped." fi +# By default, install Hyprland from Debian packages. +# Set HYPRLAND_FROM_SOURCE=1 if you explicitly want to build from source. +HYPRLAND_FROM_SOURCE=${HYPRLAND_FROM_SOURCE:-0} + hyprland=( clang llvm @@ -43,8 +47,25 @@ fi LOG="Install-Logs/install-$(date +%d-%H%M%S)_hyprland.log" MLOG="install-$(date +%d-%H%M%S)_hyprland2.log" -# Installation of dependencies -printf "\n%s - Installing hyprland additional dependencies.... \n" "${NOTE}" +# If not explicitly told to build from source, install Hyprland from Debian packages +if [ "$HYPRLAND_FROM_SOURCE" != "1" ]; then + printf "\n%s - Installing ${YELLOW}Hyprland from Debian packages${RESET} .... \n" "${NOTE}" + + if [ $DO_INSTALL -eq 1 ]; then + # Core Hyprland packages; pinning (if configured) will select sid/testing as needed + install_package "hyprland" 2>&1 | tee -a "$LOG" + install_package "hyprland-dev" 2>&1 | tee -a "$LOG" || true + install_package "hyprland-backgrounds" 2>&1 | tee -a "$LOG" || true + else + echo "${NOTE} DRY RUN: Would install hyprland, hyprland-dev and hyprland-backgrounds from APT." + fi + + printf "\n%.0s" {1..2} + exit 0 +fi + +# Installation of dependencies for source builds +printf "\n%s - Installing hyprland additional dependencies (source build).... \n" "${NOTE}" for PKG1 in "${hyprland[@]}"; do install_package "$PKG1" 2>&1 | tee -a "$LOG" diff --git a/install.sh b/install.sh index 146bab9..3e5679f 100755 --- a/install.sh +++ b/install.sh @@ -667,8 +667,9 @@ execute_script "03-Final-Check.sh" printf "\n%.0s" {1..1} -# Check if either hyprland or Hyprland files exist in /usr/local/bin/ -if [ -e /usr/local/bin/hyprland ] || [ -f /usr/local/bin/Hyprland ]; then +# Check if Hyprland is available in PATH or in standard system locations +if command -v Hyprland >/dev/null 2>&1 || command -v hyprland >/dev/null 2>&1 || \ + [ -x /usr/bin/Hyprland ] || [ -x /usr/bin/hyprland ]; then printf "\n ${OK} 👌 Hyprland is installed. However, some essential packages may not be installed. Please see above!" printf "\n${CAT} Ignore this message if it states ${YELLOW}All essential packages${RESET} are installed as per above\n" sleep 2