From bc8b456e3b139fa685bdb430aad55671d398f2d5 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 8 Oct 2025 01:08:10 -0400 Subject: [PATCH 01/20] Modified script for dry-run and helper script On branch hl-051 Changes to be committed: new file: dry-run-build.sh modified: install-scripts/aquamarine.sh modified: install-scripts/hyprgraphics.sh modified: install-scripts/hyprland-protocols.sh modified: install-scripts/hyprland-qt-support.sh modified: install-scripts/hyprland-qtutils.sh modified: install-scripts/hyprland.sh modified: install-scripts/hyprlang.sh modified: install-scripts/hyprutils.sh modified: install-scripts/hyprwayland-scanner.sh --- dry-run-build.sh | 150 +++++++++++++++++++++++++ install-scripts/aquamarine.sh | 17 ++- install-scripts/hyprgraphics.sh | 17 ++- install-scripts/hyprland-protocols.sh | 17 ++- install-scripts/hyprland-qt-support.sh | 17 ++- install-scripts/hyprland-qtutils.sh | 17 ++- install-scripts/hyprland.sh | 26 ++++- install-scripts/hyprlang.sh | 17 ++- install-scripts/hyprutils.sh | 17 ++- install-scripts/hyprwayland-scanner.sh | 17 ++- 10 files changed, 284 insertions(+), 28 deletions(-) create mode 100644 dry-run-build.sh diff --git a/dry-run-build.sh b/dry-run-build.sh new file mode 100644 index 0000000..4c3fb8e --- /dev/null +++ b/dry-run-build.sh @@ -0,0 +1,150 @@ +#!/usr/bin/env bash +# Dry-run orchestrator for Hyprland and companion modules +# - Compiles components but skips installation (uses DRY_RUN=1) +# - Summarizes PASS/FAIL per module to Install-Logs/ +# +# Usage: +# chmod +x ./dry-run-build.sh +# ./dry-run-build.sh # run full stack dry-run +# ./dry-run-build.sh --with-deps # install dependencies first, then dry-run build +# ./dry-run-build.sh --only hyprland # run a subset (comma-separated allowed) +# ./dry-run-build.sh --skip qtutils # skip one or more (comma-separated) +# +# Notes: +# - Run from the repository root. Do not cd into install-scripts/. +# - You can also call modules directly, e.g., DRY_RUN=1 ./install-scripts/hyprland.sh + +set -u +set -o pipefail + +REPO_ROOT=$(pwd) +LOG_DIR="$REPO_ROOT/Install-Logs" +mkdir -p "$LOG_DIR" +TS=$(date +%F-%H%M%S) +SUMMARY_LOG="$LOG_DIR/build-dry-run-$TS.log" + +# Default module order (core first, then Hyprland) +DEFAULT_MODULES=( + hyprutils + hyprlang + hyprgraphics + hyprwayland-scanner + hyprland-protocols + hyprland-qt-support + hyprland-qtutils + aquamarine + hyprland +) + +WITH_DEPS=0 +ONLY_LIST="" +SKIP_LIST="" + +usage() { + grep '^# ' "$0" | sed 's/^# \{0,1\}//' +} + +# Parse args +while [[ $# -gt 0 ]]; do + case "$1" in + -h|--help) + usage + exit 0 + ;; + --with-deps) + WITH_DEPS=1 + shift + ;; + --only) + ONLY_LIST=${2:-} + shift 2 + ;; + --skip) + SKIP_LIST=${2:-} + shift 2 + ;; + *) + echo "Unknown argument: $1" >&2 + exit 2 + ;; + esac +done + +# Build module list based on --only/--skip +MODULES=() +if [[ -n "$ONLY_LIST" ]]; then + IFS=',' read -r -a MODULES <<< "$ONLY_LIST" +else + MODULES=("${DEFAULT_MODULES[@]}") +fi + +if [[ -n "$SKIP_LIST" ]]; then + IFS=',' read -r -a _SKIPS <<< "$SKIP_LIST" + FILTERED=() + for m in "${MODULES[@]}"; do + skip_it=0 + for s in "${_SKIPS[@]}"; do + if [[ "$m" == "$s" ]]; then + skip_it=1 + break + fi + done + if [[ $skip_it -eq 0 ]]; then + FILTERED+=("$m") + fi + done + MODULES=("${FILTERED[@]}") +fi + +# Optionally install dependencies (not a dry-run) +if [[ $WITH_DEPS -eq 1 ]]; then + echo "[INFO] Installing dependencies via 00-dependencies.sh" | tee -a "$SUMMARY_LOG" + if ! "$REPO_ROOT/install-scripts/00-dependencies.sh"; then + echo "[ERROR] Dependencies installation failed. See logs under Install-Logs/." | tee -a "$SUMMARY_LOG" + exit 1 + fi +fi + +# Run each module with DRY_RUN=1 and capture exit codes +declare -A RESULTS + +echo "[INFO] Starting dry-run build at $TS" | tee -a "$SUMMARY_LOG" + +for mod in "${MODULES[@]}"; do + script_path="$REPO_ROOT/install-scripts/$mod.sh" + echo "\n=== $mod (DRY RUN) ===" | tee -a "$SUMMARY_LOG" + if [[ ! -x "$script_path" ]]; then + # Try to make executable if it exists + if [[ -f "$script_path" ]]; then + chmod +x "$script_path" || true + fi + fi + if [[ ! -f "$script_path" ]]; then + echo "[WARN] Missing script: $script_path" | tee -a "$SUMMARY_LOG" + RESULTS[$mod]="MISSING" + continue + fi + if DRY_RUN=1 "$script_path"; then + RESULTS[$mod]="PASS" + else + RESULTS[$mod]="FAIL" + fi +done + +# Summary +{ + echo "\nSummary (dry-run):" + for mod in "${MODULES[@]}"; do + printf "%-24s %s\n" "$mod" "${RESULTS[$mod]:-SKIPPED}" + done + echo "\nLogs: individual module logs are under Install-Logs/. This summary: $SUMMARY_LOG" +} | tee -a "$SUMMARY_LOG" + +# Exit non-zero if any FAIL occurred +failed=0 +for mod in "${MODULES[@]}"; do + if [[ "${RESULTS[$mod]:-}" == "FAIL" ]]; then + failed=1 + fi +done +exit $failed \ No newline at end of file diff --git a/install-scripts/aquamarine.sh b/install-scripts/aquamarine.sh index f0a2fb6..5f5855a 100755 --- a/install-scripts/aquamarine.sh +++ b/install-scripts/aquamarine.sh @@ -7,6 +7,13 @@ #specific branch or release tag="v0.9.2" +# Dry-run support +DO_INSTALL=1 +if [ "$1" = "--dry-run" ] || [ "${DRY_RUN}" = "1" ] || [ "${DRY_RUN}" = "true" ]; then + DO_INSTALL=0 + echo "${NOTE} DRY RUN: install step will be skipped." +fi + ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" @@ -38,10 +45,14 @@ if git clone --recursive -b $tag https://github.com/hyprwm/aquamarine.git; then cd aquamarine || exit 1 cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF` - if sudo cmake --install ./build 2>&1 | tee -a "$MLOG" ; then - printf "${OK} ${MAGENTA}aquamarine $tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG" + if [ $DO_INSTALL -eq 1 ]; then + if sudo cmake --install ./build 2>&1 | tee -a "$MLOG" ; then + printf "${OK} ${MAGENTA}aquamarine $tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG" + else + echo -e "${ERROR} Installation failed for ${YELLOW}aquamarine $tag${RESET}" 2>&1 | tee -a "$MLOG" + fi else - echo -e "${ERROR} Installation failed for ${YELLOW}aquamarine $tag${RESET}" 2>&1 | tee -a "$MLOG" + echo "${NOTE} DRY RUN: Skipping installation of aquamarine $tag." fi #moving the addional logs to Install-Logs directory mv $MLOG ../Install-Logs/ || true diff --git a/install-scripts/hyprgraphics.sh b/install-scripts/hyprgraphics.sh index 2712371..a5ae9e9 100755 --- a/install-scripts/hyprgraphics.sh +++ b/install-scripts/hyprgraphics.sh @@ -10,6 +10,13 @@ hyprgraphics=( #specific branch or release tag="v0.1.5" +# Dry-run support +DO_INSTALL=1 +if [ "$1" = "--dry-run" ] || [ "${DRY_RUN}" = "1" ] || [ "${DRY_RUN}" = "true" ]; then + DO_INSTALL=0 + echo "${NOTE} DRY RUN: install step will be skipped." +fi + ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" @@ -50,10 +57,14 @@ if git clone --recursive -b $tag https://github.com/hyprwm/hyprgraphics.git; the cd hyprgraphics || exit 1 cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build cmake --build ./build --config Release --target hyprgraphics -j`nproc 2>/dev/null || getconf _NPROCESSORS_CONF` - if sudo cmake --install ./build 2>&1 | tee -a "$MLOG" ; then - printf "${OK} ${MAGENTA}hyprgraphics $tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG" + if [ $DO_INSTALL -eq 1 ]; then + if sudo cmake --install ./build 2>&1 | tee -a "$MLOG" ; then + printf "${OK} ${MAGENTA}hyprgraphics $tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG" + else + echo -e "${ERROR} Installation failed for ${YELLOW}hyprgraphics $graphics${RESET}" 2>&1 | tee -a "$MLOG" + fi else - echo -e "${ERROR} Installation failed for ${YELLOW}hyprgraphics $graphics${RESET}" 2>&1 | tee -a "$MLOG" + echo "${NOTE} DRY RUN: Skipping installation of hyprgraphics $tag." fi #moving the addional logs to Install-Logs directory mv $MLOG ../Install-Logs/ || true diff --git a/install-scripts/hyprland-protocols.sh b/install-scripts/hyprland-protocols.sh index 72f0bc0..cbc6dbc 100755 --- a/install-scripts/hyprland-protocols.sh +++ b/install-scripts/hyprland-protocols.sh @@ -7,6 +7,13 @@ #specific branch or release tag="v0.6.4" +# Dry-run support +DO_INSTALL=1 +if [ "$1" = "--dry-run" ] || [ "${DRY_RUN}" = "1" ] || [ "${DRY_RUN}" = "true" ]; then + DO_INSTALL=0 + echo "${NOTE} DRY RUN: install step will be skipped." +fi + ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" @@ -37,10 +44,14 @@ printf "${INFO} Installing ${YELLOW}hyprland-protocols $tag${RESET} ...\n" if git clone --recursive -b $tag https://github.com/hyprwm/hyprland-protocols.git; then cd hyprland-protocols || exit 1 meson setup build - if sudo meson install -C build 2>&1 | tee -a "$MLOG" ; then - printf "${OK} ${MAGENTA}hyprland-protocols $tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG" + if [ $DO_INSTALL -eq 1 ]; then + if sudo meson install -C build 2>&1 | tee -a "$MLOG" ; then + printf "${OK} ${MAGENTA}hyprland-protocols $tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG" + else + echo -e "${ERROR} Installation failed for ${YELLOW}hyprland-protocols $tag${RESET}" 2>&1 | tee -a "$MLOG" + fi else - echo -e "${ERROR} Installation failed for ${YELLOW}hyprland-protocols $tag${RESET}" 2>&1 | tee -a "$MLOG" + echo "${NOTE} DRY RUN: Skipping installation of hyprland-protocols $tag." fi #moving the addional logs to Install-Logs directory mv $MLOG ../Install-Logs/ || true diff --git a/install-scripts/hyprland-qt-support.sh b/install-scripts/hyprland-qt-support.sh index b0d8354..8fac32a 100755 --- a/install-scripts/hyprland-qt-support.sh +++ b/install-scripts/hyprland-qt-support.sh @@ -17,6 +17,13 @@ qt_support=( #specific branch or release tag="v0.1.0" +# Dry-run support +DO_INSTALL=1 +if [ "$1" = "--dry-run" ] || [ "${DRY_RUN}" = "1" ] || [ "${DRY_RUN}" = "true" ]; then + DO_INSTALL=0 + echo "${NOTE} DRY RUN: install step will be skipped." +fi + ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" @@ -58,10 +65,14 @@ if git clone --recursive -b $tag https://github.com/hyprwm/hyprland-qt-support.g cd hyprland-qt-support || exit 1 cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF` - if sudo cmake --install ./build 2>&1 | tee -a "$MLOG" ; then - printf "${OK} ${MAGENTA}hyprland-qt-support $tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG" + if [ $DO_INSTALL -eq 1 ]; then + if sudo cmake --install ./build 2>&1 | tee -a "$MLOG" ; then + printf "${OK} ${MAGENTA}hyprland-qt-support $tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG" + else + echo -e "${ERROR} Installation failed for ${YELLOW}hyprland-qt-support $tag${RESET}" 2>&1 | tee -a "$MLOG" + fi else - echo -e "${ERROR} Installation failed for ${YELLOW}hyprland-qt-support $tag${RESET}" 2>&1 | tee -a "$MLOG" + echo "${NOTE} DRY RUN: Skipping installation of hyprland-qt-support $tag." fi #moving the addional logs to Install-Logs directory mv $MLOG ../Install-Logs/ || true diff --git a/install-scripts/hyprland-qtutils.sh b/install-scripts/hyprland-qtutils.sh index 4a05a7a..53f2c61 100755 --- a/install-scripts/hyprland-qtutils.sh +++ b/install-scripts/hyprland-qtutils.sh @@ -19,6 +19,13 @@ qtutils=( #specific branch or release tag="v0.1.4" +# Dry-run support +DO_INSTALL=1 +if [ "$1" = "--dry-run" ] || [ "${DRY_RUN}" = "1" ] || [ "${DRY_RUN}" = "true" ]; then + DO_INSTALL=0 + echo "${NOTE} DRY RUN: install step will be skipped." +fi + ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" @@ -60,10 +67,14 @@ if git clone --recursive -b $tag https://github.com/hyprwm/hyprland-qtutils.git; cd hyprland-qtutils || exit 1 cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF` - if sudo cmake --install ./build 2>&1 | tee -a "$MLOG" ; then - printf "${OK} ${MAGENTA}hyprland-qtutils $tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG" + if [ $DO_INSTALL -eq 1 ]; then + if sudo cmake --install ./build 2>&1 | tee -a "$MLOG" ; then + printf "${OK} ${MAGENTA}hyprland-qtutils $tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG" + else + echo -e "${ERROR} Installation failed for ${YELLOW}hyprland-qtutils $tag${RESET}" 2>&1 | tee -a "$MLOG" + fi else - echo -e "${ERROR} Installation failed for ${YELLOW}hyprland-qtutils $tag${RESET}" 2>&1 | tee -a "$MLOG" + echo "${NOTE} DRY RUN: Skipping installation of hyprland-qtutils $tag." fi #moving the addional logs to Install-Logs directory mv $MLOG ../Install-Logs/ || true diff --git a/install-scripts/hyprland.sh b/install-scripts/hyprland.sh index 88c99af..5789f8d 100755 --- a/install-scripts/hyprland.sh +++ b/install-scripts/hyprland.sh @@ -5,6 +5,13 @@ #specific branch or release tag="v0.50.1" +# Dry-run support +DO_INSTALL=1 +if [ "$1" = "--dry-run" ] || [ "${DRY_RUN}" = "1" ] || [ "${DRY_RUN}" = "true" ]; then + DO_INSTALL=0 + echo "${NOTE} DRY RUN: install step will be skipped." +fi + hyprland=( clang llvm @@ -67,12 +74,23 @@ fi if git clone --recursive -b $tag "https://github.com/hyprwm/Hyprland"; then cd "Hyprland" || exit 1 - patch -p1 < ../assets/0001-fix-hyprland-compile-issue.patch + # Apply patch only if it applies cleanly; otherwise skip + if [ -f ../assets/0001-fix-hyprland-compile-issue.patch ]; then + if patch -p1 --dry-run < ../assets/0001-fix-hyprland-compile-issue.patch >/dev/null 2>&1; then + patch -p1 < ../assets/0001-fix-hyprland-compile-issue.patch + else + echo "${NOTE} Hyprland compile patch does not apply on $tag; skipping." + fi + fi CXX=clang++ CXXFLAGS=-std=gnu++26 make all - if sudo make install 2>&1 | tee -a "$MLOG"; then - printf "${OK} ${MAGENTA}Hyprland tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG" + if [ $DO_INSTALL -eq 1 ]; then + if sudo make install 2>&1 | tee -a "$MLOG"; then + printf "${OK} ${MAGENTA}Hyprland tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG" + else + echo -e "${ERROR} Installation failed for ${YELLOW}Hyprland $tag${RESET}" 2>&1 | tee -a "$MLOG" + fi else - echo -e "${ERROR} Installation failed for ${YELLOW}Hyprland $tag${RESET}" 2>&1 | tee -a "$MLOG" + echo "${NOTE} DRY RUN: Skipping installation of Hyprland $tag." fi mv $MLOG ../Install-Logs/ || true cd .. diff --git a/install-scripts/hyprlang.sh b/install-scripts/hyprlang.sh index b8dba9d..7a10961 100755 --- a/install-scripts/hyprlang.sh +++ b/install-scripts/hyprlang.sh @@ -7,6 +7,13 @@ #specific branch or release tag="v0.6.4" +# Dry-run support +DO_INSTALL=1 +if [ "$1" = "--dry-run" ] || [ "${DRY_RUN}" = "1" ] || [ "${DRY_RUN}" = "true" ]; then + DO_INSTALL=0 + echo "${NOTE} DRY RUN: install step will be skipped." +fi + ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" @@ -38,10 +45,14 @@ if git clone --recursive -b $tag https://github.com/hyprwm/hyprlang.git; then cd hyprlang || exit 1 cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build cmake --build ./build --config Release --target hyprlang -j`nproc 2>/dev/null || getconf _NPROCESSORS_CONF` - if sudo cmake --install ./build 2>&1 | tee -a "$MLOG" ; then - printf "${OK} ${MAGENTA}hyprlang tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG" + if [ $DO_INSTALL -eq 1 ]; then + if sudo cmake --install ./build 2>&1 | tee -a "$MLOG" ; then + printf "${OK} ${MAGENTA}hyprlang tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG" + else + echo -e "${ERROR} Installation failed for ${YELLOW}hyprlang $tag${RESET}" 2>&1 | tee -a "$MLOG" + fi else - echo -e "${ERROR} Installation failed for ${YELLOW}hyprlang $tag${RESET}" 2>&1 | tee -a "$MLOG" + echo "${NOTE} DRY RUN: Skipping installation of hyprlang $tag." fi #moving the addional logs to Install-Logs directory mv $MLOG ../Install-Logs/ || true diff --git a/install-scripts/hyprutils.sh b/install-scripts/hyprutils.sh index e0caefe..f99fb3f 100755 --- a/install-scripts/hyprutils.sh +++ b/install-scripts/hyprutils.sh @@ -6,6 +6,13 @@ #specific branch or release tag="v0.8.2" +# Dry-run support +DO_INSTALL=1 +if [ "$1" = "--dry-run" ] || [ "${DRY_RUN}" = "1" ] || [ "${DRY_RUN}" = "true" ]; then + DO_INSTALL=0 + echo "${NOTE} DRY RUN: install step will be skipped." +fi + ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" @@ -36,10 +43,14 @@ if git clone -b $tag "https://github.com/hyprwm/hyprutils.git"; then cd "hyprutils" || exit 1 cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf _NPROCESSORS_CONF` - if sudo cmake --install build 2>&1 | tee -a "$MLOG"; then - printf "${OK} hyprutils installed successfully.\n" 2>&1 | tee -a "$MLOG" + if [ $DO_INSTALL -eq 1 ]; then + if sudo cmake --install build 2>&1 | tee -a "$MLOG"; then + printf "${OK} hyprutils installed successfully.\n" 2>&1 | tee -a "$MLOG" + else + echo -e "${ERROR} Installation failed for hyprutils." 2>&1 | tee -a "$MLOG" + fi else - echo -e "${ERROR} Installation failed for hyprutils." 2>&1 | tee -a "$MLOG" + echo "${NOTE} DRY RUN: Skipping installation of hyprutils $tag." fi mv $MLOG ../Install-Logs/ || true cd .. diff --git a/install-scripts/hyprwayland-scanner.sh b/install-scripts/hyprwayland-scanner.sh index 21bb5bf..ebe9255 100755 --- a/install-scripts/hyprwayland-scanner.sh +++ b/install-scripts/hyprwayland-scanner.sh @@ -10,6 +10,13 @@ scan_depend=( #specific branch or release tag="v0.4.5" +# Dry-run support +DO_INSTALL=1 +if [ "$1" = "--dry-run" ] || [ "${DRY_RUN}" = "1" ] || [ "${DRY_RUN}" = "true" ]; then + DO_INSTALL=0 + echo "${NOTE} DRY RUN: install step will be skipped." +fi + ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" @@ -53,10 +60,14 @@ if git clone --recursive -b $tag https://github.com/hyprwm/hyprwayland-scanner.g cd hyprwayland-scanner || exit 1 cmake -DCMAKE_INSTALL_PREFIX=/usr -B build cmake --build build -j `nproc` - if sudo cmake --install build 2>&1 | tee -a "$MLOG" ; then - printf "${OK} hyprwayland-scanner installed successfully.\n" 2>&1 | tee -a "$MLOG" + if [ $DO_INSTALL -eq 1 ]; then + if sudo cmake --install build 2>&1 | tee -a "$MLOG" ; then + printf "${OK} hyprwayland-scanner installed successfully.\n" 2>&1 | tee -a "$MLOG" + else + echo -e "${ERROR} Installation failed for hyprwayland-scanner." 2>&1 | tee -a "$MLOG" + fi else - echo -e "${ERROR} Installation failed for hyprwayland-scanner." 2>&1 | tee -a "$MLOG" + echo "${NOTE} DRY RUN: Skipping installation of hyprwayland-scanner $tag." fi #moving the addional logs to Install-Logs directory mv $MLOG ../Install-Logs/ || true From 0593df837e498b25b4c807c02a26b9972bfcdd2f Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 8 Oct 2025 01:24:01 -0400 Subject: [PATCH 02/20] Added upgrade script, tag env variables On branch hl-051 Your branch is up to date with 'origin/hl-051'. Changes to be committed: new file: hypr-tags.env modified: install-scripts/aquamarine.sh modified: install-scripts/hyprgraphics.sh modified: install-scripts/hyprland-protocols.sh modified: install-scripts/hyprland-qt-support.sh modified: install-scripts/hyprland-qtutils.sh modified: install-scripts/hyprland.sh modified: install-scripts/hyprlang.sh modified: install-scripts/hyprutils.sh modified: install-scripts/hyprwayland-scanner.sh new file: update-hyprland.sh --- hypr-tags.env | 13 + install-scripts/aquamarine.sh | 2 + install-scripts/hyprgraphics.sh | 2 + install-scripts/hyprland-protocols.sh | 2 + install-scripts/hyprland-qt-support.sh | 2 + install-scripts/hyprland-qtutils.sh | 2 + install-scripts/hyprland.sh | 2 + install-scripts/hyprlang.sh | 2 + install-scripts/hyprutils.sh | 2 + install-scripts/hyprwayland-scanner.sh | 2 + update-hyprland.sh | 330 +++++++++++++++++++++++++ 11 files changed, 361 insertions(+) create mode 100644 hypr-tags.env create mode 100644 update-hyprland.sh diff --git a/hypr-tags.env b/hypr-tags.env new file mode 100644 index 0000000..f9b2ac7 --- /dev/null +++ b/hypr-tags.env @@ -0,0 +1,13 @@ +# Central tag overrides for the Hyprland stack +# You can edit these values or let update-hyprland.sh manage them. +# Each module script reads its TAG from these environment variables if set. + +HYPRLAND_TAG=v0.51.1 +AQUAMARINE_TAG=v0.9.2 +HYPRUTILS_TAG=v0.8.2 +HYPRLANG_TAG=v0.6.4 +HYPRGRAPHICS_TAG=v0.1.5 +HYPRWAYLAND_SCANNER_TAG=v0.4.5 +HYPRLAND_PROTOCOLS_TAG=v0.6.4 +HYPRLAND_QT_SUPPORT_TAG=v0.1.0 +HYPRLAND_QTUTILS_TAG=v0.1.4 diff --git a/install-scripts/aquamarine.sh b/install-scripts/aquamarine.sh index 5f5855a..b5ce758 100755 --- a/install-scripts/aquamarine.sh +++ b/install-scripts/aquamarine.sh @@ -6,6 +6,8 @@ #specific branch or release tag="v0.9.2" +# Allow environment override +if [ -n "${AQUAMARINE_TAG:-}" ]; then tag="$AQUAMARINE_TAG"; fi # Dry-run support DO_INSTALL=1 diff --git a/install-scripts/hyprgraphics.sh b/install-scripts/hyprgraphics.sh index a5ae9e9..8a7cf9b 100755 --- a/install-scripts/hyprgraphics.sh +++ b/install-scripts/hyprgraphics.sh @@ -9,6 +9,8 @@ hyprgraphics=( #specific branch or release tag="v0.1.5" +# Allow environment override +if [ -n "${HYPRGRAPHICS_TAG:-}" ]; then tag="$HYPRGRAPHICS_TAG"; fi # Dry-run support DO_INSTALL=1 diff --git a/install-scripts/hyprland-protocols.sh b/install-scripts/hyprland-protocols.sh index cbc6dbc..55740f6 100755 --- a/install-scripts/hyprland-protocols.sh +++ b/install-scripts/hyprland-protocols.sh @@ -6,6 +6,8 @@ #specific branch or release tag="v0.6.4" +# Allow environment override +if [ -n "${HYPRLAND_PROTOCOLS_TAG:-}" ]; then tag="$HYPRLAND_PROTOCOLS_TAG"; fi # Dry-run support DO_INSTALL=1 diff --git a/install-scripts/hyprland-qt-support.sh b/install-scripts/hyprland-qt-support.sh index 8fac32a..be1b491 100755 --- a/install-scripts/hyprland-qt-support.sh +++ b/install-scripts/hyprland-qt-support.sh @@ -16,6 +16,8 @@ qt_support=( #specific branch or release tag="v0.1.0" +# Allow environment override +if [ -n "${HYPRLAND_QT_SUPPORT_TAG:-}" ]; then tag="$HYPRLAND_QT_SUPPORT_TAG"; fi # Dry-run support DO_INSTALL=1 diff --git a/install-scripts/hyprland-qtutils.sh b/install-scripts/hyprland-qtutils.sh index 53f2c61..b21ec57 100755 --- a/install-scripts/hyprland-qtutils.sh +++ b/install-scripts/hyprland-qtutils.sh @@ -18,6 +18,8 @@ qtutils=( #specific branch or release tag="v0.1.4" +# Allow environment override +if [ -n "${HYPRLAND_QTUTILS_TAG:-}" ]; then tag="$HYPRLAND_QTUTILS_TAG"; fi # Dry-run support DO_INSTALL=1 diff --git a/install-scripts/hyprland.sh b/install-scripts/hyprland.sh index 5789f8d..aba1768 100755 --- a/install-scripts/hyprland.sh +++ b/install-scripts/hyprland.sh @@ -4,6 +4,8 @@ #specific branch or release tag="v0.50.1" +# Allow environment override +if [ -n "${HYPRLAND_TAG:-}" ]; then tag="$HYPRLAND_TAG"; fi # Dry-run support DO_INSTALL=1 diff --git a/install-scripts/hyprlang.sh b/install-scripts/hyprlang.sh index 7a10961..9ffc16c 100755 --- a/install-scripts/hyprlang.sh +++ b/install-scripts/hyprlang.sh @@ -6,6 +6,8 @@ #specific branch or release tag="v0.6.4" +# Allow environment override +if [ -n "${HYPRLANG_TAG:-}" ]; then tag="$HYPRLANG_TAG"; fi # Dry-run support DO_INSTALL=1 diff --git a/install-scripts/hyprutils.sh b/install-scripts/hyprutils.sh index f99fb3f..4ba5e2e 100755 --- a/install-scripts/hyprutils.sh +++ b/install-scripts/hyprutils.sh @@ -5,6 +5,8 @@ #specific branch or release tag="v0.8.2" +# Allow environment override +if [ -n "${HYPRUTILS_TAG:-}" ]; then tag="$HYPRUTILS_TAG"; fi # Dry-run support DO_INSTALL=1 diff --git a/install-scripts/hyprwayland-scanner.sh b/install-scripts/hyprwayland-scanner.sh index ebe9255..31b0b4e 100755 --- a/install-scripts/hyprwayland-scanner.sh +++ b/install-scripts/hyprwayland-scanner.sh @@ -9,6 +9,8 @@ scan_depend=( #specific branch or release tag="v0.4.5" +# Allow environment override +if [ -n "${HYPRWAYLAND_SCANNER_TAG:-}" ]; then tag="$HYPRWAYLAND_SCANNER_TAG"; fi # Dry-run support DO_INSTALL=1 diff --git a/update-hyprland.sh b/update-hyprland.sh new file mode 100644 index 0000000..5c502dc --- /dev/null +++ b/update-hyprland.sh @@ -0,0 +1,330 @@ +#!/usr/bin/env bash +# update-hyprland.sh +# Manage and build just the Hyprland stack (Hyprland + companion apps/libs) +# - Maintains a central tag file (hypr-tags.env) with versions +# - Can fetch latest release tags from GitHub and update hypr-tags.env +# - Can restore tags from a backup +# - Can run a dry-run build (compile only) or install build of the stack +# +# Usage examples: +# chmod +x ./update-hyprland.sh +# ./update-hyprland.sh --dry-run # compile-only using current tags +# ./update-hyprland.sh --install # compile + install using current tags +# ./update-hyprland.sh --fetch-latest --dry-run # refresh tags to latest, then dry-run +# ./update-hyprland.sh --set HYPRLAND=v0.51.1 --dry-run # set one or more tags +# ./update-hyprland.sh --restore --dry-run # restore most recent backup of tags and dry-run +# ./update-hyprland.sh --only hyprland,hyprutils --dry-run +# ./update-hyprland.sh --skip aquamarine --install +# ./update-hyprland.sh --with-deps --dry-run +# ./update-hyprland.sh --fetch-latest --via-helper # use dry-run-build.sh for a summary-only run +# +# Notes: +# - Requires curl; for --fetch-latest, jq is recommended (installed by 00-dependencies.sh) +# - Works from repo root; do not cd into install-scripts/ + +set -euo pipefail + +REPO_ROOT=$(pwd) +TAGS_FILE="$REPO_ROOT/hypr-tags.env" +LOG_DIR="$REPO_ROOT/Install-Logs" +mkdir -p "$LOG_DIR" +TS=$(date +%F-%H%M%S) +SUMMARY_LOG="$LOG_DIR/update-hypr-$TS.log" + +# Default module order (core first, then Hyprland) +DEFAULT_MODULES=( + hyprutils + hyprlang + hyprgraphics + hyprwayland-scanner + hyprland-protocols + hyprland-qt-support + hyprland-qtutils + aquamarine + hyprland +) + +WITH_DEPS=0 +DO_INSTALL=0 +DO_DRY_RUN=0 +FETCH_LATEST=0 +RESTORE=0 +VIA_HELPER=0 +ONLY_LIST="" +SKIP_LIST="" +SET_ARGS=() + +usage() { + sed -n '2,120p' "$0" | sed -n '/^# /p' | sed 's/^# \{0,1\}//' +} + +ensure_tags_file() { + if [[ ! -f "$TAGS_FILE" ]]; then + echo "[INFO] Creating default tags file: $TAGS_FILE" | tee -a "$SUMMARY_LOG" + cat > "$TAGS_FILE" <<'EOF' +HYPRLAND_TAG=v0.50.1 +AQUAMARINE_TAG=v0.9.2 +HYPRUTILS_TAG=v0.8.2 +HYPRLANG_TAG=v0.6.4 +HYPRGRAPHICS_TAG=v0.1.5 +HYPRWAYLAND_SCANNER_TAG=v0.4.5 +HYPRLAND_PROTOCOLS_TAG=v0.6.4 +HYPRLAND_QT_SUPPORT_TAG=v0.1.0 +HYPRLAND_QTUTILS_TAG=v0.1.4 +EOF + fi +} + +backup_tags() { + ensure_tags_file + cp "$TAGS_FILE" "$TAGS_FILE.bak-$TS" + echo "[INFO] Backed up $TAGS_FILE to $TAGS_FILE.bak-$TS" | tee -a "$SUMMARY_LOG" +} + +restore_tags() { + latest_bak=$(ls -1t "$TAGS_FILE".bak-* 2>/dev/null | head -n1 || true) + if [[ -z "$latest_bak" ]]; then + echo "[ERROR] No backup tags file found." | tee -a "$SUMMARY_LOG" + exit 1 + fi + cp "$latest_bak" "$TAGS_FILE" + echo "[INFO] Restored tags from $latest_bak" | tee -a "$SUMMARY_LOG" +} + +set_tags_from_args() { + ensure_tags_file + backup_tags + # load existing into assoc map + declare -A map + while IFS='=' read -r k v; do + [[ -z "$k" || "$k" =~ ^# ]] && continue + map[$k]="$v" + done < "$TAGS_FILE" + for kv in "${SET_ARGS[@]}"; do + key="${kv%%=*}" + val="${kv#*=}" + case "$key" in + HYPRLAND|hyprland) key=HYPRLAND_TAG ;; + AQUAMARINE|aquamarine) key=AQUAMARINE_TAG ;; + HYPRUTILS|hyprutils) key=HYPRUTILS_TAG ;; + HYPRLANG|hyprlang) key=HYPRLANG_TAG ;; + HYPRGRAPHICS|hyprgraphics) key=HYPRGRAPHICS_TAG ;; + HYPRWAYLAND_SCANNER|hyprwayland-scanner|hyprwayland_scanner) key=HYPRWAYLAND_SCANNER_TAG ;; + HYPRLAND_PROTOCOLS|hyprland-protocols|hyprland_protocols) key=HYPRLAND_PROTOCOLS_TAG ;; + HYPRLAND_QT_SUPPORT|hyprland-qt-support|hyprland_qt_support) key=HYPRLAND_QT_SUPPORT_TAG ;; + HYPRLAND_QTUTILS|hyprland-qtutils|hyprland_qtutils) key=HYPRLAND_QTUTILS_TAG ;; + esac + map[$key]="$val" + done + { + for k in "${!map[@]}"; do + echo "$k=${map[$k]}" + done | sort + } > "$TAGS_FILE" + echo "[INFO] Updated $TAGS_FILE with provided tags" | tee -a "$SUMMARY_LOG" +} + +# Fetch latest release tags from GitHub for the stack +fetch_latest_tags() { + ensure_tags_file + backup_tags + + # Require curl; jq is preferred. Fallback to grep/sed if jq is missing. + if ! command -v curl >/dev/null 2>&1; then + echo "[ERROR] curl is required." | tee -a "$SUMMARY_LOG" + exit 1 + fi + + declare -A repos=( + [HYPRLAND_TAG]="hyprwm/Hyprland" + [AQUAMARINE_TAG]="hyprwm/aquamarine" + [HYPRUTILS_TAG]="hyprwm/hyprutils" + [HYPRLANG_TAG]="hyprwm/hyprlang" + [HYPRGRAPHICS_TAG]="hyprwm/hyprgraphics" + [HYPRWAYLAND_SCANNER_TAG]="hyprwm/hyprwayland-scanner" + [HYPRLAND_PROTOCOLS_TAG]="hyprwm/hyprland-protocols" + [HYPRLAND_QT_SUPPORT_TAG]="hyprwm/hyprland-qt-support" + [HYPRLAND_QTUTILS_TAG]="hyprwm/hyprland-qtutils" + ) + + declare -A tags + + for key in "${!repos[@]}"; do + repo="${repos[$key]}" + url="https://api.github.com/repos/$repo/releases/latest" + echo "[INFO] Fetching latest tag for $repo" | tee -a "$SUMMARY_LOG" + body=$(curl -fsSL "$url" || true) + if [[ -z "$body" ]]; then + echo "[WARN] Empty response for $repo; leaving $key unchanged" | tee -a "$SUMMARY_LOG" + continue + fi + if command -v jq >/dev/null 2>&1; then + tag=$(printf '%s' "$body" | jq -r '.tag_name // empty') + else + tag=$(printf '%s' "$body" | grep -m1 '"tag_name"' | sed -E 's/.*"tag_name"\s*:\s*"([^"]+)".*/\1/') + fi + if [[ -n "$tag" ]]; then + tags[$key]="$tag" + else + echo "[WARN] Could not parse tag for $repo; leaving $key unchanged" | tee -a "$SUMMARY_LOG" + fi + done + + # Merge into existing file + declare -A map + while IFS='=' read -r k v; do + [[ -z "$k" || "$k" =~ ^# ]] && continue + map[$k]="$v" + done < "$TAGS_FILE" + + for k in "${!tags[@]}"; do + map[$k]="${tags[$k]}" + done + + { + for k in "${!map[@]}"; do + echo "$k=${map[$k]}" + done | sort + } > "$TAGS_FILE" + + echo "[INFO] Refreshed tags written to $TAGS_FILE" | tee -a "$SUMMARY_LOG" +} + +# Build runner using module scripts. Uses env vars from TAGS_FILE. +run_stack() { + # shellcheck disable=SC1090 + source "$TAGS_FILE" + # Export tags so child scripts inherit them + export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG HYPRWAYLAND_SCANNER_TAG HYPRLAND_PROTOCOLS_TAG HYPRLAND_QT_SUPPORT_TAG HYPRLAND_QTUTILS_TAG + + # Optionally install dependencies (not dry-run) + if [[ $WITH_DEPS -eq 1 ]]; then + echo "[INFO] Installing dependencies via 00-dependencies.sh" | tee -a "$SUMMARY_LOG" + if ! "$REPO_ROOT/install-scripts/00-dependencies.sh"; then + echo "[ERROR] Dependencies installation failed." | tee -a "$SUMMARY_LOG" + exit 1 + fi + fi + + # Build module list based on --only/--skip + local modules + if [[ -n "$ONLY_LIST" ]]; then + IFS=',' read -r -a modules <<< "$ONLY_LIST" + else + modules=("${DEFAULT_MODULES[@]}") + fi + if [[ -n "$SKIP_LIST" ]]; then + IFS=',' read -r -a _skips <<< "$SKIP_LIST" + local filtered=() + for m in "${modules[@]}"; do + local skip_it=0 + for s in "${_skips[@]}"; do + [[ "$m" == "$s" ]] && { skip_it=1; break; } + done + [[ $skip_it -eq 0 ]] && filtered+=("$m") + done + modules=("${filtered[@]}") + fi + + declare -A results + + for mod in "${modules[@]}"; do + local script="$REPO_ROOT/install-scripts/$mod.sh" + echo "\n=== $mod ===" | tee -a "$SUMMARY_LOG" + [[ -f "$script" ]] || { echo "[WARN] Missing $script" | tee -a "$SUMMARY_LOG"; results[$mod]="MISSING"; continue; } + chmod +x "$script" || true + if [[ $DO_DRY_RUN -eq 1 ]]; then + if DRY_RUN=1 "$script"; then results[$mod]="PASS"; else results[$mod]="FAIL"; fi + else + if "$script"; then results[$mod]="INSTALLED"; else results[$mod]="FAIL"; fi + fi + done + + { + echo "\nSummary:" + for mod in "${modules[@]}"; do + printf "%-24s %s\n" "$mod" "${results[$mod]:-SKIPPED}" + done + echo "\nLogs under: $LOG_DIR. This run: $SUMMARY_LOG" + } | tee -a "$SUMMARY_LOG" + + # Non-zero on any FAILs + local failed=0 + for mod in "${modules[@]}"; do + [[ "${results[$mod]:-}" == FAIL ]] && failed=1 + done + return $failed +} + +# Parse args +while [[ $# -gt 0 ]]; do + case "$1" in + -h|--help) usage; exit 0 ;; + --with-deps) WITH_DEPS=1; shift ;; + --dry-run) DO_DRY_RUN=1; shift ;; + --install) DO_INSTALL=1; shift ;; + --fetch-latest) FETCH_LATEST=1; shift ;; + --restore) RESTORE=1; shift ;; + --via-helper) VIA_HELPER=1; shift ;; + --only) ONLY_LIST=${2:-}; shift 2 ;; + --skip) SKIP_LIST=${2:-}; shift 2 ;; + --set) + shift + while [[ $# -gt 0 && "$1" != --* ]]; do + SET_ARGS+=("$1") + shift + done + ;; + *) echo "Unknown argument: $1"; exit 2 ;; + esac +done + +# Validate options +if [[ $DO_INSTALL -eq 1 && $DO_DRY_RUN -eq 1 ]]; then + echo "[ERROR] Use either --dry-run or --install, not both." | tee -a "$SUMMARY_LOG" + exit 2 +fi + +ensure_tags_file + +# Apply tag operations +if [[ $RESTORE -eq 1 ]]; then + restore_tags +fi +if [[ ${#SET_ARGS[@]} -gt 0 ]]; then + set_tags_from_args +fi +if [[ $FETCH_LATEST -eq 1 ]]; then + fetch_latest_tags +fi + +# Run the stack +if [[ $DO_DRY_RUN -eq 0 && $DO_INSTALL -eq 0 ]]; then + echo "[INFO] No build option specified. Defaulting to --dry-run." | tee -a "$SUMMARY_LOG" + DO_DRY_RUN=1 +fi + +# If using helper, delegate to dry-run-build.sh for summary-only output +if [[ $VIA_HELPER -eq 1 ]]; then + if [[ $DO_INSTALL -eq 1 ]]; then + echo "[ERROR] --via-helper cannot be combined with --install (helper is dry-run only)." | tee -a "$SUMMARY_LOG" + exit 2 + fi + # shellcheck disable=SC1090 + source "$TAGS_FILE" + export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG HYPRWAYLAND_SCANNER_TAG HYPRLAND_PROTOCOLS_TAG HYPRLAND_QT_SUPPORT_TAG HYPRLAND_QTUTILS_TAG + helper="$REPO_ROOT/dry-run-build.sh" + if [[ ! -x "$helper" ]]; then + echo "[ERROR] dry-run-build.sh not found or not executable at $helper" | tee -a "$SUMMARY_LOG" + exit 1 + fi + args=() + [[ $WITH_DEPS -eq 1 ]] && args+=("--with-deps") + [[ -n "$ONLY_LIST" ]] && args+=("--only" "$ONLY_LIST") + [[ -n "$SKIP_LIST" ]] && args+=("--skip" "$SKIP_LIST") + echo "[INFO] Delegating to dry-run-build.sh ${args[*]}" | tee -a "$SUMMARY_LOG" + "$helper" "${args[@]}" + exit $? +fi + +run_stack From 5a348361198d5cf566ad7e0a433184063ee68b58 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 8 Oct 2025 01:37:33 -0400 Subject: [PATCH 03/20] upd AQ to 0.9.3 built first On branch hl-051 Your branch is up to date with 'origin/hl-051'. Changes to be committed: modified: dry-run-build.sh modified: hypr-tags.env modified: update-hyprland.sh --- dry-run-build.sh | 2 +- hypr-tags.env | 2 +- update-hyprland.sh | 39 ++++++++++++++++++++++++++++++++++++++- 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/dry-run-build.sh b/dry-run-build.sh index 4c3fb8e..eb630e9 100644 --- a/dry-run-build.sh +++ b/dry-run-build.sh @@ -27,12 +27,12 @@ SUMMARY_LOG="$LOG_DIR/build-dry-run-$TS.log" DEFAULT_MODULES=( hyprutils hyprlang + aquamarine hyprgraphics hyprwayland-scanner hyprland-protocols hyprland-qt-support hyprland-qtutils - aquamarine hyprland ) diff --git a/hypr-tags.env b/hypr-tags.env index f9b2ac7..9a2eed5 100644 --- a/hypr-tags.env +++ b/hypr-tags.env @@ -3,7 +3,7 @@ # Each module script reads its TAG from these environment variables if set. HYPRLAND_TAG=v0.51.1 -AQUAMARINE_TAG=v0.9.2 +AQUAMARINE_TAG=v0.9.3 HYPRUTILS_TAG=v0.8.2 HYPRLANG_TAG=v0.6.4 HYPRGRAPHICS_TAG=v0.1.5 diff --git a/update-hyprland.sh b/update-hyprland.sh index 5c502dc..0714e57 100644 --- a/update-hyprland.sh +++ b/update-hyprland.sh @@ -35,12 +35,12 @@ SUMMARY_LOG="$LOG_DIR/update-hypr-$TS.log" DEFAULT_MODULES=( hyprutils hyprlang + aquamarine hyprgraphics hyprwayland-scanner hyprland-protocols hyprland-qt-support hyprland-qtutils - aquamarine hyprland ) @@ -226,6 +226,43 @@ run_stack() { modules=("${filtered[@]}") fi + # Ensure aquamarine is installed before hyprland on install runs + if [[ $DO_INSTALL -eq 1 ]]; then + local has_hl=0 has_aqua=0 + for m in "${modules[@]}"; do + [[ "$m" == "hyprland" ]] && has_hl=1 + [[ "$m" == "aquamarine" ]] && has_aqua=1 + done + if [[ $has_hl -eq 1 ]]; then + if [[ $has_aqua -eq 0 ]]; then + # Prepend aquamarine if missing + modules=("aquamarine" "${modules[@]}") + fi + # Reorder to ensure aquamarine appears before hyprland + # Remove existing occurrences and rebuild in correct order + local tmp=() + local inserted_aqua=0 + for m in "${modules[@]}"; do + if [[ "$m" == "aquamarine" ]]; then + if [[ $inserted_aqua -eq 0 ]]; then + tmp+=("aquamarine") + inserted_aqua=1 + fi + elif [[ "$m" == "hyprland" ]]; then + # ensure aquamarine is already present before adding hyprland + if [[ $inserted_aqua -eq 0 ]]; then + tmp+=("aquamarine") + inserted_aqua=1 + fi + tmp+=("hyprland") + else + tmp+=("$m") + fi + done + modules=("${tmp[@]}") + fi + fi + declare -A results for mod in "${modules[@]}"; do From 0d1ca1a7c8e4fc5dbad6310b13d1b6359d50e7bd Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 8 Oct 2025 01:40:59 -0400 Subject: [PATCH 04/20] Fixing wl protocol build error On branch hl-051 Your branch is up to date with 'origin/hl-051'. Changes to be committed: modified: dry-run-build.sh modified: hypr-tags.env new file: install-scripts/wayland-protocols-src.sh modified: update-hyprland.sh --- dry-run-build.sh | 1 + hypr-tags.env | 1 + install-scripts/wayland-protocols-src.sh | 66 ++++++++++++++++++++++++ update-hyprland.sh | 34 +++++++++--- 4 files changed, 95 insertions(+), 7 deletions(-) create mode 100644 install-scripts/wayland-protocols-src.sh diff --git a/dry-run-build.sh b/dry-run-build.sh index eb630e9..988202d 100644 --- a/dry-run-build.sh +++ b/dry-run-build.sh @@ -27,6 +27,7 @@ SUMMARY_LOG="$LOG_DIR/build-dry-run-$TS.log" DEFAULT_MODULES=( hyprutils hyprlang + wayland-protocols-src aquamarine hyprgraphics hyprwayland-scanner diff --git a/hypr-tags.env b/hypr-tags.env index 9a2eed5..28fade9 100644 --- a/hypr-tags.env +++ b/hypr-tags.env @@ -11,3 +11,4 @@ HYPRWAYLAND_SCANNER_TAG=v0.4.5 HYPRLAND_PROTOCOLS_TAG=v0.6.4 HYPRLAND_QT_SUPPORT_TAG=v0.1.0 HYPRLAND_QTUTILS_TAG=v0.1.4 +WAYLAND_PROTOCOLS_TAG=1.46 diff --git a/install-scripts/wayland-protocols-src.sh b/install-scripts/wayland-protocols-src.sh new file mode 100644 index 0000000..cc9c979 --- /dev/null +++ b/install-scripts/wayland-protocols-src.sh @@ -0,0 +1,66 @@ +#!/bin/bash +# 💫 https://github.com/JaKooLit 💫 # +# Build and install wayland-protocols from source +# Provides a newer wayland-protocols.pc for pkg-config when distro version is too old + +#specific tag or release (e.g., 1.45, 1.46) +tag="1.46" +# Allow environment override +if [ -n "${WAYLAND_PROTOCOLS_TAG:-}" ]; then tag="$WAYLAND_PROTOCOLS_TAG"; fi + +# Dry-run support +DO_INSTALL=1 +if [ "$1" = "--dry-run" ] || [ "${DRY_RUN}" = "1" ] || [ "${DRY_RUN}" = "true" ]; then + DO_INSTALL=0 + echo "${NOTE} DRY RUN: install step will be skipped." +fi + +## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +# Change the working directory to the parent directory of the script +PARENT_DIR="$SCRIPT_DIR/.." +cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } + +# Source the global functions script +if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then + echo "Failed to source Global_functions.sh" + exit 1 +fi + +# Set the name of the log file to include the current date and time +LOG="Install-Logs/install-$(date +%d-%H%M%S)_wayland-protocols.log" +MLOG="install-$(date +%d-%H%M%S)_wayland-protocols2.log" + +printf "\n%s - Installing ${YELLOW}wayland-protocols (from source)${RESET} .... \n" "${INFO}" + +# Clean previous clone +if [ -d "wayland-protocols" ]; then + rm -rf "wayland-protocols" +fi + +# Clone and build (meson) +# Upstream: https://gitlab.freedesktop.org/wayland/wayland-protocols.git +printf "${INFO} Installing ${YELLOW}wayland-protocols $tag${RESET} ...\n" +if git clone --depth=1 -b "$tag" https://gitlab.freedesktop.org/wayland/wayland-protocols.git; then + cd wayland-protocols || exit 1 + # Install to /usr/local so pkg-config can prefer it over distro /usr + meson setup build --prefix=/usr/local + meson compile -C build -j"$(nproc 2>/dev/null || getconf _NPROCESSORS_CONF)" + if [ $DO_INSTALL -eq 1 ]; then + if sudo meson install -C build 2>&1 | tee -a "$MLOG" ; then + printf "${OK} ${MAGENTA}wayland-protocols $tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG" + else + echo -e "${ERROR} Installation failed for ${YELLOW}wayland-protocols $tag${RESET}" 2>&1 | tee -a "$MLOG" + fi + else + echo "${NOTE} DRY RUN: Skipping installation of wayland-protocols $tag." + fi + # Move additional logs to Install-Logs directory if they exist + [ -f "$MLOG" ] && mv "$MLOG" ../Install-Logs/ || true + cd .. +else + echo -e "${ERROR} Download failed for ${YELLOW}wayland-protocols $tag${RESET}" 2>&1 | tee -a "$LOG" +fi + +printf "\n%.0s" {1..2} \ No newline at end of file diff --git a/update-hyprland.sh b/update-hyprland.sh index 0714e57..5328467 100644 --- a/update-hyprland.sh +++ b/update-hyprland.sh @@ -35,6 +35,7 @@ SUMMARY_LOG="$LOG_DIR/update-hypr-$TS.log" DEFAULT_MODULES=( hyprutils hyprlang + wayland-protocols-src aquamarine hyprgraphics hyprwayland-scanner @@ -226,30 +227,49 @@ run_stack() { modules=("${filtered[@]}") fi - # Ensure aquamarine is installed before hyprland on install runs + # Ensure wayland-protocols-src and aquamarine are installed before hyprland on install runs if [[ $DO_INSTALL -eq 1 ]]; then - local has_hl=0 has_aqua=0 + local has_hl=0 has_aqua=0 has_wp=0 for m in "${modules[@]}"; do [[ "$m" == "hyprland" ]] && has_hl=1 [[ "$m" == "aquamarine" ]] && has_aqua=1 + [[ "$m" == "wayland-protocols-src" ]] && has_wp=1 done if [[ $has_hl -eq 1 ]]; then + # ensure wayland-protocols-src present + if [[ $has_wp -eq 0 ]]; then + modules=("wayland-protocols-src" "${modules[@]}") + fi + # ensure aquamarine present if [[ $has_aqua -eq 0 ]]; then - # Prepend aquamarine if missing modules=("aquamarine" "${modules[@]}") fi - # Reorder to ensure aquamarine appears before hyprland + # Reorder to ensure wayland-protocols-src and aquamarine appear before hyprland # Remove existing occurrences and rebuild in correct order local tmp=() - local inserted_aqua=0 + local inserted_wp=0 inserted_aqua=0 for m in "${modules[@]}"; do - if [[ "$m" == "aquamarine" ]]; then + if [[ "$m" == "wayland-protocols-src" ]]; then + if [[ $inserted_wp -eq 0 ]]; then + tmp+=("wayland-protocols-src") + inserted_wp=1 + fi + elif [[ "$m" == "aquamarine" ]]; then if [[ $inserted_aqua -eq 0 ]]; then + # ensure protocols before aquamarine + if [[ $inserted_wp -eq 0 ]]; then + tmp+=("wayland-protocols-src") + inserted_wp=1 + fi tmp+=("aquamarine") inserted_aqua=1 fi elif [[ "$m" == "hyprland" ]]; then - # ensure aquamarine is already present before adding hyprland + # ensure protocols and aquamarine already present + if [[ $inserted_wp -eq 0 ]]; then + tmp+=("wayland-protocols-src") + inserted_wp=1 + fi if [[ $inserted_aqua -eq 0 ]]; then tmp+=("aquamarine") inserted_aqua=1 From 47b260d877a2682c337097e795963decaa5450a4 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 8 Oct 2025 01:45:18 -0400 Subject: [PATCH 05/20] wrong branch for wlr-protocols On branch hl-051 Your branch is up to date with 'origin/hl-051'. Changes to be committed: modified: hypr-tags.env modified: install-scripts/wayland-protocols-src.sh modified: update-hyprland.sh --- hypr-tags.env | 2 +- install-scripts/wayland-protocols-src.sh | 21 +++++++++++++++++++-- update-hyprland.sh | 4 ++-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/hypr-tags.env b/hypr-tags.env index 28fade9..6757bbe 100644 --- a/hypr-tags.env +++ b/hypr-tags.env @@ -11,4 +11,4 @@ HYPRWAYLAND_SCANNER_TAG=v0.4.5 HYPRLAND_PROTOCOLS_TAG=v0.6.4 HYPRLAND_QT_SUPPORT_TAG=v0.1.0 HYPRLAND_QTUTILS_TAG=v0.1.4 -WAYLAND_PROTOCOLS_TAG=1.46 +WAYLAND_PROTOCOLS_TAG=1.45 diff --git a/install-scripts/wayland-protocols-src.sh b/install-scripts/wayland-protocols-src.sh index cc9c979..f48f09d 100644 --- a/install-scripts/wayland-protocols-src.sh +++ b/install-scripts/wayland-protocols-src.sh @@ -4,7 +4,7 @@ # Provides a newer wayland-protocols.pc for pkg-config when distro version is too old #specific tag or release (e.g., 1.45, 1.46) -tag="1.46" +tag="1.45" # Allow environment override if [ -n "${WAYLAND_PROTOCOLS_TAG:-}" ]; then tag="$WAYLAND_PROTOCOLS_TAG"; fi @@ -42,8 +42,25 @@ fi # Clone and build (meson) # Upstream: https://gitlab.freedesktop.org/wayland/wayland-protocols.git printf "${INFO} Installing ${YELLOW}wayland-protocols $tag${RESET} ...\n" -if git clone --depth=1 -b "$tag" https://gitlab.freedesktop.org/wayland/wayland-protocols.git; then +repo_url="https://gitlab.freedesktop.org/wayland/wayland-protocols.git" +if git clone --depth=1 --filter=blob:none "$repo_url" wayland-protocols; then cd wayland-protocols || exit 1 + # Fetch tags and attempt to checkout the requested tag, trying both raw and v-prefixed + git fetch --tags --depth=1 >/dev/null 2>&1 || true + checked_out=0 + for candidate in "$tag" "v$tag"; do + if git rev-parse -q --verify "refs/tags/$candidate" >/dev/null; then + git checkout -q "refs/tags/$candidate" + checked_out=1 + break + fi + done + if [ "$checked_out" -ne 1 ]; then + echo "${ERROR} Tag $tag not found in $repo_url" | tee -a "$LOG" + echo "${NOTE} Available tags (truncated):" | tee -a "$LOG" + git tag --list | tail -n 20 | tee -a "$LOG" || true + exit 1 + fi # Install to /usr/local so pkg-config can prefer it over distro /usr meson setup build --prefix=/usr/local meson compile -C build -j"$(nproc 2>/dev/null || getconf _NPROCESSORS_CONF)" diff --git a/update-hyprland.sh b/update-hyprland.sh index 5328467..94e10ef 100644 --- a/update-hyprland.sh +++ b/update-hyprland.sh @@ -196,7 +196,7 @@ run_stack() { # shellcheck disable=SC1090 source "$TAGS_FILE" # Export tags so child scripts inherit them - export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG HYPRWAYLAND_SCANNER_TAG HYPRLAND_PROTOCOLS_TAG HYPRLAND_QT_SUPPORT_TAG HYPRLAND_QTUTILS_TAG +export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG HYPRWAYLAND_SCANNER_TAG HYPRLAND_PROTOCOLS_TAG HYPRLAND_QT_SUPPORT_TAG HYPRLAND_QTUTILS_TAG WAYLAND_PROTOCOLS_TAG # Optionally install dependencies (not dry-run) if [[ $WITH_DEPS -eq 1 ]]; then @@ -369,7 +369,7 @@ if [[ $VIA_HELPER -eq 1 ]]; then fi # shellcheck disable=SC1090 source "$TAGS_FILE" - export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG HYPRWAYLAND_SCANNER_TAG HYPRLAND_PROTOCOLS_TAG HYPRLAND_QT_SUPPORT_TAG HYPRLAND_QTUTILS_TAG +export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG HYPRWAYLAND_SCANNER_TAG HYPRLAND_PROTOCOLS_TAG HYPRLAND_QT_SUPPORT_TAG HYPRLAND_QTUTILS_TAG WAYLAND_PROTOCOLS_TAG helper="$REPO_ROOT/dry-run-build.sh" if [[ ! -x "$helper" ]]; then echo "[ERROR] dry-run-build.sh not found or not executable at $helper" | tee -a "$SUMMARY_LOG" From b61d659a48f91a6c7f197d03d7acf57e8f0b6dc3 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 8 Oct 2025 02:10:34 -0400 Subject: [PATCH 06/20] Fix "mv:" errors hyprutils,hyprlang build b4 HL On branch hl-051 Your branch is up to date with 'origin/hl-051'. Changes to be committed: modified: auto-install.sh modified: dry-run-build.sh modified: install-scripts/aquamarine.sh modified: install-scripts/hyprgraphics.sh modified: install-scripts/hyprland-protocols.sh modified: install-scripts/hyprland-qt-support.sh modified: install-scripts/hyprland-qtutils.sh modified: install-scripts/hyprland.sh modified: install-scripts/hyprlang.sh modified: install-scripts/hyprutils.sh modified: install-scripts/hyprwayland-scanner.sh modified: install.sh modified: preset.sh modified: update-hyprland.sh --- auto-install.sh | 0 dry-run-build.sh | 0 install-scripts/aquamarine.sh | 2 +- install-scripts/hyprgraphics.sh | 2 +- install-scripts/hyprland-protocols.sh | 2 +- install-scripts/hyprland-qt-support.sh | 2 +- install-scripts/hyprland-qtutils.sh | 2 +- install-scripts/hyprland.sh | 2 +- install-scripts/hyprlang.sh | 2 +- install-scripts/hyprutils.sh | 2 +- install-scripts/hyprwayland-scanner.sh | 2 +- install.sh | 10 ++++ preset.sh | 0 update-hyprland.sh | 71 +++++++++++++++----------- 14 files changed, 60 insertions(+), 39 deletions(-) mode change 100644 => 100755 auto-install.sh mode change 100644 => 100755 dry-run-build.sh mode change 100644 => 100755 preset.sh mode change 100644 => 100755 update-hyprland.sh diff --git a/auto-install.sh b/auto-install.sh old mode 100644 new mode 100755 diff --git a/dry-run-build.sh b/dry-run-build.sh old mode 100644 new mode 100755 diff --git a/install-scripts/aquamarine.sh b/install-scripts/aquamarine.sh index b5ce758..56ee761 100755 --- a/install-scripts/aquamarine.sh +++ b/install-scripts/aquamarine.sh @@ -57,7 +57,7 @@ if git clone --recursive -b $tag https://github.com/hyprwm/aquamarine.git; then echo "${NOTE} DRY RUN: Skipping installation of aquamarine $tag." fi #moving the addional logs to Install-Logs directory - mv $MLOG ../Install-Logs/ || true + [ -f "$MLOG" ] && mv "$MLOG" ../Install-Logs/ cd .. else echo -e "${ERROR} Download failed for ${YELLOW}aquamarine $tag${RESET}" 2>&1 | tee -a "$LOG" diff --git a/install-scripts/hyprgraphics.sh b/install-scripts/hyprgraphics.sh index 8a7cf9b..9674523 100755 --- a/install-scripts/hyprgraphics.sh +++ b/install-scripts/hyprgraphics.sh @@ -69,7 +69,7 @@ if git clone --recursive -b $tag https://github.com/hyprwm/hyprgraphics.git; the echo "${NOTE} DRY RUN: Skipping installation of hyprgraphics $tag." fi #moving the addional logs to Install-Logs directory - mv $MLOG ../Install-Logs/ || true + [ -f "$MLOG" ] && mv "$MLOG" ../Install-Logs/ cd .. else echo -e "${ERROR} Download failed for ${YELLOW}hyprgraphics $graphics${RESET}" 2>&1 | tee -a "$LOG" diff --git a/install-scripts/hyprland-protocols.sh b/install-scripts/hyprland-protocols.sh index 55740f6..69b1f9c 100755 --- a/install-scripts/hyprland-protocols.sh +++ b/install-scripts/hyprland-protocols.sh @@ -56,7 +56,7 @@ if git clone --recursive -b $tag https://github.com/hyprwm/hyprland-protocols.gi echo "${NOTE} DRY RUN: Skipping installation of hyprland-protocols $tag." fi #moving the addional logs to Install-Logs directory - mv $MLOG ../Install-Logs/ || true + [ -f "$MLOG" ] && mv "$MLOG" ../Install-Logs/ cd .. else echo -e "${ERROR} Download failed for ${YELLOW}hyprland-protocols tag${RESET}" 2>&1 | tee -a "$LOG" diff --git a/install-scripts/hyprland-qt-support.sh b/install-scripts/hyprland-qt-support.sh index be1b491..b9fb83e 100755 --- a/install-scripts/hyprland-qt-support.sh +++ b/install-scripts/hyprland-qt-support.sh @@ -77,7 +77,7 @@ if git clone --recursive -b $tag https://github.com/hyprwm/hyprland-qt-support.g echo "${NOTE} DRY RUN: Skipping installation of hyprland-qt-support $tag." fi #moving the addional logs to Install-Logs directory - mv $MLOG ../Install-Logs/ || true + [ -f "$MLOG" ] && mv "$MLOG" ../Install-Logs/ cd .. else echo -e "${ERROR} Download failed for ${YELLOW}hyprland-qt-support $tag${RESET}" 2>&1 | tee -a "$LOG" diff --git a/install-scripts/hyprland-qtutils.sh b/install-scripts/hyprland-qtutils.sh index b21ec57..caff755 100755 --- a/install-scripts/hyprland-qtutils.sh +++ b/install-scripts/hyprland-qtutils.sh @@ -79,7 +79,7 @@ if git clone --recursive -b $tag https://github.com/hyprwm/hyprland-qtutils.git; echo "${NOTE} DRY RUN: Skipping installation of hyprland-qtutils $tag." fi #moving the addional logs to Install-Logs directory - mv $MLOG ../Install-Logs/ || true + [ -f "$MLOG" ] && mv "$MLOG" ../Install-Logs/ cd .. else echo -e "${ERROR} Download failed for ${YELLOW}hyprland-qtutils $tag${RESET}" 2>&1 | tee -a "$LOG" diff --git a/install-scripts/hyprland.sh b/install-scripts/hyprland.sh index aba1768..2aa5d80 100755 --- a/install-scripts/hyprland.sh +++ b/install-scripts/hyprland.sh @@ -94,7 +94,7 @@ if git clone --recursive -b $tag "https://github.com/hyprwm/Hyprland"; then else echo "${NOTE} DRY RUN: Skipping installation of Hyprland $tag." fi - mv $MLOG ../Install-Logs/ || true + [ -f "$MLOG" ] && mv "$MLOG" ../Install-Logs/ cd .. else echo -e "${ERROR} Download failed for ${YELLOW}Hyprland $tag${RESET}" 2>&1 | tee -a "$LOG" diff --git a/install-scripts/hyprlang.sh b/install-scripts/hyprlang.sh index 9ffc16c..90c51f4 100755 --- a/install-scripts/hyprlang.sh +++ b/install-scripts/hyprlang.sh @@ -57,7 +57,7 @@ if git clone --recursive -b $tag https://github.com/hyprwm/hyprlang.git; then echo "${NOTE} DRY RUN: Skipping installation of hyprlang $tag." fi #moving the addional logs to Install-Logs directory - mv $MLOG ../Install-Logs/ || true + [ -f "$MLOG" ] && mv "$MLOG" ../Install-Logs/ cd .. else echo -e "${ERROR} Download failed for ${YELLOW}hyprlang $tag${RESET}" 2>&1 | tee -a "$LOG" diff --git a/install-scripts/hyprutils.sh b/install-scripts/hyprutils.sh index 4ba5e2e..991fb2e 100755 --- a/install-scripts/hyprutils.sh +++ b/install-scripts/hyprutils.sh @@ -54,7 +54,7 @@ if git clone -b $tag "https://github.com/hyprwm/hyprutils.git"; then else echo "${NOTE} DRY RUN: Skipping installation of hyprutils $tag." fi - mv $MLOG ../Install-Logs/ || true + [ -f "$MLOG" ] && mv "$MLOG" ../Install-Logs/ cd .. else echo -e "${ERROR} Download failed for hyprutils" 2>&1 | tee -a "$LOG" diff --git a/install-scripts/hyprwayland-scanner.sh b/install-scripts/hyprwayland-scanner.sh index 31b0b4e..c95b1f1 100755 --- a/install-scripts/hyprwayland-scanner.sh +++ b/install-scripts/hyprwayland-scanner.sh @@ -72,7 +72,7 @@ if git clone --recursive -b $tag https://github.com/hyprwm/hyprwayland-scanner.g echo "${NOTE} DRY RUN: Skipping installation of hyprwayland-scanner $tag." fi #moving the addional logs to Install-Logs directory - mv $MLOG ../Install-Logs/ || true + [ -f "$MLOG" ] && mv "$MLOG" ../Install-Logs/ cd .. else echo -e "${ERROR} Download failed for hyprwayland-scanner. Please check log." 2>&1 | tee -a "$LOG" diff --git a/install.sh b/install.sh index d3bc78b..adf8e1a 100755 --- a/install.sh +++ b/install.sh @@ -167,6 +167,13 @@ execute_script() { fi } +# Load centralized Hyprland stack tags if present and export for child scripts +if [ -f "./hypr-tags.env" ]; then + # shellcheck disable=SC1091 + source "./hypr-tags.env" + export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG HYPRWAYLAND_SCANNER_TAG HYPRLAND_PROTOCOLS_TAG HYPRLAND_QT_SUPPORT_TAG HYPRLAND_QTUTILS_TAG WAYLAND_PROTOCOLS_TAG +fi + ################# ## Default values for the options (will be overwritten by preset file if available) gtk_themes="OFF" @@ -383,6 +390,9 @@ execute_script "hyprland-qtutils.sh" sleep 1 execute_script "hyprland-protocols.sh" sleep 1 +# Ensure wayland-protocols (from source) is installed to satisfy Hyprland's >= 1.45 requirement +execute_script "wayland-protocols-src.sh" +sleep 1 execute_script "hyprland.sh" sleep 1 execute_script "hyprpolkitagent.sh" diff --git a/preset.sh b/preset.sh old mode 100644 new mode 100755 diff --git a/update-hyprland.sh b/update-hyprland.sh old mode 100644 new mode 100755 index 94e10ef..d407d18 --- a/update-hyprland.sh +++ b/update-hyprland.sh @@ -227,53 +227,64 @@ export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG H modules=("${filtered[@]}") fi - # Ensure wayland-protocols-src and aquamarine are installed before hyprland on install runs + # Ensure core prerequisites are installed before hyprland on install runs + # Order: wayland-protocols-src, hyprutils, hyprlang, aquamarine, hyprland if [[ $DO_INSTALL -eq 1 ]]; then - local has_hl=0 has_aqua=0 has_wp=0 + local has_hl=0 has_aqua=0 has_wp=0 has_utils=0 has_lang=0 for m in "${modules[@]}"; do [[ "$m" == "hyprland" ]] && has_hl=1 [[ "$m" == "aquamarine" ]] && has_aqua=1 [[ "$m" == "wayland-protocols-src" ]] && has_wp=1 + [[ "$m" == "hyprutils" ]] && has_utils=1 + [[ "$m" == "hyprlang" ]] && has_lang=1 done if [[ $has_hl -eq 1 ]]; then - # ensure wayland-protocols-src present - if [[ $has_wp -eq 0 ]]; then - modules=("wayland-protocols-src" "${modules[@]}") - fi - # ensure aquamarine present - if [[ $has_aqua -eq 0 ]]; then - modules=("aquamarine" "${modules[@]}") - fi - # Reorder to ensure wayland-protocols-src and aquamarine appear before hyprland + # ensure each prerequisite is present + [[ $has_wp -eq 0 ]] && modules=("wayland-protocols-src" "${modules[@]}") + [[ $has_utils -eq 0 ]] && modules=("hyprutils" "${modules[@]}") + [[ $has_lang -eq 0 ]] && modules=("hyprlang" "${modules[@]}") + [[ $has_aqua -eq 0 ]] && modules=("aquamarine" "${modules[@]}") + + # Reorder to exact sequence before hyprland # Remove existing occurrences and rebuild in correct order local tmp=() - local inserted_wp=0 inserted_aqua=0 + local inserted_wp=0 inserted_utils=0 inserted_lang=0 inserted_aqua=0 for m in "${modules[@]}"; do if [[ "$m" == "wayland-protocols-src" ]]; then - if [[ $inserted_wp -eq 0 ]]; then - tmp+=("wayland-protocols-src") - inserted_wp=1 + if [[ $inserted_wp -eq 0 ]]; then tmp+=("wayland-protocols-src"); inserted_wp=1; fi + elif [[ "$m" == "hyprutils" ]]; then + if [[ $inserted_utils -eq 0 ]]; then + # ensure protocols before utils + if [[ $inserted_wp -eq 0 ]]; then tmp+=("wayland-protocols-src"); inserted_wp=1; fi + tmp+=("hyprutils"); inserted_utils=1 + fi + elif [[ "$m" == "hyprlang" ]]; then + if [[ $inserted_lang -eq 0 ]]; then + # ensure utils before lang + if [[ $inserted_utils -eq 0 ]]; then + if [[ $inserted_wp -eq 0 ]]; then tmp+=("wayland-protocols-src"); inserted_wp=1; fi + tmp+=("hyprutils"); inserted_utils=1 + fi + tmp+=("hyprlang"); inserted_lang=1 fi elif [[ "$m" == "aquamarine" ]]; then if [[ $inserted_aqua -eq 0 ]]; then - # ensure protocols before aquamarine - if [[ $inserted_wp -eq 0 ]]; then - tmp+=("wayland-protocols-src") - inserted_wp=1 + # ensure lang before aquamarine + if [[ $inserted_lang -eq 0 ]]; then + if [[ $inserted_utils -eq 0 ]]; then + if [[ $inserted_wp -eq 0 ]]; then tmp+=("wayland-protocols-src"); inserted_wp=1; fi + tmp+=("hyprutils"); inserted_utils=1 + fi + tmp+=("hyprlang"); inserted_lang=1 fi - tmp+=("aquamarine") - inserted_aqua=1 + tmp+=("aquamarine"); inserted_aqua=1 fi elif [[ "$m" == "hyprland" ]]; then - # ensure protocols and aquamarine already present - if [[ $inserted_wp -eq 0 ]]; then - tmp+=("wayland-protocols-src") - inserted_wp=1 - fi - if [[ $inserted_aqua -eq 0 ]]; then - tmp+=("aquamarine") - inserted_aqua=1 - fi + # ensure all prerequisites already present + if [[ $inserted_wp -eq 0 ]]; then tmp+=("wayland-protocols-src"); inserted_wp=1; fi + if [[ $inserted_utils -eq 0 ]]; then tmp+=("hyprutils"); inserted_utils=1; fi + if [[ $inserted_lang -eq 0 ]]; then tmp+=("hyprlang"); inserted_lang=1; fi + if [[ $inserted_aqua -eq 0 ]]; then tmp+=("aquamarine"); inserted_aqua=1; fi tmp+=("hyprland") else tmp+=("$m") From ce70cf5c63040de95c8ee56b45646a0af3411d66 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 8 Oct 2025 12:22:29 -0400 Subject: [PATCH 07/20] [Docs] Created how install/upgrade Hyprland On branch hl-051 Your branch is up to date with 'origin/hl-051'. Changes to be committed: new file: Debian-Hyprland-Install-Upgrade.es.md new file: Debian-Hyprland-Install-Upgrade.md --- Debian-Hyprland-Install-Upgrade.es.md | 396 ++++++++++++++++++++++++++ Debian-Hyprland-Install-Upgrade.md | 396 ++++++++++++++++++++++++++ 2 files changed, 792 insertions(+) create mode 100644 Debian-Hyprland-Install-Upgrade.es.md create mode 100644 Debian-Hyprland-Install-Upgrade.md diff --git a/Debian-Hyprland-Install-Upgrade.es.md b/Debian-Hyprland-Install-Upgrade.es.md new file mode 100644 index 0000000..f79ca2d --- /dev/null +++ b/Debian-Hyprland-Install-Upgrade.es.md @@ -0,0 +1,396 @@ +# Guía de Instalación y Actualización de Debian-Hyprland + +Esta guía cubre los flujos de instalación y actualización mejorados para el proyecto Debian-Hyprland de KooL, incluyendo nuevas funciones de automatización, gestión centralizada de versiones y capacidades de dry-run. + +## Tabla de Contenidos + +1. [Resumen](#resumen) +2. [Nuevas Funciones](#nuevas-funciones) +3. [Gestión Central de Versiones](#gestión-central-de-versiones) +4. [Métodos de Instalación](#métodos-de-instalación) +5. [Flujos de Actualización](#flujos-de-actualización) +6. [Pruebas con Dry-Run](#pruebas-con-dry-run) +7. [Gestión de Logs](#gestión-de-logs) +8. [Uso Avanzado](#uso-avanzado) +9. [Solución de Problemas](#solución-de-problemas) + +## Resumen + +El proyecto Debian-Hyprland ahora incluye herramientas de automatización y gestión mejoradas, manteniendo la compatibilidad con el script original install.sh. Las principales adiciones son: + +- **Gestión centralizada de versiones** mediante `hypr-tags.env` +- **Orden automático de dependencias** para los requisitos de Hyprland 0.51.x +- **Pruebas de compilación con dry-run** sin modificar el sistema +- **Actualizaciones selectivas de componentes** con `update-hyprland.sh` +- **Obtención automática de últimas versiones** desde GitHub + +## Nuevas Funciones + +### install.sh mejorado +El script original ahora: + +- **Unifica versiones**: Lee `hypr-tags.env` y exporta variables de versión a todos los módulos +- **wayland-protocols automático**: Instala wayland-protocols desde el código fuente (≥1.45) antes de Hyprland +- **Orden robusto de dependencias**: Garantiza la secuencia correcta de requisitos + +### Nuevos Scripts + +#### update-hyprland.sh +Herramienta enfocada para gestionar y compilar solo el stack de Hyprland: +```bash +chmod +x ./update-hyprland.sh +./update-hyprland.sh --help # Ver todas las opciones +``` + +#### dry-run-build.sh +Herramienta de pruebas que compila componentes sin instalarlos: +```bash +chmod +x ./dry-run-build.sh +./dry-run-build.sh --help # Ver todas las opciones +``` + +#### wayland-protocols-src.sh +Módulo que compila wayland-protocols desde el origen para satisfacer los requisitos de Hyprland 0.51.x. + +## Gestión Central de Versiones + +### hypr-tags.env +Archivo con etiquetas de versión para todos los componentes de Hyprland: + +```bash +# Versiones actuales (ejemplo) +HYPRLAND_TAG=v0.51.1 +AQUAMARINE_TAG=v0.9.3 +HYPRUTILS_TAG=v0.8.2 +HYPRLANG_TAG=v0.6.4 +HYPRGRAPHICS_TAG=v0.1.5 +HYPRWAYLAND_SCANNER_TAG=v0.4.5 +HYPRLAND_PROTOCOLS_TAG=v0.6.4 +HYPRLAND_QT_SUPPORT_TAG=v0.1.0 +HYPRLAND_QTUTILS_TAG=v0.1.4 +WAYLAND_PROTOCOLS_TAG=1.45 +``` + +### Prioridad de Sobrescritura de Versiones +1. Variables de entorno (exportadas) +2. Valores en el archivo `hypr-tags.env` +3. Valores por defecto en cada módulo + +## Métodos de Instalación + +### Método 1: Instalación Completa Original +```bash +# Instalación estándar con todos los componentes +chmod +x install.sh +./install.sh +``` + +Ahora, este método automáticamente: +- Carga versiones desde `hypr-tags.env` +- Instala wayland-protocols desde el origen antes de Hyprland +- Mantiene el orden correcto de dependencias + +### Método 2: Solo el Stack de Hyprland +```bash +# Instala solo Hyprland y componentes esenciales +./update-hyprland.sh --install +``` + +### Método 3: Instalación Nueva con Últimas Versiones +```bash +# Obtiene últimas versiones de GitHub e instala +./update-hyprland.sh --fetch-latest --install +``` + +### Método 4: Instalación con Preset +```bash +# Usa un preset para elecciones automáticas +./install.sh --preset ./preset.sh +``` + +## Flujos de Actualización + +### Actualizar a la Última Versión de Hyprland + +#### Opción A: Descubrimiento Automático +```bash +# Obtiene las últimas etiquetas e instala +./update-hyprland.sh --fetch-latest --install +``` + +#### Opción B: Versión Específica +```bash +# Establece una versión específica de Hyprland +./update-hyprland.sh --set HYPRLAND=v0.51.1 --install +``` + +#### Opción C: Probar Antes de Instalar +```bash +# Prueba la compilación primero, luego instala si es exitoso +./update-hyprland.sh --fetch-latest --dry-run +# Si es exitoso: +./update-hyprland.sh --install +``` + +### Actualizar Componentes Individuales + +```bash +# Actualiza solo librerías núcleo (a menudo necesario para nuevas versiones de Hyprland) +./update-hyprland.sh --fetch-latest --install --only hyprutils,hyprlang + +# Actualiza aquamarine específicamente +./update-hyprland.sh --set AQUAMARINE=v0.9.3 --install --only aquamarine +``` + +### Actualizaciones Selectivas + +```bash +# Instalar todo excepto los componentes Qt +./update-hyprland.sh --install --skip hyprland-qt-support,hyprland-qtutils + +# Instalar solo componentes específicos +./update-hyprland.sh --install --only hyprland,aquamarine +``` + +## Pruebas con Dry-Run + +### ¿Por qué usar Dry-Run? +- Probar compatibilidad de compilación antes de instalar +- Validar combinaciones de versiones +- Depurar problemas de compilación sin cambios en el sistema +- Integración en CI/CD + +### Uso Básico de Dry-Run + +```bash +# Probar la configuración actual de versiones +./update-hyprland.sh --dry-run + +# Probar con últimas versiones de GitHub +./update-hyprland.sh --fetch-latest --dry-run + +# Probar una versión específica +./update-hyprland.sh --set HYPRLAND=v0.51.1 --dry-run +``` + +### Pruebas Avanzadas con Dry-Run + +```bash +# Formato alternativo de resumen +./update-hyprland.sh --via-helper + +# Probar con instalación de dependencias +./dry-run-build.sh --with-deps + +# Probar solo componentes específicos +./dry-run-build.sh --only hyprland,aquamarine +``` + +### Limitaciones de Dry-Run +- **Las dependencias se instalan**: apt se ejecuta para asegurar la compilación +- **Requisitos de pkg-config**: Algunos componentes necesitan requisitos instalados en el sistema +- **Sin cambios en el sistema**: No instala archivos en /usr/local o /usr + +## Gestión de Logs + +### Ubicación de Logs +Todas las actividades de construcción generan logs con sello de tiempo en: +``` +Install-Logs/ +├── 01-Hyprland-Install-Scripts-YYYY-MM-DD-HHMMSS.log # Log principal de instalación +├── install-DD-HHMMSS_module-name.log # Logs por módulo +├── build-dry-run-YYYY-MM-DD-HHMMSS.log # Resumen de dry-run +└── update-hypr-YYYY-MM-DD-HHMMSS.log # Resumen de actualización +``` + +### Análisis de Logs +```bash +# Ver el log de instalación más reciente +ls -t Install-Logs/*.log | head -1 | xargs less + +# Buscar errores en un módulo específico +grep -i error Install-Logs/install-*hyprland*.log + +# Ver resumen de dry-run +cat Install-Logs/build-dry-run-*.log +``` + +### Retención de Logs +- Los logs se acumulan con el tiempo para referencia histórica +- Se recomienda limpieza manual periódica: +```bash +# Mantener solo logs de los últimos 30 días +find Install-Logs/ -name "*.log" -mtime +30 -delete +``` + +## Uso Avanzado + +### Gestión de Versiones + +#### Copia de Seguridad y Restauración +```bash +# Las etiquetas se respaldan automáticamente cuando cambian +# Restaurar la copia más reciente +./update-hyprland.sh --restore --dry-run +``` + +#### Múltiples Conjuntos de Versiones +```bash +# Guardar configuración actual +cp hypr-tags.env hypr-tags-stable.env + +# Probar versiones experimentales +./update-hyprland.sh --fetch-latest --dry-run + +# Restaurar estable si es necesario +cp hypr-tags-stable.env hypr-tags.env +``` + +### Integración con el Entorno + +#### PKG_CONFIG_PATH personalizado +```bash +# Asegurar que /usr/local tenga prioridad +export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:${PKG_CONFIG_PATH:-}" +./update-hyprland.sh --install +``` + +#### Compilaciones en Paralelo +```bash +# Controlar el paralelismo (por defecto: todos los núcleos) +export MAKEFLAGS="-j4" +./update-hyprland.sh --install +``` + +### Flujo de Trabajo de Desarrollo + +#### Probar Nuevos Lanzamientos +```bash +# 1. Crear entorno de pruebas +cp hypr-tags.env hypr-tags.backup + +# 2. Probar nueva versión +./update-hyprland.sh --set HYPRLAND=v0.52.0 --dry-run + +# 3. Instalar si es exitoso +./update-hyprland.sh --install + +# 4. Revertir si hay problemas +./update-hyprland.sh --restore --install +``` + +#### Desarrollo de Componentes +```bash +# Solo instalar dependencias +./update-hyprland.sh --with-deps --dry-run + +# Pruebas manuales de módulo +DRY_RUN=1 ./install-scripts/hyprland.sh + +# Ver logs de un módulo específico +tail -f Install-Logs/install-*hyprland*.log +``` + +## Solución de Problemas + +### Problemas Comunes + +#### Falla de Configuración con CMake +**Síntomas**: "Package dependency requirement not satisfied" + +**Soluciones**: +```bash +# Instalar requisitos faltantes +./update-hyprland.sh --install --only wayland-protocols-src,hyprutils,hyprlang + +# Limpiar caché de compilación +rm -rf hyprland aquamarine hyprutils hyprlang + +# Reintentar instalación +./update-hyprland.sh --install --only hyprland +``` + +#### Errores de Compilación +**Síntomas**: "too many errors emitted" + +**Soluciones**: +```bash +# Actualizar dependencias núcleo primero +./update-hyprland.sh --fetch-latest --install --only hyprutils,hyprlang + +# Revisar incompatibilidades de API en logs +grep -A5 -B5 "error:" Install-Logs/install-*hyprland*.log +``` + +#### Etiqueta No Encontrada +**Síntomas**: "Remote branch X not found" + +**Soluciones**: +```bash +# Ver etiquetas disponibles +git ls-remote --tags https://github.com/hyprwm/Hyprland + +# Usar etiqueta confirmada +./update-hyprland.sh --set HYPRLAND=v0.50.1 --install +``` + +### Pasos de Depuración + +1. **Verificar compatibilidad del sistema**: + ```bash + # Verificar versión de Debian + cat /etc/os-release + + # Asegurar deb-src habilitado + grep -E "^deb-src" /etc/apt/sources.list + ``` + +2. **Verificar entorno**: + ```bash + # Ver etiquetas actuales + cat hypr-tags.env + + # Probar dry-run primero + ./update-hyprland.sh --dry-run --only hyprland + ``` + +3. **Analizar logs**: + ```bash + # Errores más recientes + grep -i "error\|fail" Install-Logs/*.log | tail -20 + + # Problemas por módulo + ls -la Install-Logs/install-*[component]*.log + ``` + +### Obtener Ayuda + +1. **Revisar logs**: Consulte siempre Install-Logs/ para detalles +2. **Probar dry-run**: Valide antes de instalar +3. **Soporte de la comunidad**: Envíe issues con extractos de logs +4. **Documentación**: Consulte README.md del proyecto para requisitos base + +## Migración desde Versiones Previas + +### Instalaciones Existentes +Las nuevas herramientas funcionan junto a instalaciones existentes: + +```bash +# Actualizar instalación existente +./update-hyprland.sh --install + +# Probar sin afectar el sistema actual +./update-hyprland.sh --dry-run +``` + +### Convertir a Gestión por Etiquetas +```bash +# Las versiones actuales se guardan en hypr-tags.env automáticamente +# Verificar con: +cat hypr-tags.env + +# Modificar versiones según necesidad: +./update-hyprland.sh --set HYPRLAND=v0.51.1 +``` + +El flujo mejorado ofrece mayor control, capacidad de prueba y automatización, manteniendo la compatibilidad total con el proceso de instalación original. diff --git a/Debian-Hyprland-Install-Upgrade.md b/Debian-Hyprland-Install-Upgrade.md new file mode 100644 index 0000000..46dff79 --- /dev/null +++ b/Debian-Hyprland-Install-Upgrade.md @@ -0,0 +1,396 @@ +# Debian-Hyprland Install & Upgrade Guide + +This guide covers the enhanced installation and upgrade workflows for KooL's Debian-Hyprland project, including new automation features, centralized version management, and dry-run capabilities. + +## Table of Contents + +1. [Overview](#overview) +2. [New Features](#new-features) +3. [Central Version Management](#central-version-management) +4. [Installation Methods](#installation-methods) +5. [Upgrade Workflows](#upgrade-workflows) +6. [Dry-Run Testing](#dry-run-testing) +7. [Log Management](#log-management) +8. [Advanced Usage](#advanced-usage) +9. [Troubleshooting](#troubleshooting) + +## Overview + +The Debian-Hyprland project now includes enhanced automation and management tools while maintaining backward compatibility with the original install.sh script. The key additions are: + +- **Centralized version management** via `hypr-tags.env` +- **Automated dependency ordering** for Hyprland 0.51.x requirements +- **Dry-run compilation testing** without system modifications +- **Selective component updates** via `update-hyprland.sh` +- **GitHub latest tag fetching** for automatic version discovery + +## New Features + +### Enhanced install.sh +The original install.sh script now includes: + +- **Tag consistency**: Reads `hypr-tags.env` and exports version variables to all modules +- **Automatic wayland-protocols**: Installs wayland-protocols from source (≥1.45) before Hyprland +- **Robust dependency ordering**: Ensures prerequisites are built in the correct sequence + +### New Scripts + +#### update-hyprland.sh +A focused tool for managing and building just the Hyprland stack: +```bash +chmod +x ./update-hyprland.sh +./update-hyprland.sh --help # View all options +``` + +#### dry-run-build.sh +A testing tool that compiles components without installing: +```bash +chmod +x ./dry-run-build.sh +./dry-run-build.sh --help # View all options +``` + +#### wayland-protocols-src.sh +A new module that builds wayland-protocols from source to satisfy Hyprland 0.51.x requirements. + +## Central Version Management + +### hypr-tags.env +This file contains version tags for all Hyprland components: + +```bash +# Current versions (example) +HYPRLAND_TAG=v0.51.1 +AQUAMARINE_TAG=v0.9.3 +HYPRUTILS_TAG=v0.8.2 +HYPRLANG_TAG=v0.6.4 +HYPRGRAPHICS_TAG=v0.1.5 +HYPRWAYLAND_SCANNER_TAG=v0.4.5 +HYPRLAND_PROTOCOLS_TAG=v0.6.4 +HYPRLAND_QT_SUPPORT_TAG=v0.1.0 +HYPRLAND_QTUTILS_TAG=v0.1.4 +WAYLAND_PROTOCOLS_TAG=1.45 +``` + +### Version Override Priority +1. Environment variables (exported) +2. hypr-tags.env file values +3. Default hardcoded values in each module + +## Installation Methods + +### Method 1: Original Full Installation +```bash +# Standard installation with all components +chmod +x install.sh +./install.sh +``` + +This method now automatically: +- Loads versions from `hypr-tags.env` +- Installs wayland-protocols from source before Hyprland +- Maintains proper dependency ordering + +### Method 2: Hyprland Stack Only +```bash +# Install only Hyprland and essential components +./update-hyprland.sh --install +``` + +### Method 3: Fresh Installation with Latest Versions +```bash +# Fetch latest GitHub releases and install +./update-hyprland.sh --fetch-latest --install +``` + +### Method 4: Preset-Based Installation +```bash +# Use preset file for automated choices +./install.sh --preset ./preset.sh +``` + +## Upgrade Workflows + +### Upgrading to Latest Hyprland Release + +#### Option A: Automatic Discovery +```bash +# Fetch latest tags and install +./update-hyprland.sh --fetch-latest --install +``` + +#### Option B: Specific Version +```bash +# Set specific Hyprland version +./update-hyprland.sh --set HYPRLAND=v0.51.1 --install +``` + +#### Option C: Test Before Installing +```bash +# Test compilation first, then install if successful +./update-hyprland.sh --fetch-latest --dry-run +# If successful: +./update-hyprland.sh --install +``` + +### Upgrading Individual Components + +```bash +# Update only core libraries (often needed for new Hyprland versions) +./update-hyprland.sh --fetch-latest --install --only hyprutils,hyprlang + +# Update aquamarine specifically +./update-hyprland.sh --set AQUAMARINE=v0.9.3 --install --only aquamarine +``` + +### Selective Updates + +```bash +# Install everything except Qt components +./update-hyprland.sh --install --skip hyprland-qt-support,hyprland-qtutils + +# Install only specific components +./update-hyprland.sh --install --only hyprland,aquamarine +``` + +## Dry-Run Testing + +### Why Use Dry-Run? +- Test compilation compatibility before installing +- Validate version combinations +- Debug build issues without system changes +- CI/CD pipeline integration + +### Basic Dry-Run Usage + +```bash +# Test current tag configuration +./update-hyprland.sh --dry-run + +# Test with latest GitHub releases +./update-hyprland.sh --fetch-latest --dry-run + +# Test specific version +./update-hyprland.sh --set HYPRLAND=v0.51.1 --dry-run +``` + +### Advanced Dry-Run Testing + +```bash +# Use alternative summary format +./update-hyprland.sh --via-helper + +# Test with dependencies installation +./dry-run-build.sh --with-deps + +# Test only specific components +./dry-run-build.sh --only hyprland,aquamarine +``` + +### Dry-Run Limitations +- **Dependencies still install**: apt operations run to ensure compilation succeeds +- **pkg-config requirements**: Some components need system-installed prerequisites +- **No system changes**: No files installed to /usr/local or /usr + +## Log Management + +### Log Location +All build activities generate timestamped logs in: +``` +Install-Logs/ +├── 01-Hyprland-Install-Scripts-YYYY-MM-DD-HHMMSS.log # Main install log +├── install-DD-HHMMSS_module-name.log # Per-module logs +├── build-dry-run-YYYY-MM-DD-HHMMSS.log # Dry-run summary +└── update-hypr-YYYY-MM-DD-HHMMSS.log # Update tool summary +``` + +### Log Analysis +```bash +# View most recent install log +ls -t Install-Logs/*.log | head -1 | xargs less + +# Check for errors in specific module +grep -i error Install-Logs/install-*hyprland*.log + +# View dry-run summary +cat Install-Logs/build-dry-run-*.log +``` + +### Log Retention +- Logs accumulate over time for historical reference +- Manual cleanup recommended periodically: +```bash +# Keep only logs from last 30 days +find Install-Logs/ -name "*.log" -mtime +30 -delete +``` + +## Advanced Usage + +### Tag Management + +#### Backup and Restore +```bash +# Tags are automatically backed up on changes +# Restore most recent backup +./update-hyprland.sh --restore --dry-run +``` + +#### Multiple Version Sets +```bash +# Save current configuration +cp hypr-tags.env hypr-tags-stable.env + +# Try experimental versions +./update-hyprland.sh --fetch-latest --dry-run + +# Restore stable if needed +cp hypr-tags-stable.env hypr-tags.env +``` + +### Environment Integration + +#### Custom PKG_CONFIG_PATH +```bash +# Ensure /usr/local takes precedence +export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:${PKG_CONFIG_PATH:-}" +./update-hyprland.sh --install +``` + +#### Parallel Builds +```bash +# Control build parallelism (default: all cores) +export MAKEFLAGS="-j4" +./update-hyprland.sh --install +``` + +### Development Workflow + +#### Testing New Releases +```bash +# 1. Create test environment +cp hypr-tags.env hypr-tags.backup + +# 2. Test new version +./update-hyprland.sh --set HYPRLAND=v0.52.0 --dry-run + +# 3. Install if successful +./update-hyprland.sh --install + +# 4. Rollback if issues +./update-hyprland.sh --restore --install +``` + +#### Component Development +```bash +# Install dependencies only +./update-hyprland.sh --with-deps --dry-run + +# Manual module testing +DRY_RUN=1 ./install-scripts/hyprland.sh + +# Check logs for specific module +tail -f Install-Logs/install-*hyprland*.log +``` + +## Troubleshooting + +### Common Issues + +#### CMake Configuration Fails +**Symptoms**: "Package dependency requirement not satisfied" + +**Solutions**: +```bash +# Install missing prerequisites +./update-hyprland.sh --install --only wayland-protocols-src,hyprutils,hyprlang + +# Clear build cache +rm -rf hyprland aquamarine hyprutils hyprlang + +# Retry installation +./update-hyprland.sh --install --only hyprland +``` + +#### Compilation Errors +**Symptoms**: "too many errors emitted" + +**Solutions**: +```bash +# Update core dependencies first +./update-hyprland.sh --fetch-latest --install --only hyprutils,hyprlang + +# Check for API mismatches in logs +grep -A5 -B5 "error:" Install-Logs/install-*hyprland*.log +``` + +#### Tag Not Found +**Symptoms**: "Remote branch X not found" + +**Solutions**: +```bash +# Check available tags +git ls-remote --tags https://github.com/hyprwm/Hyprland + +# Use confirmed existing tag +./update-hyprland.sh --set HYPRLAND=v0.50.1 --install +``` + +### Debug Steps + +1. **Check system compatibility**: + ```bash + # Verify Debian version + cat /etc/os-release + + # Ensure deb-src enabled + grep -E "^deb-src" /etc/apt/sources.list + ``` + +2. **Verify environment**: + ```bash + # Check current tags + cat hypr-tags.env + + # Test dry-run first + ./update-hyprland.sh --dry-run --only hyprland + ``` + +3. **Analyze logs**: + ```bash + # Most recent errors + grep -i "error\|fail" Install-Logs/*.log | tail -20 + + # Module-specific issues + ls -la Install-Logs/install-*[component]*.log + ``` + +### Getting Help + +1. **Check logs**: Always review Install-Logs/ for detailed error information +2. **Test dry-run**: Use --dry-run to validate before installing +3. **Community support**: Submit issues with relevant log excerpts +4. **Documentation**: Refer to main project README.md for base requirements + +## Migration from Previous Versions + +### Existing Installations +The new tools work alongside existing installations: + +```bash +# Update existing installation +./update-hyprland.sh --install + +# Test without affecting current system +./update-hyprland.sh --dry-run +``` + +### Converting to Tag Management +```bash +# Current versions are saved to hypr-tags.env automatically +# Verify with: +cat hypr-tags.env + +# Modify versions as needed: +./update-hyprland.sh --set HYPRLAND=v0.51.1 +``` + +The enhanced workflow provides better control, testing capabilities, and automation while maintaining full compatibility with the original installation process. \ No newline at end of file From 82367a41aef17a2368e30bd8966ed2898c279429 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 8 Oct 2025 15:08:37 -0400 Subject: [PATCH 08/20] Fixing install order On branch hl-051 Your branch is up to date with 'origin/hl-051'. Changes to be committed: modified: install-scripts/aquamarine.sh modified: install-scripts/hyprland.sh modified: update-hyprland.sh --- install-scripts/aquamarine.sh | 2 +- install-scripts/hyprland.sh | 2 +- update-hyprland.sh | 18 +++++++++++++++--- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/install-scripts/aquamarine.sh b/install-scripts/aquamarine.sh index 56ee761..758635b 100755 --- a/install-scripts/aquamarine.sh +++ b/install-scripts/aquamarine.sh @@ -5,7 +5,7 @@ #specific branch or release -tag="v0.9.2" +tag="v0.9.3" # Allow environment override if [ -n "${AQUAMARINE_TAG:-}" ]; then tag="$AQUAMARINE_TAG"; fi diff --git a/install-scripts/hyprland.sh b/install-scripts/hyprland.sh index 2aa5d80..6264a96 100755 --- a/install-scripts/hyprland.sh +++ b/install-scripts/hyprland.sh @@ -3,7 +3,7 @@ # Main Hyprland Package# #specific branch or release -tag="v0.50.1" +tag="v0.51.1" # Allow environment override if [ -n "${HYPRLAND_TAG:-}" ]; then tag="$HYPRLAND_TAG"; fi diff --git a/update-hyprland.sh b/update-hyprland.sh index d407d18..92f0485 100755 --- a/update-hyprland.sh +++ b/update-hyprland.sh @@ -228,19 +228,21 @@ export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG H fi # Ensure core prerequisites are installed before hyprland on install runs - # Order: wayland-protocols-src, hyprutils, hyprlang, aquamarine, hyprland + # Order: wayland-protocols-src, hyprland-protocols, hyprutils, hyprlang, aquamarine, hyprland if [[ $DO_INSTALL -eq 1 ]]; then - local has_hl=0 has_aqua=0 has_wp=0 has_utils=0 has_lang=0 + local has_hl=0 has_aqua=0 has_wp=0 has_utils=0 has_lang=0 has_hlprot=0 for m in "${modules[@]}"; do [[ "$m" == "hyprland" ]] && has_hl=1 [[ "$m" == "aquamarine" ]] && has_aqua=1 [[ "$m" == "wayland-protocols-src" ]] && has_wp=1 + [[ "$m" == "hyprland-protocols" ]] && has_hlprot=1 [[ "$m" == "hyprutils" ]] && has_utils=1 [[ "$m" == "hyprlang" ]] && has_lang=1 done if [[ $has_hl -eq 1 ]]; then # ensure each prerequisite is present [[ $has_wp -eq 0 ]] && modules=("wayland-protocols-src" "${modules[@]}") + [[ $has_hlprot -eq 0 ]] && modules=("hyprland-protocols" "${modules[@]}") [[ $has_utils -eq 0 ]] && modules=("hyprutils" "${modules[@]}") [[ $has_lang -eq 0 ]] && modules=("hyprlang" "${modules[@]}") [[ $has_aqua -eq 0 ]] && modules=("aquamarine" "${modules[@]}") @@ -248,14 +250,21 @@ export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG H # Reorder to exact sequence before hyprland # Remove existing occurrences and rebuild in correct order local tmp=() - local inserted_wp=0 inserted_utils=0 inserted_lang=0 inserted_aqua=0 + local inserted_wp=0 inserted_hlprot=0 inserted_utils=0 inserted_lang=0 inserted_aqua=0 for m in "${modules[@]}"; do if [[ "$m" == "wayland-protocols-src" ]]; then if [[ $inserted_wp -eq 0 ]]; then tmp+=("wayland-protocols-src"); inserted_wp=1; fi + elif [[ "$m" == "hyprland-protocols" ]]; then + if [[ $inserted_hlprot -eq 0 ]]; then + # ensure wayland-protocols-src before hyprland-protocols + if [[ $inserted_wp -eq 0 ]]; then tmp+=("wayland-protocols-src"); inserted_wp=1; fi + tmp+=("hyprland-protocols"); inserted_hlprot=1 + fi elif [[ "$m" == "hyprutils" ]]; then if [[ $inserted_utils -eq 0 ]]; then # ensure protocols before utils if [[ $inserted_wp -eq 0 ]]; then tmp+=("wayland-protocols-src"); inserted_wp=1; fi + if [[ $inserted_hlprot -eq 0 ]]; then tmp+=("hyprland-protocols"); inserted_hlprot=1; fi tmp+=("hyprutils"); inserted_utils=1 fi elif [[ "$m" == "hyprlang" ]]; then @@ -263,6 +272,7 @@ export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG H # ensure utils before lang if [[ $inserted_utils -eq 0 ]]; then if [[ $inserted_wp -eq 0 ]]; then tmp+=("wayland-protocols-src"); inserted_wp=1; fi + if [[ $inserted_hlprot -eq 0 ]]; then tmp+=("hyprland-protocols"); inserted_hlprot=1; fi tmp+=("hyprutils"); inserted_utils=1 fi tmp+=("hyprlang"); inserted_lang=1 @@ -273,6 +283,7 @@ export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG H if [[ $inserted_lang -eq 0 ]]; then if [[ $inserted_utils -eq 0 ]]; then if [[ $inserted_wp -eq 0 ]]; then tmp+=("wayland-protocols-src"); inserted_wp=1; fi + if [[ $inserted_hlprot -eq 0 ]]; then tmp+=("hyprland-protocols"); inserted_hlprot=1; fi tmp+=("hyprutils"); inserted_utils=1 fi tmp+=("hyprlang"); inserted_lang=1 @@ -282,6 +293,7 @@ export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG H elif [[ "$m" == "hyprland" ]]; then # ensure all prerequisites already present if [[ $inserted_wp -eq 0 ]]; then tmp+=("wayland-protocols-src"); inserted_wp=1; fi + if [[ $inserted_hlprot -eq 0 ]]; then tmp+=("hyprland-protocols"); inserted_hlprot=1; fi if [[ $inserted_utils -eq 0 ]]; then tmp+=("hyprutils"); inserted_utils=1; fi if [[ $inserted_lang -eq 0 ]]; then tmp+=("hyprlang"); inserted_lang=1; fi if [[ $inserted_aqua -eq 0 ]]; then tmp+=("aquamarine"); inserted_aqua=1; fi From becb1af6226a7a38bec4ca7e15f2f5a017dbbe69 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 8 Oct 2025 15:19:02 -0400 Subject: [PATCH 09/20] Fixing scripts to fetch last core and build order On branch hl-051 Your branch is up to date with 'origin/hl-051'. Changes to be committed: modified: install.sh new file: refresh-hypr-tags.sh modified: update-hyprland.sh --- install.sh | 8 +++++ refresh-hypr-tags.sh | 82 ++++++++++++++++++++++++++++++++++++++++++++ update-hyprland.sh | 14 ++++++++ 3 files changed, 104 insertions(+) create mode 100644 refresh-hypr-tags.sh diff --git a/install.sh b/install.sh index adf8e1a..80c36c0 100755 --- a/install.sh +++ b/install.sh @@ -368,6 +368,14 @@ echo "${INFO} Installing ${SKY_BLUE}necessary fonts...${RESET}" | tee -a "$LOG" sleep 1 execute_script "fonts.sh" +# Auto-refresh tags before building the Hyprland stack (can be disabled with NO_FETCH_LATEST=1) +if [ -z "${NO_FETCH_LATEST:-}" ] || [ "${NO_FETCH_LATEST:-0}" = "0" ]; then + if [ -f ./refresh-hypr-tags.sh ]; then + chmod +x ./refresh-hypr-tags.sh || true + ./refresh-hypr-tags.sh + fi +fi + echo "${INFO} Installing ${SKY_BLUE}KooL Hyprland packages...${RESET}" | tee -a "$LOG" sleep 1 execute_script "01-hypr-pkgs.sh" diff --git a/refresh-hypr-tags.sh b/refresh-hypr-tags.sh new file mode 100644 index 0000000..4616569 --- /dev/null +++ b/refresh-hypr-tags.sh @@ -0,0 +1,82 @@ +#!/usr/bin/env bash +# Refresh hypr-tags.env with latest release tags from upstream +# Safe to run multiple times; creates timestamped backups + +set -euo pipefail + +REPO_ROOT=$(pwd) +TAGS_FILE="$REPO_ROOT/hypr-tags.env" +LOG_DIR="$REPO_ROOT/Install-Logs" +mkdir -p "$LOG_DIR" +TS=$(date +%F-%H%M%S) +SUMMARY_LOG="$LOG_DIR/refresh-tags-$TS.log" + +# Ensure tags file exists +if [[ ! -f "$TAGS_FILE" ]]; then + cat > "$TAGS_FILE" <<'EOF' +HYPRLAND_TAG=v0.51.1 +AQUAMARINE_TAG=v0.9.3 +HYPRUTILS_TAG=v0.8.2 +HYPRLANG_TAG=v0.6.4 +HYPRGRAPHICS_TAG=v0.1.5 +HYPRWAYLAND_SCANNER_TAG=v0.4.5 +HYPRLAND_PROTOCOLS_TAG=v0.6.4 +HYPRLAND_QT_SUPPORT_TAG=v0.1.0 +HYPRLAND_QTUTILS_TAG=v0.1.4 +WAYLAND_PROTOCOLS_TAG=1.45 +EOF +fi + +# Backup +cp "$TAGS_FILE" "$TAGS_FILE.bak-$TS" +echo "[INFO] Backed up $TAGS_FILE to $TAGS_FILE.bak-$TS" | tee -a "$SUMMARY_LOG" + +if ! command -v curl >/dev/null 2>&1; then + echo "[ERROR] curl is required to refresh tags" | tee -a "$SUMMARY_LOG" + exit 1 +fi + +# Map of env var -> repo +declare -A repos=( + [HYPRLAND_TAG]="hyprwm/Hyprland" + [AQUAMARINE_TAG]="hyprwm/aquamarine" + [HYPRUTILS_TAG]="hyprwm/hyprutils" + [HYPRLANG_TAG]="hyprwm/hyprlang" + [HYPRGRAPHICS_TAG]="hyprwm/hyprgraphics" + [HYPRWAYLAND_SCANNER_TAG]="hyprwm/hyprwayland-scanner" + [HYPRLAND_PROTOCOLS_TAG]="hyprwm/hyprland-protocols" + [HYPRLAND_QT_SUPPORT_TAG]="hyprwm/hyprland-qt-support" + [HYPRLAND_QTUTILS_TAG]="hyprwm/hyprland-qtutils" +) + +# Read existing +declare -A cur +while IFS='=' read -r k v; do + [[ -z "${k:-}" || "$k" =~ ^# ]] && continue + cur[$k]="$v" +edone < "$TAGS_FILE" + +# Fetch latest +for key in "${!repos[@]}"; do + repo="${repos[$key]}" + url="https://api.github.com/repos/$repo/releases/latest" + echo "[INFO] Fetching latest tag for $repo" | tee -a "$SUMMARY_LOG" + body=$(curl -fsSL "$url" || true) + [[ -z "$body" ]] && { echo "[WARN] Empty response for $repo" | tee -a "$SUMMARY_LOG"; continue; } + if command -v jq >/dev/null 2>&1; then + tag=$(printf '%s' "$body" | jq -r '.tag_name // empty') + else + tag=$(printf '%s' "$body" | grep -m1 '"tag_name"' | sed -E 's/.*"tag_name"\s*:\s*"([^"]+)".*/\1/') + fi + [[ -n "$tag" ]] && cur[$key]="$tag" || echo "[WARN] Could not parse tag for $repo" | tee -a "$SUMMARY_LOG" + +done + +# Write back +{ + for k in "${!cur[@]}"; do + echo "$k=${cur[$k]}" + done | sort +} > "$TAGS_FILE" + +echo "[OK] Refreshed tags written to $TAGS_FILE" | tee -a "$SUMMARY_LOG" \ No newline at end of file diff --git a/update-hyprland.sh b/update-hyprland.sh index 92f0485..8c57d0d 100755 --- a/update-hyprland.sh +++ b/update-hyprland.sh @@ -51,6 +51,7 @@ DO_DRY_RUN=0 FETCH_LATEST=0 RESTORE=0 VIA_HELPER=0 +NO_FETCH=0 ONLY_LIST="" SKIP_LIST="" SET_ARGS=() @@ -230,6 +231,18 @@ export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG H # Ensure core prerequisites are installed before hyprland on install runs # Order: wayland-protocols-src, hyprland-protocols, hyprutils, hyprlang, aquamarine, hyprland if [[ $DO_INSTALL -eq 1 ]]; then + # Auto-fetch latest tags for Hyprland stack unless disabled + if [[ $NO_FETCH -eq 0 ]]; then + # Detect whether hyprland is part of the run + need_fetch=0 + for m in "${modules[@]}"; do + [[ "$m" == "hyprland" ]] && need_fetch=1 + done + if [[ $need_fetch -eq 1 ]]; then + echo "[INFO] Auto-fetching latest tags for Hyprland stack" | tee -a "$SUMMARY_LOG" + fetch_latest_tags + fi + fi local has_hl=0 has_aqua=0 has_wp=0 has_utils=0 has_lang=0 has_hlprot=0 for m in "${modules[@]}"; do [[ "$m" == "hyprland" ]] && has_hl=1 @@ -346,6 +359,7 @@ while [[ $# -gt 0 ]]; do --fetch-latest) FETCH_LATEST=1; shift ;; --restore) RESTORE=1; shift ;; --via-helper) VIA_HELPER=1; shift ;; + --no-fetch) NO_FETCH=1; shift ;; --only) ONLY_LIST=${2:-}; shift 2 ;; --skip) SKIP_LIST=${2:-}; shift 2 ;; --set) From 98c7c316351a2681388e620745640b4c70fc4e6b Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 8 Oct 2025 15:47:40 -0400 Subject: [PATCH 10/20] Fixing HL install script On branch hl-051 Your branch is up to date with 'origin/hl-051'. Changes to be committed: modified: install-scripts/hyprland.sh --- install-scripts/hyprland.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install-scripts/hyprland.sh b/install-scripts/hyprland.sh index 6264a96..777a146 100755 --- a/install-scripts/hyprland.sh +++ b/install-scripts/hyprland.sh @@ -84,6 +84,9 @@ if git clone --recursive -b $tag "https://github.com/hyprwm/Hyprland"; then echo "${NOTE} Hyprland compile patch does not apply on $tag; skipping." fi fi + # Prefer /usr/local when resolving pkg-config and CMake prefixes + export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:${PKG_CONFIG_PATH:-}" + export CMAKE_PREFIX_PATH="/usr/local:${CMAKE_PREFIX_PATH:-}" CXX=clang++ CXXFLAGS=-std=gnu++26 make all if [ $DO_INSTALL -eq 1 ]; then if sudo make install 2>&1 | tee -a "$MLOG"; then From 95708df841fd147ae0d178d3dcd35b0e0417e2a7 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 8 Oct 2025 18:47:22 -0400 Subject: [PATCH 11/20] Setting install to 0.51.1 On branch hl-051 Your branch is up to date with 'origin/hl-051'. Changes to be committed: modified: install.sh modified: refresh-hypr-tags.sh modified: update-hyprland.sh --- install.sh | 11 +++++------ refresh-hypr-tags.sh | 18 ++++++++++++++---- update-hyprland.sh | 12 +++++++++++- 3 files changed, 30 insertions(+), 11 deletions(-) diff --git a/install.sh b/install.sh index 80c36c0..22d5bfb 100755 --- a/install.sh +++ b/install.sh @@ -368,12 +368,11 @@ echo "${INFO} Installing ${SKY_BLUE}necessary fonts...${RESET}" | tee -a "$LOG" sleep 1 execute_script "fonts.sh" -# Auto-refresh tags before building the Hyprland stack (can be disabled with NO_FETCH_LATEST=1) -if [ -z "${NO_FETCH_LATEST:-}" ] || [ "${NO_FETCH_LATEST:-0}" = "0" ]; then - if [ -f ./refresh-hypr-tags.sh ]; then - chmod +x ./refresh-hypr-tags.sh || true - ./refresh-hypr-tags.sh - fi +# Optional: refresh tags before building the Hyprland stack +# Set FETCH_LATEST=1 to opt-in (default is no-refresh to honor pinned tags) +if [ "${FETCH_LATEST:-0}" = "1" ] && [ -f ./refresh-hypr-tags.sh ]; then + chmod +x ./refresh-hypr-tags.sh || true + ./refresh-hypr-tags.sh fi echo "${INFO} Installing ${SKY_BLUE}KooL Hyprland packages...${RESET}" | tee -a "$LOG" diff --git a/refresh-hypr-tags.sh b/refresh-hypr-tags.sh index 4616569..aa07f9b 100644 --- a/refresh-hypr-tags.sh +++ b/refresh-hypr-tags.sh @@ -56,11 +56,12 @@ while IFS='=' read -r k v; do cur[$k]="$v" edone < "$TAGS_FILE" -# Fetch latest +# Fetch latest, but only update keys set to 'auto' or 'latest' unless forced +FORCE=${FORCE:-0} for key in "${!repos[@]}"; do repo="${repos[$key]}" url="https://api.github.com/repos/$repo/releases/latest" - echo "[INFO] Fetching latest tag for $repo" | tee -a "$SUMMARY_LOG" + echo "[INFO] Checking latest tag for $repo" | tee -a "$SUMMARY_LOG" body=$(curl -fsSL "$url" || true) [[ -z "$body" ]] && { echo "[WARN] Empty response for $repo" | tee -a "$SUMMARY_LOG"; continue; } if command -v jq >/dev/null 2>&1; then @@ -68,8 +69,17 @@ for key in "${!repos[@]}"; do else tag=$(printf '%s' "$body" | grep -m1 '"tag_name"' | sed -E 's/.*"tag_name"\s*:\s*"([^"]+)".*/\1/') fi - [[ -n "$tag" ]] && cur[$key]="$tag" || echo "[WARN] Could not parse tag for $repo" | tee -a "$SUMMARY_LOG" - + if [[ -z "$tag" ]]; then + echo "[WARN] Could not parse tag for $repo" | tee -a "$SUMMARY_LOG" + continue + fi + existing="${cur[$key]:-}" + if [[ $FORCE -eq 1 ]] || [[ "$existing" =~ ^(auto|latest)$ ]] || [[ -z "$existing" ]]; then + cur[$key]="$tag" + echo "[OK] $key := $tag" | tee -a "$SUMMARY_LOG" + else + echo "[SKIP] $key pinned ($existing), not overriding" | tee -a "$SUMMARY_LOG" + fi done # Write back diff --git a/update-hyprland.sh b/update-hyprland.sh index 8c57d0d..e134a8b 100755 --- a/update-hyprland.sh +++ b/update-hyprland.sh @@ -137,6 +137,13 @@ fetch_latest_tags() { exit 1 fi + # Read existing to respect pinned values (only update keys set to 'auto' or 'latest') + declare -A existing + while IFS='=' read -r k v; do + [[ -z "$k" || "$k" =~ ^# ]] && continue + existing[$k]="$v" + done < "$TAGS_FILE" + declare -A repos=( [HYPRLAND_TAG]="hyprwm/Hyprland" [AQUAMARINE_TAG]="hyprwm/aquamarine" @@ -180,7 +187,10 @@ fetch_latest_tags() { done < "$TAGS_FILE" for k in "${!tags[@]}"; do - map[$k]="${tags[$k]}" + # Only override if pinned value is 'auto' or 'latest' + if [[ "${existing[$k]:-}" =~ ^(auto|latest)$ ]] || [[ -z "${existing[$k]:-}" ]]; then + map[$k]="${tags[$k]}" + fi done { From f776563d3e59dd8c93ae2e7d81648dbd04b24d8d Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 8 Oct 2025 19:33:25 -0400 Subject: [PATCH 12/20] Setting tags to properly install hyprlang/utils On branch hl-051 Your branch is up to date with 'origin/hl-051'. Changes to be committed: modified: hypr-tags.env modified: install.sh --- hypr-tags.env | 4 ++-- install.sh | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/hypr-tags.env b/hypr-tags.env index 6757bbe..5383c1e 100644 --- a/hypr-tags.env +++ b/hypr-tags.env @@ -4,8 +4,8 @@ HYPRLAND_TAG=v0.51.1 AQUAMARINE_TAG=v0.9.3 -HYPRUTILS_TAG=v0.8.2 -HYPRLANG_TAG=v0.6.4 +HYPRUTILS_TAG=auto +HYPRLANG_TAG=auto HYPRGRAPHICS_TAG=v0.1.5 HYPRWAYLAND_SCANNER_TAG=v0.4.5 HYPRLAND_PROTOCOLS_TAG=v0.6.4 diff --git a/install.sh b/install.sh index 22d5bfb..63a37ef 100755 --- a/install.sh +++ b/install.sh @@ -171,6 +171,17 @@ execute_script() { if [ -f "./hypr-tags.env" ]; then # shellcheck disable=SC1091 source "./hypr-tags.env" + # If core tags are set to auto/latest, refresh to resolve concrete versions + if [ "${HYPRUTILS_TAG:-}" = "auto" ] || [ "${HYPRUTILS_TAG:-}" = "latest" ] || [ -z "${HYPRUTILS_TAG:-}" ] || \ + [ "${HYPRLANG_TAG:-}" = "auto" ] || [ "${HYPRLANG_TAG:-}" = "latest" ] || [ -z "${HYPRLANG_TAG:-}" ]; then + if [ -f ./refresh-hypr-tags.sh ]; then + chmod +x ./refresh-hypr-tags.sh || true + ./refresh-hypr-tags.sh + # reload after refresh + # shellcheck disable=SC1091 + source "./hypr-tags.env" + fi + fi export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG HYPRWAYLAND_SCANNER_TAG HYPRLAND_PROTOCOLS_TAG HYPRLAND_QT_SUPPORT_TAG HYPRLAND_QTUTILS_TAG WAYLAND_PROTOCOLS_TAG fi From 64754089d4ee2ebce59073a04865cd429b6eb988 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 8 Oct 2025 19:51:07 -0400 Subject: [PATCH 13/20] Enabling subprojects to get hyprland to compile On branch hl-051 Your branch is up to date with 'origin/hl-051'. Changes to be committed: modified: install-scripts/hyprland.sh --- install-scripts/hyprland.sh | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/install-scripts/hyprland.sh b/install-scripts/hyprland.sh index 777a146..c300ba8 100755 --- a/install-scripts/hyprland.sh +++ b/install-scripts/hyprland.sh @@ -84,12 +84,27 @@ if git clone --recursive -b $tag "https://github.com/hyprwm/Hyprland"; then echo "${NOTE} Hyprland compile patch does not apply on $tag; skipping." fi fi - # Prefer /usr/local when resolving pkg-config and CMake prefixes - export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:${PKG_CONFIG_PATH:-}" - export CMAKE_PREFIX_PATH="/usr/local:${CMAKE_PREFIX_PATH:-}" - CXX=clang++ CXXFLAGS=-std=gnu++26 make all + # By default, build Hyprland with bundled hyprutils/hyprlang to avoid version mismatches + # You can force system libs by exporting USE_SYSTEM_HYPRLIBS=1 before running this script. + USE_SYSTEM=${USE_SYSTEM_HYPRLIBS:-0} + if [ "$USE_SYSTEM" = "1" ]; then + export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:${PKG_CONFIG_PATH:-}" + export CMAKE_PREFIX_PATH="/usr/local:${CMAKE_PREFIX_PATH:-}" + SYSTEM_FLAGS=("-DUSE_SYSTEM_HYPRUTILS=ON" "-DUSE_SYSTEM_HYPRLANG=ON") + else + # Ensure we do not accidentally pick up mismatched system headers + unset PKG_CONFIG_PATH || true + SYSTEM_FLAGS=("-DUSE_SYSTEM_HYPRUTILS=OFF" "-DUSE_SYSTEM_HYPRLANG=OFF") + fi + + # Make sure submodules are present when building bundled deps + git submodule update --init --recursive || true + + cmake -S . -B build -DCMAKE_BUILD_TYPE=Release "${SYSTEM_FLAGS[@]}" + cmake --build build -j "$(nproc 2>/dev/null || getconf _NPROCESSORS_CONF)" + if [ $DO_INSTALL -eq 1 ]; then - if sudo make install 2>&1 | tee -a "$MLOG"; then + if sudo cmake --install build 2>&1 | tee -a "$MLOG"; then printf "${OK} ${MAGENTA}Hyprland tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG" else echo -e "${ERROR} Installation failed for ${YELLOW}Hyprland $tag${RESET}" 2>&1 | tee -a "$MLOG" From 704d4b3c283a15178547cf323ec88f01d9f45149 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 8 Oct 2025 20:07:01 -0400 Subject: [PATCH 14/20] Fixing rc/sc errors building hyprland On branch hl-051 Your branch is up to date with 'origin/hl-051'. Changes to be committed: modified: install-scripts/hyprlang.sh modified: install-scripts/hyprutils.sh --- install-scripts/hyprlang.sh | 2 +- install-scripts/hyprutils.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install-scripts/hyprlang.sh b/install-scripts/hyprlang.sh index 90c51f4..05ec20f 100755 --- a/install-scripts/hyprlang.sh +++ b/install-scripts/hyprlang.sh @@ -45,7 +45,7 @@ fi printf "${INFO} Installing ${YELLOW}hyprlang $tag${RESET} ...\n" if git clone --recursive -b $tag https://github.com/hyprwm/hyprlang.git; then cd hyprlang || exit 1 - cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build + cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr/local -S . -B ./build cmake --build ./build --config Release --target hyprlang -j`nproc 2>/dev/null || getconf _NPROCESSORS_CONF` if [ $DO_INSTALL -eq 1 ]; then if sudo cmake --install ./build 2>&1 | tee -a "$MLOG" ; then diff --git a/install-scripts/hyprutils.sh b/install-scripts/hyprutils.sh index 991fb2e..40425bc 100755 --- a/install-scripts/hyprutils.sh +++ b/install-scripts/hyprutils.sh @@ -43,7 +43,7 @@ fi if git clone -b $tag "https://github.com/hyprwm/hyprutils.git"; then cd "hyprutils" || exit 1 - cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build + cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr/local -S . -B ./build cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf _NPROCESSORS_CONF` if [ $DO_INSTALL -eq 1 ]; then if sudo cmake --install build 2>&1 | tee -a "$MLOG"; then From 6f97a5c359468298bec43e833c4fd68d319f7513 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 8 Oct 2025 20:40:44 -0400 Subject: [PATCH 15/20] Still trying to fix hl build On branch hl-051 Your branch is up to date with 'origin/hl-051'. Changes to be committed: modified: hypr-tags.env modified: install-scripts/hyprland.sh --- hypr-tags.env | 4 ++-- install-scripts/hyprland.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hypr-tags.env b/hypr-tags.env index 5383c1e..9b8fb92 100644 --- a/hypr-tags.env +++ b/hypr-tags.env @@ -4,8 +4,8 @@ HYPRLAND_TAG=v0.51.1 AQUAMARINE_TAG=v0.9.3 -HYPRUTILS_TAG=auto -HYPRLANG_TAG=auto +HYPRUTILS_TAG=v0.8.3 +HYPRLANG_TAG=v0.6.4 HYPRGRAPHICS_TAG=v0.1.5 HYPRWAYLAND_SCANNER_TAG=v0.4.5 HYPRLAND_PROTOCOLS_TAG=v0.6.4 diff --git a/install-scripts/hyprland.sh b/install-scripts/hyprland.sh index c300ba8..7eb4e3c 100755 --- a/install-scripts/hyprland.sh +++ b/install-scripts/hyprland.sh @@ -86,7 +86,7 @@ if git clone --recursive -b $tag "https://github.com/hyprwm/Hyprland"; then fi # By default, build Hyprland with bundled hyprutils/hyprlang to avoid version mismatches # You can force system libs by exporting USE_SYSTEM_HYPRLIBS=1 before running this script. - USE_SYSTEM=${USE_SYSTEM_HYPRLIBS:-0} +USE_SYSTEM=${USE_SYSTEM_HYPRLIBS:-1} if [ "$USE_SYSTEM" = "1" ]; then export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:${PKG_CONFIG_PATH:-}" export CMAKE_PREFIX_PATH="/usr/local:${CMAKE_PREFIX_PATH:-}" From 5a156b1b9155f406e2539c1ee63e5e35105cbb60 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Thu, 9 Oct 2025 10:54:15 -0400 Subject: [PATCH 16/20] Adjusting compiler to use clang On branch hl-051 Your branch is up to date with 'origin/hl-051'. Changes to be committed: modified: install-scripts/hyprland.sh --- install-scripts/hyprland.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/install-scripts/hyprland.sh b/install-scripts/hyprland.sh index 7eb4e3c..f7147a1 100755 --- a/install-scripts/hyprland.sh +++ b/install-scripts/hyprland.sh @@ -100,7 +100,19 @@ USE_SYSTEM=${USE_SYSTEM_HYPRLIBS:-1} # Make sure submodules are present when building bundled deps git submodule update --init --recursive || true - cmake -S . -B build -DCMAKE_BUILD_TYPE=Release "${SYSTEM_FLAGS[@]}" + # Force Clang toolchain to support required language features and flags + export CC="${CC:-clang}" + export CXX="${CXX:-clang++}" + CONFIG_FLAGS=( + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_C_COMPILER="${CC}" + -DCMAKE_CXX_COMPILER="${CXX}" + -DCMAKE_CXX_STANDARD=26 + -DCMAKE_CXX_STANDARD_REQUIRED=ON + -DCMAKE_CXX_EXTENSIONS=ON + "${SYSTEM_FLAGS[@]}" + ) + cmake -S . -B build "${CONFIG_FLAGS[@]}" cmake --build build -j "$(nproc 2>/dev/null || getconf _NPROCESSORS_CONF)" if [ $DO_INSTALL -eq 1 ]; then From d298480443fb76b45b86953e2e41803e7d0f2a20 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Thu, 9 Oct 2025 16:51:11 -0400 Subject: [PATCH 17/20] feat: Hyprland 0.51.x upgrade tooling, central tags, docs update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduce focused Hyprland stack upgrade tooling and improve install ordering for 0.51.x, with centralized version management and detailed documentation for upgrading from 0.49/0.50.x to 0.51.1. New scripts and modules - update-hyprland.sh: Manage the Hyprland stack with: - --install / --dry-run build modes - --only and --skip for selective components - --with-deps to (re)install build deps - --set {KEY=TAG} and --restore tag backup support - --fetch-latest to pull latest GitHub release tags - --via-helper to delegate summary-only dry-runs - dry-run-build.sh: Compile-only helper with summary output - install-scripts/wayland-protocols-src.sh: Build wayland-protocols from source (>= 1.45) to satisfy Hyprland 0.51.x requirements Core features - Centralized tag management via hypr-tags.env; tags exported to all modules. Environment overrides remain first priority. - Automatic dependency ordering for Hyprland 0.51.x: wayland-protocols-src → hyprland-protocols → hyprutils → hyprlang → aquamarine → hyprland - Optional auto-fetch of latest tags on install runs that include hyprland (can be disabled via --no-fetch) - Selective updates for targeted components and skip lists - Dry-run mode to validate builds without installing Installer integration - install.sh reads hypr-tags.env and optionally refreshes tags. - Ensures wayland-protocols-src is built before Hyprland. - Maintains robust sequencing for the Hyprland stack. Docs - Debian-Hyprland-Install-Upgrade.md and .es.md: - Add explicit section: Upgrade 0.49/0.50.x → 0.51.1 - Recommend: `./update-hyprland.sh --install --only hyprland` - Provide optional `--with-deps` and `--dry-run` flows - Add quick link anchor under Upgrade Workflows - Clarify that full install via install.sh is not required for this upgrade unless optional modules need refresh or recovering from a partial/failed setup Usage highlights - Pin and upgrade to 0.51.1: ./update-hyprland.sh --set HYPRLAND=v0.51.1 ./update-hyprland.sh --install --only hyprland - Optional: ./update-hyprland.sh --with-deps --install --only hyprland ./update-hyprland.sh --dry-run --only hyprland Notes - Target OS remains Debian Trixie/SID; run as sudo-capable user (not root); ensure deb-src entries are enabled. --- Debian-Hyprland-Install-Upgrade.es.md | 27 + Debian-Hyprland-Install-Upgrade.md | 27 + install-scripts/dotfiles.sh | 47 +- install.sh | 19 +- update-hyprland.sh | 704 +++++++++++++++----------- 5 files changed, 482 insertions(+), 342 deletions(-) diff --git a/Debian-Hyprland-Install-Upgrade.es.md b/Debian-Hyprland-Install-Upgrade.es.md index f79ca2d..daffb9b 100644 --- a/Debian-Hyprland-Install-Upgrade.es.md +++ b/Debian-Hyprland-Install-Upgrade.es.md @@ -110,6 +110,8 @@ Ahora, este método automáticamente: ## Flujos de Actualización +Enlace rápido: [Actualización 0.49/0.50.x → 0.51.1](#actualización-049050x--0511) + ### Actualizar a la Última Versión de Hyprland #### Opción A: Descubrimiento Automático @@ -152,6 +154,31 @@ Ahora, este método automáticamente: ./update-hyprland.sh --install --only hyprland,aquamarine ``` +### Actualización: 0.49/0.50.x ➜ 0.51.1 + +Si actualmente estás en Hyprland 0.49 o 0.50.x, puedes actualizar directamente a 0.51.1 sin una reinstalación completa. + +Ruta recomendada: +```bash +# Asegura que hypr-tags.env apunte a la versión objetivo (omitir si ya es v0.51.1) +./update-hyprland.sh --set HYPRLAND=v0.51.1 + +# Actualiza Hyprland (los prerrequisitos se incluyen y ordenan automáticamente) +./update-hyprland.sh --install --only hyprland +``` + +Notas: +- El comando garantiza y ejecuta, según sea necesario: wayland-protocols-src, hyprland-protocols, hyprutils, hyprlang, aquamarine y luego hyprland. +- No es necesario usar install.sh para esta actualización, a menos que también quieras instalar/actualizar módulos opcionales (p. ej., SDDM, Bluetooth, Thunar, AGS, dotfiles) o estés recuperándote de una instalación fallida/parcial. +- Opcional: agrega --with-deps para reinstalar dependencias primero: +```bash +./update-hyprland.sh --with-deps --install --only hyprland +``` +- Puedes hacer un dry-run primero para validar: +```bash +./update-hyprland.sh --dry-run --only hyprland +``` + ## Pruebas con Dry-Run ### ¿Por qué usar Dry-Run? diff --git a/Debian-Hyprland-Install-Upgrade.md b/Debian-Hyprland-Install-Upgrade.md index 46dff79..f057561 100644 --- a/Debian-Hyprland-Install-Upgrade.md +++ b/Debian-Hyprland-Install-Upgrade.md @@ -110,6 +110,8 @@ This method now automatically: ## Upgrade Workflows +Quick link: [Upgrade 0.49/0.50.x → 0.51.1](#upgrade-049050x--0511) + ### Upgrading to Latest Hyprland Release #### Option A: Automatic Discovery @@ -152,6 +154,31 @@ This method now automatically: ./update-hyprland.sh --install --only hyprland,aquamarine ``` +### Upgrade: 0.49/0.50.x ➜ 0.51.1 + +If you’re currently on Hyprland 0.49 or 0.50.x, you can upgrade directly to 0.51.1 without a full reinstall. + +Recommended path: +```bash +# Ensure hypr-tags.env pins the target version (skip if already v0.51.1) +./update-hyprland.sh --set HYPRLAND=v0.51.1 + +# Upgrade Hyprland (prerequisites are auto-included and ordered) +./update-hyprland.sh --install --only hyprland +``` + +Notes: +- The command will automatically ensure and run, as needed: wayland-protocols-src, hyprland-protocols, hyprutils, hyprlang, aquamarine, then hyprland. +- Full install via install.sh is not required for this upgrade unless you also want to install/refresh optional modules (e.g., SDDM, Bluetooth, Thunar, AGS, dotfiles) or you’re recovering from a failed/partial setup. +- Optional: add --with-deps to re-run dependency installation first: +```bash +./update-hyprland.sh --with-deps --install --only hyprland +``` +- You can dry-run first to validate: +```bash +./update-hyprland.sh --dry-run --only hyprland +``` + ## Dry-Run Testing ### Why Use Dry-Run? diff --git a/install-scripts/dotfiles.sh b/install-scripts/dotfiles.sh index 5980b62..9b70f51 100755 --- a/install-scripts/dotfiles.sh +++ b/install-scripts/dotfiles.sh @@ -3,7 +3,8 @@ # Hyprland-Dots to download a specific release # # Define the specific release version to download -specific_version="v2.3.3-Deb-Untu-Hyprland-0.41.2" +specific_version="v2.3.16" +#specific_version="v2.3.3-Deb-Untu-Hyprland-0.41.2" ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## @@ -13,9 +14,9 @@ printf "${NOTE} Downloading / Checking for existing Hyprland-Dots-${specific_ver # Check if the specific release tarball exists if [ -f "Hyprland-Dots-${specific_version}.tar.gz" ]; then - printf "${NOTE} Hyprland-Dots-${specific_version}.tar.gz found.\n" - echo -e "${OK} Hyprland-Dots-${specific_version}.tar.gz is already downloaded." - exit 0 + printf "${NOTE} Hyprland-Dots-${specific_version}.tar.gz found.\n" + echo -e "${OK} Hyprland-Dots-${specific_version}.tar.gz is already downloaded." + exit 0 fi printf "${NOTE} Downloading the Hyprland-Dots-${specific_version} source code release...\n" @@ -23,8 +24,8 @@ printf "${NOTE} Downloading the Hyprland-Dots-${specific_version} source code re # Fetch the tag name for the specific release using the GitHub API release_info=$(curl -s "https://api.github.com/repos/JaKooLit/Hyprland-Dots/releases/tags/${specific_version}") if [ -z "$release_info" ]; then - echo -e "${ERROR} Unable to fetch information for release ${specific_version}." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log" - exit 1 + echo -e "${ERROR} Unable to fetch information for release ${specific_version}." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log" + exit 1 fi # Get the tarball URL for the specific release @@ -32,34 +33,34 @@ tarball_url=$(echo "$release_info" | grep "tarball_url" | cut -d '"' -f 4) # Check if the URL is obtained successfully if [ -z "$tarball_url" ]; then - echo -e "${ERROR} Unable to fetch the tarball URL for release ${specific_version}." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log" - exit 1 + echo -e "${ERROR} Unable to fetch the tarball URL for release ${specific_version}." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log" + exit 1 fi # Download the specific release source code tarball to the current directory if curl -L "$tarball_url" -o "Hyprland-Dots-${specific_version}.tar.gz"; then - # Extract the contents of the tarball - tar -xzf "Hyprland-Dots-${specific_version}.tar.gz" || exit 1 + # Extract the contents of the tarball + tar -xzf "Hyprland-Dots-${specific_version}.tar.gz" || exit 1 - # Delete existing Hyprland-Dots - rm -rf JaKooLit-Hyprland-Dots + # Delete existing Hyprland-Dots + rm -rf JaKooLit-Hyprland-Dots - # Identify the extracted directory - extracted_directory=$(tar -tf "Hyprland-Dots-${specific_version}.tar.gz" | grep -o '^[^/]\+' | uniq) + # Identify the extracted directory + extracted_directory=$(tar -tf "Hyprland-Dots-${specific_version}.tar.gz" | grep -o '^[^/]\+' | uniq) - # Rename the extracted directory to JaKooLit-Hyprland-Dots - mv "$extracted_directory" JaKooLit-Hyprland-Dots || exit 1 + # Rename the extracted directory to JaKooLit-Hyprland-Dots + mv "$extracted_directory" JaKooLit-Hyprland-Dots || exit 1 - cd "JaKooLit-Hyprland-Dots" || exit 1 + cd "JaKooLit-Hyprland-Dots" || exit 1 - # Set execute permission for copy.sh and execute it - chmod +x copy.sh - ./copy.sh + # Set execute permission for copy.sh and execute it + chmod +x copy.sh + ./copy.sh - echo -e "${OK} Hyprland-Dots-${specific_version} release downloaded, extracted, and processed successfully. Check JaKooLit-Hyprland-Dots directory for more detailed install logs" 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log" + echo -e "${OK} Hyprland-Dots-${specific_version} release downloaded, extracted, and processed successfully. Check JaKooLit-Hyprland-Dots directory for more detailed install logs" 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log" else - echo -e "${ERROR} Failed to download Hyprland-Dots-${specific_version} release." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log" - exit 1 + echo -e "${ERROR} Failed to download Hyprland-Dots-${specific_version} release." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log" + exit 1 fi clear diff --git a/install.sh b/install.sh index 63a37ef..420f87a 100755 --- a/install.sh +++ b/install.sh @@ -22,13 +22,13 @@ RESET="$(tput sgr0)" # Function to print colorful text print_color() { printf "%b%s%b\n" "$1" "$2" "$RESET" -} +l # Warning: End of Life Support printf "\n%.0s" {1..2} print_color $YELLOW " █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ - KooL's Debian - Hyprland July 2025 Update + KooL's Debian - Hyprland October 2025 Update Most Hyprland packages are built from Source @@ -40,9 +40,11 @@ print_color $YELLOW " However, do note that it is downloaded from each individual releases. You can set versions by editing the scripts located install-scripts directory. - These packages are NOT updated automatically. You need to manually update it yourself + These packages are NOT updated automatically. + + See the HOWTO documentation on how to get next release of Hyprland installed - BE WARNED!!!!! Installation may take longer!! + BE WARNED!!!!! Installation will take longer!! █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ @@ -52,9 +54,6 @@ print_color $YELLOW " █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ - Debian is not my main Distro. As stated above, Most Hyprland and dependencies as built from release. - - I cannot monitor the updates or changes. If there are new versions, please submit an Merge Request for any updates. Thank you! " @@ -120,10 +119,10 @@ echo -e "\e[35m printf "\n%.0s" {1..1} # Welcome message using whiptail (for displaying information) -whiptail --title "KooL Debian-Hyprland Trixie-SID (2025) Install Script" \ - --msgbox "Welcome to KooL Debian-Hyprland Trixie-SID (2025) Install Script!!!\n\n\ +whiptail --title "KooL Debian-Hyprland Trixie+ (2025) Install Script" \ + --msgbox "Welcome to KooL Debian-Hyprland Trixie+ (2025) Install Script!!!\n\n\ ATTENTION: Run a full system update and Reboot first !!! (Highly Recommended)\n\n\ -NOTE: If you are installing on a VM, ensure to enable 3D acceleration else Hyprland may NOT start!" \ +NOTE: If you are installing on a VM, ensure to enable 3D acceleration otherwise Hyprland may NOT start!" \ 15 80 # Ask if the user wants to proceed diff --git a/update-hyprland.sh b/update-hyprland.sh index e134a8b..c5a1830 100755 --- a/update-hyprland.sh +++ b/update-hyprland.sh @@ -33,16 +33,16 @@ SUMMARY_LOG="$LOG_DIR/update-hypr-$TS.log" # Default module order (core first, then Hyprland) DEFAULT_MODULES=( - hyprutils - hyprlang - wayland-protocols-src - aquamarine - hyprgraphics - hyprwayland-scanner - hyprland-protocols - hyprland-qt-support - hyprland-qtutils - hyprland + hyprutils + hyprlang + wayland-protocols-src + aquamarine + hyprgraphics + hyprwayland-scanner + hyprland-protocols + hyprland-qt-support + hyprland-qtutils + hyprland ) WITH_DEPS=0 @@ -57,13 +57,13 @@ SKIP_LIST="" SET_ARGS=() usage() { - sed -n '2,120p' "$0" | sed -n '/^# /p' | sed 's/^# \{0,1\}//' + sed -n '2,120p' "$0" | sed -n '/^# /p' | sed 's/^# \{0,1\}//' } ensure_tags_file() { - if [[ ! -f "$TAGS_FILE" ]]; then - echo "[INFO] Creating default tags file: $TAGS_FILE" | tee -a "$SUMMARY_LOG" - cat > "$TAGS_FILE" <<'EOF' + if [[ ! -f "$TAGS_FILE" ]]; then + echo "[INFO] Creating default tags file: $TAGS_FILE" | tee -a "$SUMMARY_LOG" + cat >"$TAGS_FILE" <<'EOF' HYPRLAND_TAG=v0.50.1 AQUAMARINE_TAG=v0.9.2 HYPRUTILS_TAG=v0.8.2 @@ -74,361 +74,447 @@ HYPRLAND_PROTOCOLS_TAG=v0.6.4 HYPRLAND_QT_SUPPORT_TAG=v0.1.0 HYPRLAND_QTUTILS_TAG=v0.1.4 EOF - fi + fi } backup_tags() { - ensure_tags_file - cp "$TAGS_FILE" "$TAGS_FILE.bak-$TS" - echo "[INFO] Backed up $TAGS_FILE to $TAGS_FILE.bak-$TS" | tee -a "$SUMMARY_LOG" + ensure_tags_file + cp "$TAGS_FILE" "$TAGS_FILE.bak-$TS" + echo "[INFO] Backed up $TAGS_FILE to $TAGS_FILE.bak-$TS" | tee -a "$SUMMARY_LOG" } restore_tags() { - latest_bak=$(ls -1t "$TAGS_FILE".bak-* 2>/dev/null | head -n1 || true) - if [[ -z "$latest_bak" ]]; then - echo "[ERROR] No backup tags file found." | tee -a "$SUMMARY_LOG" - exit 1 - fi - cp "$latest_bak" "$TAGS_FILE" - echo "[INFO] Restored tags from $latest_bak" | tee -a "$SUMMARY_LOG" + latest_bak=$(ls -1t "$TAGS_FILE".bak-* 2>/dev/null | head -n1 || true) + if [[ -z "$latest_bak" ]]; then + echo "[ERROR] No backup tags file found." | tee -a "$SUMMARY_LOG" + exit 1 + fi + cp "$latest_bak" "$TAGS_FILE" + echo "[INFO] Restored tags from $latest_bak" | tee -a "$SUMMARY_LOG" } set_tags_from_args() { - ensure_tags_file - backup_tags - # load existing into assoc map - declare -A map - while IFS='=' read -r k v; do - [[ -z "$k" || "$k" =~ ^# ]] && continue - map[$k]="$v" - done < "$TAGS_FILE" - for kv in "${SET_ARGS[@]}"; do - key="${kv%%=*}" - val="${kv#*=}" - case "$key" in - HYPRLAND|hyprland) key=HYPRLAND_TAG ;; - AQUAMARINE|aquamarine) key=AQUAMARINE_TAG ;; - HYPRUTILS|hyprutils) key=HYPRUTILS_TAG ;; - HYPRLANG|hyprlang) key=HYPRLANG_TAG ;; - HYPRGRAPHICS|hyprgraphics) key=HYPRGRAPHICS_TAG ;; - HYPRWAYLAND_SCANNER|hyprwayland-scanner|hyprwayland_scanner) key=HYPRWAYLAND_SCANNER_TAG ;; - HYPRLAND_PROTOCOLS|hyprland-protocols|hyprland_protocols) key=HYPRLAND_PROTOCOLS_TAG ;; - HYPRLAND_QT_SUPPORT|hyprland-qt-support|hyprland_qt_support) key=HYPRLAND_QT_SUPPORT_TAG ;; - HYPRLAND_QTUTILS|hyprland-qtutils|hyprland_qtutils) key=HYPRLAND_QTUTILS_TAG ;; - esac - map[$key]="$val" - done - { - for k in "${!map[@]}"; do - echo "$k=${map[$k]}" - done | sort - } > "$TAGS_FILE" - echo "[INFO] Updated $TAGS_FILE with provided tags" | tee -a "$SUMMARY_LOG" + ensure_tags_file + backup_tags + # load existing into assoc map + declare -A map + while IFS='=' read -r k v; do + [[ -z "$k" || "$k" =~ ^# ]] && continue + map[$k]="$v" + done <"$TAGS_FILE" + for kv in "${SET_ARGS[@]}"; do + key="${kv%%=*}" + val="${kv#*=}" + case "$key" in + HYPRLAND | hyprland) key=HYPRLAND_TAG ;; + AQUAMARINE | aquamarine) key=AQUAMARINE_TAG ;; + HYPRUTILS | hyprutils) key=HYPRUTILS_TAG ;; + HYPRLANG | hyprlang) key=HYPRLANG_TAG ;; + HYPRGRAPHICS | hyprgraphics) key=HYPRGRAPHICS_TAG ;; + HYPRWAYLAND_SCANNER | hyprwayland-scanner | hyprwayland_scanner) key=HYPRWAYLAND_SCANNER_TAG ;; + HYPRLAND_PROTOCOLS | hyprland-protocols | hyprland_protocols) key=HYPRLAND_PROTOCOLS_TAG ;; + HYPRLAND_QT_SUPPORT | hyprland-qt-support | hyprland_qt_support) key=HYPRLAND_QT_SUPPORT_TAG ;; + HYPRLAND_QTUTILS | hyprland-qtutils | hyprland_qtutils) key=HYPRLAND_QTUTILS_TAG ;; + esac + map[$key]="$val" + done + { + for k in "${!map[@]}"; do + echo "$k=${map[$k]}" + done | sort + } >"$TAGS_FILE" + echo "[INFO] Updated $TAGS_FILE with provided tags" | tee -a "$SUMMARY_LOG" } # Fetch latest release tags from GitHub for the stack fetch_latest_tags() { - ensure_tags_file - backup_tags + ensure_tags_file + backup_tags - # Require curl; jq is preferred. Fallback to grep/sed if jq is missing. - if ! command -v curl >/dev/null 2>&1; then - echo "[ERROR] curl is required." | tee -a "$SUMMARY_LOG" - exit 1 - fi - - # Read existing to respect pinned values (only update keys set to 'auto' or 'latest') - declare -A existing - while IFS='=' read -r k v; do - [[ -z "$k" || "$k" =~ ^# ]] && continue - existing[$k]="$v" - done < "$TAGS_FILE" - - declare -A repos=( - [HYPRLAND_TAG]="hyprwm/Hyprland" - [AQUAMARINE_TAG]="hyprwm/aquamarine" - [HYPRUTILS_TAG]="hyprwm/hyprutils" - [HYPRLANG_TAG]="hyprwm/hyprlang" - [HYPRGRAPHICS_TAG]="hyprwm/hyprgraphics" - [HYPRWAYLAND_SCANNER_TAG]="hyprwm/hyprwayland-scanner" - [HYPRLAND_PROTOCOLS_TAG]="hyprwm/hyprland-protocols" - [HYPRLAND_QT_SUPPORT_TAG]="hyprwm/hyprland-qt-support" - [HYPRLAND_QTUTILS_TAG]="hyprwm/hyprland-qtutils" - ) - - declare -A tags - - for key in "${!repos[@]}"; do - repo="${repos[$key]}" - url="https://api.github.com/repos/$repo/releases/latest" - echo "[INFO] Fetching latest tag for $repo" | tee -a "$SUMMARY_LOG" - body=$(curl -fsSL "$url" || true) - if [[ -z "$body" ]]; then - echo "[WARN] Empty response for $repo; leaving $key unchanged" | tee -a "$SUMMARY_LOG" - continue + # Require curl; jq is preferred. Fallback to grep/sed if jq is missing. + if ! command -v curl >/dev/null 2>&1; then + echo "[ERROR] curl is required." | tee -a "$SUMMARY_LOG" + exit 1 fi - if command -v jq >/dev/null 2>&1; then - tag=$(printf '%s' "$body" | jq -r '.tag_name // empty') - else - tag=$(printf '%s' "$body" | grep -m1 '"tag_name"' | sed -E 's/.*"tag_name"\s*:\s*"([^"]+)".*/\1/') - fi - if [[ -n "$tag" ]]; then - tags[$key]="$tag" - else - echo "[WARN] Could not parse tag for $repo; leaving $key unchanged" | tee -a "$SUMMARY_LOG" - fi - done - # Merge into existing file - declare -A map - while IFS='=' read -r k v; do - [[ -z "$k" || "$k" =~ ^# ]] && continue - map[$k]="$v" - done < "$TAGS_FILE" + # Read existing to respect pinned values (only update keys set to 'auto' or 'latest') + declare -A existing + while IFS='=' read -r k v; do + [[ -z "$k" || "$k" =~ ^# ]] && continue + existing[$k]="$v" + done <"$TAGS_FILE" - for k in "${!tags[@]}"; do - # Only override if pinned value is 'auto' or 'latest' - if [[ "${existing[$k]:-}" =~ ^(auto|latest)$ ]] || [[ -z "${existing[$k]:-}" ]]; then - map[$k]="${tags[$k]}" - fi - done + declare -A repos=( + [HYPRLAND_TAG]="hyprwm/Hyprland" + [AQUAMARINE_TAG]="hyprwm/aquamarine" + [HYPRUTILS_TAG]="hyprwm/hyprutils" + [HYPRLANG_TAG]="hyprwm/hyprlang" + [HYPRGRAPHICS_TAG]="hyprwm/hyprgraphics" + [HYPRWAYLAND_SCANNER_TAG]="hyprwm/hyprwayland-scanner" + [HYPRLAND_PROTOCOLS_TAG]="hyprwm/hyprland-protocols" + [HYPRLAND_QT_SUPPORT_TAG]="hyprwm/hyprland-qt-support" + [HYPRLAND_QTUTILS_TAG]="hyprwm/hyprland-qtutils" + ) - { - for k in "${!map[@]}"; do - echo "$k=${map[$k]}" - done | sort - } > "$TAGS_FILE" + declare -A tags - echo "[INFO] Refreshed tags written to $TAGS_FILE" | tee -a "$SUMMARY_LOG" + for key in "${!repos[@]}"; do + repo="${repos[$key]}" + url="https://api.github.com/repos/$repo/releases/latest" + echo "[INFO] Fetching latest tag for $repo" | tee -a "$SUMMARY_LOG" + body=$(curl -fsSL "$url" || true) + if [[ -z "$body" ]]; then + echo "[WARN] Empty response for $repo; leaving $key unchanged" | tee -a "$SUMMARY_LOG" + continue + fi + if command -v jq >/dev/null 2>&1; then + tag=$(printf '%s' "$body" | jq -r '.tag_name // empty') + else + tag=$(printf '%s' "$body" | grep -m1 '"tag_name"' | sed -E 's/.*"tag_name"\s*:\s*"([^"]+)".*/\1/') + fi + if [[ -n "$tag" ]]; then + tags[$key]="$tag" + else + echo "[WARN] Could not parse tag for $repo; leaving $key unchanged" | tee -a "$SUMMARY_LOG" + fi + done + + # Merge into existing file + declare -A map + while IFS='=' read -r k v; do + [[ -z "$k" || "$k" =~ ^# ]] && continue + map[$k]="$v" + done <"$TAGS_FILE" + + for k in "${!tags[@]}"; do + # Only override if pinned value is 'auto' or 'latest' + if [[ "${existing[$k]:-}" =~ ^(auto|latest)$ ]] || [[ -z "${existing[$k]:-}" ]]; then + map[$k]="${tags[$k]}" + fi + done + + { + for k in "${!map[@]}"; do + echo "$k=${map[$k]}" + done | sort + } >"$TAGS_FILE" + + echo "[INFO] Refreshed tags written to $TAGS_FILE" | tee -a "$SUMMARY_LOG" } # Build runner using module scripts. Uses env vars from TAGS_FILE. run_stack() { - # shellcheck disable=SC1090 - source "$TAGS_FILE" - # Export tags so child scripts inherit them -export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG HYPRWAYLAND_SCANNER_TAG HYPRLAND_PROTOCOLS_TAG HYPRLAND_QT_SUPPORT_TAG HYPRLAND_QTUTILS_TAG WAYLAND_PROTOCOLS_TAG + # shellcheck disable=SC1090 + source "$TAGS_FILE" + # Export tags so child scripts inherit them + export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG HYPRWAYLAND_SCANNER_TAG HYPRLAND_PROTOCOLS_TAG HYPRLAND_QT_SUPPORT_TAG HYPRLAND_QTUTILS_TAG WAYLAND_PROTOCOLS_TAG - # Optionally install dependencies (not dry-run) - if [[ $WITH_DEPS -eq 1 ]]; then - echo "[INFO] Installing dependencies via 00-dependencies.sh" | tee -a "$SUMMARY_LOG" - if ! "$REPO_ROOT/install-scripts/00-dependencies.sh"; then - echo "[ERROR] Dependencies installation failed." | tee -a "$SUMMARY_LOG" - exit 1 - fi - fi - - # Build module list based on --only/--skip - local modules - if [[ -n "$ONLY_LIST" ]]; then - IFS=',' read -r -a modules <<< "$ONLY_LIST" - else - modules=("${DEFAULT_MODULES[@]}") - fi - if [[ -n "$SKIP_LIST" ]]; then - IFS=',' read -r -a _skips <<< "$SKIP_LIST" - local filtered=() - for m in "${modules[@]}"; do - local skip_it=0 - for s in "${_skips[@]}"; do - [[ "$m" == "$s" ]] && { skip_it=1; break; } - done - [[ $skip_it -eq 0 ]] && filtered+=("$m") - done - modules=("${filtered[@]}") - fi - - # Ensure core prerequisites are installed before hyprland on install runs - # Order: wayland-protocols-src, hyprland-protocols, hyprutils, hyprlang, aquamarine, hyprland - if [[ $DO_INSTALL -eq 1 ]]; then - # Auto-fetch latest tags for Hyprland stack unless disabled - if [[ $NO_FETCH -eq 0 ]]; then - # Detect whether hyprland is part of the run - need_fetch=0 - for m in "${modules[@]}"; do - [[ "$m" == "hyprland" ]] && need_fetch=1 - done - if [[ $need_fetch -eq 1 ]]; then - echo "[INFO] Auto-fetching latest tags for Hyprland stack" | tee -a "$SUMMARY_LOG" - fetch_latest_tags - fi - fi - local has_hl=0 has_aqua=0 has_wp=0 has_utils=0 has_lang=0 has_hlprot=0 - for m in "${modules[@]}"; do - [[ "$m" == "hyprland" ]] && has_hl=1 - [[ "$m" == "aquamarine" ]] && has_aqua=1 - [[ "$m" == "wayland-protocols-src" ]] && has_wp=1 - [[ "$m" == "hyprland-protocols" ]] && has_hlprot=1 - [[ "$m" == "hyprutils" ]] && has_utils=1 - [[ "$m" == "hyprlang" ]] && has_lang=1 - done - if [[ $has_hl -eq 1 ]]; then - # ensure each prerequisite is present - [[ $has_wp -eq 0 ]] && modules=("wayland-protocols-src" "${modules[@]}") - [[ $has_hlprot -eq 0 ]] && modules=("hyprland-protocols" "${modules[@]}") - [[ $has_utils -eq 0 ]] && modules=("hyprutils" "${modules[@]}") - [[ $has_lang -eq 0 ]] && modules=("hyprlang" "${modules[@]}") - [[ $has_aqua -eq 0 ]] && modules=("aquamarine" "${modules[@]}") - - # Reorder to exact sequence before hyprland - # Remove existing occurrences and rebuild in correct order - local tmp=() - local inserted_wp=0 inserted_hlprot=0 inserted_utils=0 inserted_lang=0 inserted_aqua=0 - for m in "${modules[@]}"; do - if [[ "$m" == "wayland-protocols-src" ]]; then - if [[ $inserted_wp -eq 0 ]]; then tmp+=("wayland-protocols-src"); inserted_wp=1; fi - elif [[ "$m" == "hyprland-protocols" ]]; then - if [[ $inserted_hlprot -eq 0 ]]; then - # ensure wayland-protocols-src before hyprland-protocols - if [[ $inserted_wp -eq 0 ]]; then tmp+=("wayland-protocols-src"); inserted_wp=1; fi - tmp+=("hyprland-protocols"); inserted_hlprot=1 - fi - elif [[ "$m" == "hyprutils" ]]; then - if [[ $inserted_utils -eq 0 ]]; then - # ensure protocols before utils - if [[ $inserted_wp -eq 0 ]]; then tmp+=("wayland-protocols-src"); inserted_wp=1; fi - if [[ $inserted_hlprot -eq 0 ]]; then tmp+=("hyprland-protocols"); inserted_hlprot=1; fi - tmp+=("hyprutils"); inserted_utils=1 - fi - elif [[ "$m" == "hyprlang" ]]; then - if [[ $inserted_lang -eq 0 ]]; then - # ensure utils before lang - if [[ $inserted_utils -eq 0 ]]; then - if [[ $inserted_wp -eq 0 ]]; then tmp+=("wayland-protocols-src"); inserted_wp=1; fi - if [[ $inserted_hlprot -eq 0 ]]; then tmp+=("hyprland-protocols"); inserted_hlprot=1; fi - tmp+=("hyprutils"); inserted_utils=1 - fi - tmp+=("hyprlang"); inserted_lang=1 - fi - elif [[ "$m" == "aquamarine" ]]; then - if [[ $inserted_aqua -eq 0 ]]; then - # ensure lang before aquamarine - if [[ $inserted_lang -eq 0 ]]; then - if [[ $inserted_utils -eq 0 ]]; then - if [[ $inserted_wp -eq 0 ]]; then tmp+=("wayland-protocols-src"); inserted_wp=1; fi - if [[ $inserted_hlprot -eq 0 ]]; then tmp+=("hyprland-protocols"); inserted_hlprot=1; fi - tmp+=("hyprutils"); inserted_utils=1 - fi - tmp+=("hyprlang"); inserted_lang=1 - fi - tmp+=("aquamarine"); inserted_aqua=1 - fi - elif [[ "$m" == "hyprland" ]]; then - # ensure all prerequisites already present - if [[ $inserted_wp -eq 0 ]]; then tmp+=("wayland-protocols-src"); inserted_wp=1; fi - if [[ $inserted_hlprot -eq 0 ]]; then tmp+=("hyprland-protocols"); inserted_hlprot=1; fi - if [[ $inserted_utils -eq 0 ]]; then tmp+=("hyprutils"); inserted_utils=1; fi - if [[ $inserted_lang -eq 0 ]]; then tmp+=("hyprlang"); inserted_lang=1; fi - if [[ $inserted_aqua -eq 0 ]]; then tmp+=("aquamarine"); inserted_aqua=1; fi - tmp+=("hyprland") - else - tmp+=("$m") + # Optionally install dependencies (not dry-run) + if [[ $WITH_DEPS -eq 1 ]]; then + echo "[INFO] Installing dependencies via 00-dependencies.sh" | tee -a "$SUMMARY_LOG" + if ! "$REPO_ROOT/install-scripts/00-dependencies.sh"; then + echo "[ERROR] Dependencies installation failed." | tee -a "$SUMMARY_LOG" + exit 1 fi - done - modules=("${tmp[@]}") fi - fi - declare -A results - - for mod in "${modules[@]}"; do - local script="$REPO_ROOT/install-scripts/$mod.sh" - echo "\n=== $mod ===" | tee -a "$SUMMARY_LOG" - [[ -f "$script" ]] || { echo "[WARN] Missing $script" | tee -a "$SUMMARY_LOG"; results[$mod]="MISSING"; continue; } - chmod +x "$script" || true - if [[ $DO_DRY_RUN -eq 1 ]]; then - if DRY_RUN=1 "$script"; then results[$mod]="PASS"; else results[$mod]="FAIL"; fi + # Build module list based on --only/--skip + local modules + if [[ -n "$ONLY_LIST" ]]; then + IFS=',' read -r -a modules <<<"$ONLY_LIST" else - if "$script"; then results[$mod]="INSTALLED"; else results[$mod]="FAIL"; fi + modules=("${DEFAULT_MODULES[@]}") + fi + if [[ -n "$SKIP_LIST" ]]; then + IFS=',' read -r -a _skips <<<"$SKIP_LIST" + local filtered=() + for m in "${modules[@]}"; do + local skip_it=0 + for s in "${_skips[@]}"; do + [[ "$m" == "$s" ]] && { + skip_it=1 + break + } + done + [[ $skip_it -eq 0 ]] && filtered+=("$m") + done + modules=("${filtered[@]}") fi - done - { - echo "\nSummary:" + # Ensure core prerequisites are installed before hyprland on install runs + # Order: wayland-protocols-src, hyprland-protocols, hyprutils, hyprlang, aquamarine, hyprland + if [[ $DO_INSTALL -eq 1 ]]; then + # Auto-fetch latest tags for Hyprland stack unless disabled + if [[ $NO_FETCH -eq 0 ]]; then + # Detect whether hyprland is part of the run + need_fetch=0 + for m in "${modules[@]}"; do + [[ "$m" == "hyprland" ]] && need_fetch=1 + done + if [[ $need_fetch -eq 1 ]]; then + echo "[INFO] Auto-fetching latest tags for Hyprland stack" | tee -a "$SUMMARY_LOG" + fetch_latest_tags + fi + fi + local has_hl=0 has_aqua=0 has_wp=0 has_utils=0 has_lang=0 has_hlprot=0 + for m in "${modules[@]}"; do + [[ "$m" == "hyprland" ]] && has_hl=1 + [[ "$m" == "aquamarine" ]] && has_aqua=1 + [[ "$m" == "wayland-protocols-src" ]] && has_wp=1 + [[ "$m" == "hyprland-protocols" ]] && has_hlprot=1 + [[ "$m" == "hyprutils" ]] && has_utils=1 + [[ "$m" == "hyprlang" ]] && has_lang=1 + done + if [[ $has_hl -eq 1 ]]; then + # ensure each prerequisite is present + [[ $has_wp -eq 0 ]] && modules=("wayland-protocols-src" "${modules[@]}") + [[ $has_hlprot -eq 0 ]] && modules=("hyprland-protocols" "${modules[@]}") + [[ $has_utils -eq 0 ]] && modules=("hyprutils" "${modules[@]}") + [[ $has_lang -eq 0 ]] && modules=("hyprlang" "${modules[@]}") + [[ $has_aqua -eq 0 ]] && modules=("aquamarine" "${modules[@]}") + + # Reorder to exact sequence before hyprland + # Remove existing occurrences and rebuild in correct order + local tmp=() + local inserted_wp=0 inserted_hlprot=0 inserted_utils=0 inserted_lang=0 inserted_aqua=0 + for m in "${modules[@]}"; do + if [[ "$m" == "wayland-protocols-src" ]]; then + if [[ $inserted_wp -eq 0 ]]; then + tmp+=("wayland-protocols-src") + inserted_wp=1 + fi + elif [[ "$m" == "hyprland-protocols" ]]; then + if [[ $inserted_hlprot -eq 0 ]]; then + # ensure wayland-protocols-src before hyprland-protocols + if [[ $inserted_wp -eq 0 ]]; then + tmp+=("wayland-protocols-src") + inserted_wp=1 + fi + tmp+=("hyprland-protocols") + inserted_hlprot=1 + fi + elif [[ "$m" == "hyprutils" ]]; then + if [[ $inserted_utils -eq 0 ]]; then + # ensure protocols before utils + if [[ $inserted_wp -eq 0 ]]; then + tmp+=("wayland-protocols-src") + inserted_wp=1 + fi + if [[ $inserted_hlprot -eq 0 ]]; then + tmp+=("hyprland-protocols") + inserted_hlprot=1 + fi + tmp+=("hyprutils") + inserted_utils=1 + fi + elif [[ "$m" == "hyprlang" ]]; then + if [[ $inserted_lang -eq 0 ]]; then + # ensure utils before lang + if [[ $inserted_utils -eq 0 ]]; then + if [[ $inserted_wp -eq 0 ]]; then + tmp+=("wayland-protocols-src") + inserted_wp=1 + fi + if [[ $inserted_hlprot -eq 0 ]]; then + tmp+=("hyprland-protocols") + inserted_hlprot=1 + fi + tmp+=("hyprutils") + inserted_utils=1 + fi + tmp+=("hyprlang") + inserted_lang=1 + fi + elif [[ "$m" == "aquamarine" ]]; then + if [[ $inserted_aqua -eq 0 ]]; then + # ensure lang before aquamarine + if [[ $inserted_lang -eq 0 ]]; then + if [[ $inserted_utils -eq 0 ]]; then + if [[ $inserted_wp -eq 0 ]]; then + tmp+=("wayland-protocols-src") + inserted_wp=1 + fi + if [[ $inserted_hlprot -eq 0 ]]; then + tmp+=("hyprland-protocols") + inserted_hlprot=1 + fi + tmp+=("hyprutils") + inserted_utils=1 + fi + tmp+=("hyprlang") + inserted_lang=1 + fi + tmp+=("aquamarine") + inserted_aqua=1 + fi + elif [[ "$m" == "hyprland" ]]; then + # ensure all prerequisites already present + if [[ $inserted_wp -eq 0 ]]; then + tmp+=("wayland-protocols-src") + inserted_wp=1 + fi + if [[ $inserted_hlprot -eq 0 ]]; then + tmp+=("hyprland-protocols") + inserted_hlprot=1 + fi + if [[ $inserted_utils -eq 0 ]]; then + tmp+=("hyprutils") + inserted_utils=1 + fi + if [[ $inserted_lang -eq 0 ]]; then + tmp+=("hyprlang") + inserted_lang=1 + fi + if [[ $inserted_aqua -eq 0 ]]; then + tmp+=("aquamarine") + inserted_aqua=1 + fi + tmp+=("hyprland") + else + tmp+=("$m") + fi + done + modules=("${tmp[@]}") + fi + fi + + declare -A results + for mod in "${modules[@]}"; do - printf "%-24s %s\n" "$mod" "${results[$mod]:-SKIPPED}" + local script="$REPO_ROOT/install-scripts/$mod.sh" + echo "\n=== $mod ===" | tee -a "$SUMMARY_LOG" + [[ -f "$script" ]] || { + echo "[WARN] Missing $script" | tee -a "$SUMMARY_LOG" + results[$mod]="MISSING" + continue + } + chmod +x "$script" || true + if [[ $DO_DRY_RUN -eq 1 ]]; then + if DRY_RUN=1 "$script"; then results[$mod]="PASS"; else results[$mod]="FAIL"; fi + else + if "$script"; then results[$mod]="INSTALLED"; else results[$mod]="FAIL"; fi + fi done - echo "\nLogs under: $LOG_DIR. This run: $SUMMARY_LOG" - } | tee -a "$SUMMARY_LOG" - # Non-zero on any FAILs - local failed=0 - for mod in "${modules[@]}"; do - [[ "${results[$mod]:-}" == FAIL ]] && failed=1 - done - return $failed + { + echo "\nSummary:" + for mod in "${modules[@]}"; do + printf "%-24s %s\n" "$mod" "${results[$mod]:-SKIPPED}" + done + echo "\nLogs under: $LOG_DIR. This run: $SUMMARY_LOG" + } | tee -a "$SUMMARY_LOG" + + # Non-zero on any FAILs + local failed=0 + for mod in "${modules[@]}"; do + [[ "${results[$mod]:-}" == FAIL ]] && failed=1 + done + return $failed } # Parse args while [[ $# -gt 0 ]]; do - case "$1" in - -h|--help) usage; exit 0 ;; - --with-deps) WITH_DEPS=1; shift ;; - --dry-run) DO_DRY_RUN=1; shift ;; - --install) DO_INSTALL=1; shift ;; - --fetch-latest) FETCH_LATEST=1; shift ;; - --restore) RESTORE=1; shift ;; - --via-helper) VIA_HELPER=1; shift ;; - --no-fetch) NO_FETCH=1; shift ;; - --only) ONLY_LIST=${2:-}; shift 2 ;; - --skip) SKIP_LIST=${2:-}; shift 2 ;; - --set) - shift - while [[ $# -gt 0 && "$1" != --* ]]; do - SET_ARGS+=("$1") + case "$1" in + -h | --help) + usage + exit 0 + ;; + --with-deps) + WITH_DEPS=1 shift - done - ;; - *) echo "Unknown argument: $1"; exit 2 ;; - esac + ;; + --dry-run) + DO_DRY_RUN=1 + shift + ;; + --install) + DO_INSTALL=1 + shift + ;; + --fetch-latest) + FETCH_LATEST=1 + shift + ;; + --restore) + RESTORE=1 + shift + ;; + --via-helper) + VIA_HELPER=1 + shift + ;; + --no-fetch) + NO_FETCH=1 + shift + ;; + --only) + ONLY_LIST=${2:-} + shift 2 + ;; + --skip) + SKIP_LIST=${2:-} + shift 2 + ;; + --set) + shift + while [[ $# -gt 0 && "$1" != --* ]]; do + SET_ARGS+=("$1") + shift + done + ;; + *) + echo "Unknown argument: $1" + exit 2 + ;; + esac done # Validate options if [[ $DO_INSTALL -eq 1 && $DO_DRY_RUN -eq 1 ]]; then - echo "[ERROR] Use either --dry-run or --install, not both." | tee -a "$SUMMARY_LOG" - exit 2 + echo "[ERROR] Use either --dry-run or --install, not both." | tee -a "$SUMMARY_LOG" + exit 2 fi ensure_tags_file # Apply tag operations if [[ $RESTORE -eq 1 ]]; then - restore_tags + restore_tags fi if [[ ${#SET_ARGS[@]} -gt 0 ]]; then - set_tags_from_args + set_tags_from_args fi if [[ $FETCH_LATEST -eq 1 ]]; then - fetch_latest_tags + fetch_latest_tags fi # Run the stack if [[ $DO_DRY_RUN -eq 0 && $DO_INSTALL -eq 0 ]]; then - echo "[INFO] No build option specified. Defaulting to --dry-run." | tee -a "$SUMMARY_LOG" - DO_DRY_RUN=1 + echo "[INFO] No build option specified. Defaulting to --dry-run." | tee -a "$SUMMARY_LOG" + DO_DRY_RUN=1 fi # If using helper, delegate to dry-run-build.sh for summary-only output if [[ $VIA_HELPER -eq 1 ]]; then - if [[ $DO_INSTALL -eq 1 ]]; then - echo "[ERROR] --via-helper cannot be combined with --install (helper is dry-run only)." | tee -a "$SUMMARY_LOG" - exit 2 - fi - # shellcheck disable=SC1090 - source "$TAGS_FILE" -export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG HYPRWAYLAND_SCANNER_TAG HYPRLAND_PROTOCOLS_TAG HYPRLAND_QT_SUPPORT_TAG HYPRLAND_QTUTILS_TAG WAYLAND_PROTOCOLS_TAG - helper="$REPO_ROOT/dry-run-build.sh" - if [[ ! -x "$helper" ]]; then - echo "[ERROR] dry-run-build.sh not found or not executable at $helper" | tee -a "$SUMMARY_LOG" - exit 1 - fi - args=() - [[ $WITH_DEPS -eq 1 ]] && args+=("--with-deps") - [[ -n "$ONLY_LIST" ]] && args+=("--only" "$ONLY_LIST") - [[ -n "$SKIP_LIST" ]] && args+=("--skip" "$SKIP_LIST") - echo "[INFO] Delegating to dry-run-build.sh ${args[*]}" | tee -a "$SUMMARY_LOG" - "$helper" "${args[@]}" - exit $? + if [[ $DO_INSTALL -eq 1 ]]; then + echo "[ERROR] --via-helper cannot be combined with --install (helper is dry-run only)." | tee -a "$SUMMARY_LOG" + exit 2 + fi + # shellcheck disable=SC1090 + source "$TAGS_FILE" + export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG HYPRWAYLAND_SCANNER_TAG HYPRLAND_PROTOCOLS_TAG HYPRLAND_QT_SUPPORT_TAG HYPRLAND_QTUTILS_TAG WAYLAND_PROTOCOLS_TAG + helper="$REPO_ROOT/dry-run-build.sh" + if [[ ! -x "$helper" ]]; then + echo "[ERROR] dry-run-build.sh not found or not executable at $helper" | tee -a "$SUMMARY_LOG" + exit 1 + fi + args=() + [[ $WITH_DEPS -eq 1 ]] && args+=("--with-deps") + [[ -n "$ONLY_LIST" ]] && args+=("--only" "$ONLY_LIST") + [[ -n "$SKIP_LIST" ]] && args+=("--skip" "$SKIP_LIST") + echo "[INFO] Delegating to dry-run-build.sh ${args[*]}" | tee -a "$SUMMARY_LOG" + "$helper" "${args[@]}" + exit $? fi run_stack From 307a0c641f1a8ac9f67df372755a291819646b34 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Thu, 9 Oct 2025 21:46:02 -0400 Subject: [PATCH 18/20] Fixed syntax error On branch hl-051 Your branch is up to date with 'origin/hl-051'. Changes to be committed: modified: install.sh --- install.sh | 193 ++++++++++++++++++++++++++--------------------------- 1 file changed, 94 insertions(+), 99 deletions(-) diff --git a/install.sh b/install.sh index 420f87a..a097c9c 100755 --- a/install.sh +++ b/install.sh @@ -22,7 +22,7 @@ RESET="$(tput sgr0)" # Function to print colorful text print_color() { printf "%b%s%b\n" "$1" "$2" "$RESET" -l +} # Warning: End of Life Support printf "\n%.0s" {1..2} @@ -59,17 +59,16 @@ print_color $YELLOW " " printf "\n%.0s" {1..2} - # Prompt user to continue or exit read -rp "Do you want to continue with the installation? [y/N]: " confirm case "$confirm" in - [yY][eE][sS]|[yY]) - echo -e "${OK} Continuing with installation..." - ;; - *) - echo -e "${NOTE} You chose not to continue. Exiting..." - exit 1 - ;; +[yY][eE][sS] | [yY]) + echo -e "${OK} Continuing with installation..." + ;; +*) + echo -e "${NOTE} You chose not to continue. Exiting..." + exit 1 + ;; esac # Create Directory for Install Logs @@ -83,7 +82,7 @@ LOG="Install-Logs/01-Hyprland-Install-Scripts-$(date +%d-%H%M%S).log" # Check if running as root. If root, script will exit if [[ $EUID -eq 0 ]]; then echo "${ERROR} This script should ${WARNING}NOT${RESET} be executed as root!! Exiting......." | tee -a "$LOG" - printf "\n%.0s" {1..2} + printf "\n%.0s" {1..2} exit 1 fi @@ -109,14 +108,13 @@ if ! command -v whiptail >/dev/null; then printf "\n%.0s" {1..1} fi - -printf "\n%.0s" {1..2} +printf "\n%.0s" {1..2} echo -e "\e[35m ╦╔═┌─┐┌─┐╦ ╦ ╦┬ ┬┌─┐┬─┐┬ ┌─┐┌┐┌┌┬┐ ╠╩╗│ ││ │║ ╠═╣└┬┘├─┘├┬┘│ ├─┤│││ ││ July 2025 ╩ ╩└─┘└─┘╩═╝ ╩ ╩ ┴ ┴ ┴└─┴─┘┴ ┴┘└┘─┴┘ Debian Trixie / SiD \e[0m" -printf "\n%.0s" {1..1} +printf "\n%.0s" {1..1} # Welcome message using whiptail (for displaying information) whiptail --title "KooL Debian-Hyprland Trixie+ (2025) Install Script" \ @@ -140,13 +138,12 @@ sleep 1 printf "\n%.0s" {1..1} # install pciutils if detected not installed. Necessary for detecting GPU -if ! dpkg -l | grep -w pciutils > /dev/null; then +if ! dpkg -l | grep -w pciutils >/dev/null; then echo "pciutils is not installed. Installing..." | tee -a "$LOG" sudo apt install -y pciutils printf "\n%.0s" {1..1} fi - # Path to the install-scripts directory script_directory=install-scripts @@ -171,8 +168,8 @@ if [ -f "./hypr-tags.env" ]; then # shellcheck disable=SC1091 source "./hypr-tags.env" # If core tags are set to auto/latest, refresh to resolve concrete versions - if [ "${HYPRUTILS_TAG:-}" = "auto" ] || [ "${HYPRUTILS_TAG:-}" = "latest" ] || [ -z "${HYPRUTILS_TAG:-}" ] || \ - [ "${HYPRLANG_TAG:-}" = "auto" ] || [ "${HYPRLANG_TAG:-}" = "latest" ] || [ -z "${HYPRLANG_TAG:-}" ]; then + if [ "${HYPRUTILS_TAG:-}" = "auto" ] || [ "${HYPRUTILS_TAG:-}" = "latest" ] || [ -z "${HYPRUTILS_TAG:-}" ] || + [ "${HYPRLANG_TAG:-}" = "auto" ] || [ "${HYPRLANG_TAG:-}" = "latest" ] || [ -z "${HYPRLANG_TAG:-}" ]; then if [ -f ./refresh-hypr-tags.sh ]; then chmod +x ./refresh-hypr-tags.sh || true ./refresh-hypr-tags.sh @@ -220,17 +217,17 @@ services=("gdm.service" "gdm3.service" "lightdm.service" "lxdm.service") # Function to check if any login services are active check_services_running() { - active_services=() # Array to store active services + active_services=() # Array to store active services for svc in "${services[@]}"; do if systemctl is-active --quiet "$svc"; then - active_services+=("$svc") + active_services+=("$svc") fi done if [ ${#active_services[@]} -gt 0 ]; then - return 0 + return 0 else - return 1 + return 1 fi } @@ -244,7 +241,7 @@ fi # Check if NVIDIA GPU is detected nvidia_detected=false -if lspci | grep -i "nvidia" &> /dev/null; then +if lspci | grep -i "nvidia" &>/dev/null; then nvidia_detected=true whiptail --title "NVIDIA GPU Detected" --msgbox "NVIDIA GPU detected in your system.\n\nNOTE: The script will install nvidia-dkms, nvidia-utils, and nvidia-settings if you choose to configure." 12 60 fi @@ -304,20 +301,20 @@ while true; do if [ $? -ne 0 ]; then echo -e "\n" echo "❌ ${INFO} You 🫵 cancelled the selection. ${YELLOW}Goodbye!${RESET}" | tee -a "$LOG" - exit 0 # Exit the script if Cancel is pressed + exit 0 # Exit the script if Cancel is pressed fi # If no option was selected, notify and restart the selection if [ -z "$selected_options" ]; then whiptail --title "Warning" --msgbox "No options were selected. Please select at least one option." 10 60 - continue # Return to selection if no options selected + continue # Return to selection if no options selected fi # Strip the quotes and trim spaces if necessary (sanitize the input) selected_options=$(echo "$selected_options" | tr -d '"' | tr -s ' ') # Convert selected options into an array (preserving spaces in values) - IFS=' ' read -r -a options <<< "$selected_options" + IFS=' ' read -r -a options <<<"$selected_options" # Check if the "dots" option was selected dots_selected="OFF" @@ -332,14 +329,14 @@ while true; do if [[ "$dots_selected" == "OFF" ]]; then # Show a note about not selecting the "dots" option if ! whiptail --title "KooL Hyprland Dot Files" --yesno \ - "You have not selected to install the pre-configured KooL Hyprland dotfiles.\n\nKindly NOTE that if you proceed without Dots, Hyprland will start with default vanilla Hyprland configuration and I won't be able to give you support.\n\nWould you like to continue install without KooL Hyprland Dots or return to choices/options?" \ - --yes-button "Continue" --no-button "Return" 15 90; then + "You have not selected to install the pre-configured KooL Hyprland dotfiles.\n\nKindly NOTE that if you proceed without Dots, Hyprland will start with default vanilla Hyprland configuration and I won't be able to give you support.\n\nWould you like to continue install without KooL Hyprland Dots or return to choices/options?" \ + --yes-button "Continue" --no-button "Return" 15 90; then echo "🔙 Returning to options..." | tee -a "$LOG" continue else # User chose to continue echo "${INFO} ⚠️ Continuing WITHOUT the dotfiles installation..." | tee -a "$LOG" - printf "\n%.0s" {1..1} + printf "\n%.0s" {1..1} fi fi @@ -354,11 +351,11 @@ while true; do if ! whiptail --title "Confirm Your Choices" --yesno "$(printf "%s" "$confirm_message")" 25 80; then echo -e "\n" echo "❌ ${SKY_BLUE}You're not 🫵 happy${RESET}. ${YELLOW}Returning to options...${RESET}" | tee -a "$LOG" - continue + continue fi echo "👌 ${OK} You confirmed your choices. Proceeding with ${SKY_BLUE}KooL 🇵🇭 Hyprland Installation...${RESET}" | tee -a "$LOG" - break + break done printf "\n%.0s" {1..1} @@ -381,8 +378,8 @@ execute_script "fonts.sh" # Optional: refresh tags before building the Hyprland stack # Set FETCH_LATEST=1 to opt-in (default is no-refresh to honor pinned tags) if [ "${FETCH_LATEST:-0}" = "1" ] && [ -f ./refresh-hypr-tags.sh ]; then - chmod +x ./refresh-hypr-tags.sh || true - ./refresh-hypr-tags.sh + chmod +x ./refresh-hypr-tags.sh || true + ./refresh-hypr-tags.sh fi echo "${INFO} Installing ${SKY_BLUE}KooL Hyprland packages...${RESET}" | tee -a "$LOG" @@ -432,73 +429,73 @@ sleep 1 selected_options=$(echo "$selected_options" | tr -d '"' | tr -s ' ') # Convert selected options into an array (splitting by spaces) -IFS=' ' read -r -a options <<< "$selected_options" +IFS=' ' read -r -a options <<<"$selected_options" # Loop through selected options for option in "${options[@]}"; do case "$option" in - sddm) - if check_services_running; then - active_list=$(printf "%s\n" "${active_services[@]}") - whiptail --title "Error" --msgbox "One of the following login services is running:\n$active_list\n\nPlease stop & disable it or DO not choose SDDM." 12 60 - exec "$0" - else - echo "${INFO} Installing and configuring ${SKY_BLUE}SDDM...${RESET}" | tee -a "$LOG" - execute_script "sddm.sh" - fi - ;; - nvidia) - echo "${INFO} Configuring ${SKY_BLUE}nvidia stuff${RESET}" | tee -a "$LOG" - execute_script "nvidia.sh" - ;; - gtk_themes) - echo "${INFO} Installing ${SKY_BLUE}GTK themes...${RESET}" | tee -a "$LOG" - execute_script "gtk_themes.sh" - ;; - input_group) - echo "${INFO} Adding user into ${SKY_BLUE}input group...${RESET}" | tee -a "$LOG" - execute_script "InputGroup.sh" - ;; - ags) - echo "${INFO} Installing ${SKY_BLUE}AGS v1 for Desktop Overview...${RESET}" | tee -a "$LOG" - execute_script "ags.sh" - ;; - xdph) - echo "${INFO} Installing ${SKY_BLUE}xdg-desktop-portal-hyprland...${RESET}" | tee -a "$LOG" - execute_script "xdph.sh" - ;; - bluetooth) - echo "${INFO} Configuring ${SKY_BLUE}Bluetooth...${RESET}" | tee -a "$LOG" - execute_script "bluetooth.sh" - ;; - thunar) - echo "${INFO} Installing ${SKY_BLUE}Thunar file manager...${RESET}" | tee -a "$LOG" - execute_script "thunar.sh" - execute_script "thunar_default.sh" - ;; - sddm_theme) - echo "${INFO} Downloading & Installing ${SKY_BLUE}Additional SDDM theme...${RESET}" | tee -a "$LOG" - execute_script "sddm_theme.sh" - ;; - zsh) - echo "${INFO} Installing ${SKY_BLUE}zsh with Oh-My-Zsh...${RESET}" | tee -a "$LOG" - execute_script "zsh.sh" - ;; - pokemon) - echo "${INFO} Adding ${SKY_BLUE}Pokemon color scripts to terminal...${RESET}" | tee -a "$LOG" - execute_script "zsh_pokemon.sh" - ;; - rog) - echo "${INFO} Installing ${SKY_BLUE}ROG laptop packages...${RESET}" | tee -a "$LOG" - execute_script "rog.sh" - ;; - dots) - echo "${INFO} Installing pre-configured ${SKY_BLUE}KooL Hyprland dotfiles...${RESET}" | tee -a "$LOG" - execute_script "dotfiles-branch.sh" - ;; - *) - echo "Unknown option: $option" | tee -a "$LOG" - ;; + sddm) + if check_services_running; then + active_list=$(printf "%s\n" "${active_services[@]}") + whiptail --title "Error" --msgbox "One of the following login services is running:\n$active_list\n\nPlease stop & disable it or DO not choose SDDM." 12 60 + exec "$0" + else + echo "${INFO} Installing and configuring ${SKY_BLUE}SDDM...${RESET}" | tee -a "$LOG" + execute_script "sddm.sh" + fi + ;; + nvidia) + echo "${INFO} Configuring ${SKY_BLUE}nvidia stuff${RESET}" | tee -a "$LOG" + execute_script "nvidia.sh" + ;; + gtk_themes) + echo "${INFO} Installing ${SKY_BLUE}GTK themes...${RESET}" | tee -a "$LOG" + execute_script "gtk_themes.sh" + ;; + input_group) + echo "${INFO} Adding user into ${SKY_BLUE}input group...${RESET}" | tee -a "$LOG" + execute_script "InputGroup.sh" + ;; + ags) + echo "${INFO} Installing ${SKY_BLUE}AGS v1 for Desktop Overview...${RESET}" | tee -a "$LOG" + execute_script "ags.sh" + ;; + xdph) + echo "${INFO} Installing ${SKY_BLUE}xdg-desktop-portal-hyprland...${RESET}" | tee -a "$LOG" + execute_script "xdph.sh" + ;; + bluetooth) + echo "${INFO} Configuring ${SKY_BLUE}Bluetooth...${RESET}" | tee -a "$LOG" + execute_script "bluetooth.sh" + ;; + thunar) + echo "${INFO} Installing ${SKY_BLUE}Thunar file manager...${RESET}" | tee -a "$LOG" + execute_script "thunar.sh" + execute_script "thunar_default.sh" + ;; + sddm_theme) + echo "${INFO} Downloading & Installing ${SKY_BLUE}Additional SDDM theme...${RESET}" | tee -a "$LOG" + execute_script "sddm_theme.sh" + ;; + zsh) + echo "${INFO} Installing ${SKY_BLUE}zsh with Oh-My-Zsh...${RESET}" | tee -a "$LOG" + execute_script "zsh.sh" + ;; + pokemon) + echo "${INFO} Adding ${SKY_BLUE}Pokemon color scripts to terminal...${RESET}" | tee -a "$LOG" + execute_script "zsh_pokemon.sh" + ;; + rog) + echo "${INFO} Installing ${SKY_BLUE}ROG laptop packages...${RESET}" | tee -a "$LOG" + execute_script "rog.sh" + ;; + dots) + echo "${INFO} Installing pre-configured ${SKY_BLUE}KooL Hyprland dotfiles...${RESET}" | tee -a "$LOG" + execute_script "dotfiles-branch.sh" + ;; + *) + echo "Unknown option: $option" | tee -a "$LOG" + ;; esac done @@ -513,7 +510,6 @@ for file in "${files_to_delete[@]}"; do fi done - clear # copy fastfetch config if debian is not present @@ -547,13 +543,13 @@ if [ -e /usr/local/bin/hyprland ] || [ -f /usr/local/bin/Hyprland ]; then if [[ "$HYP" == "y" || "$HYP" == "yes" ]]; then echo "${INFO} Rebooting now..." - systemctl reboot + systemctl reboot break elif [[ "$HYP" == "n" || "$HYP" == "no" ]]; then echo "👌 ${OK} You chose NOT to reboot" printf "\n%.0s" {1..1} # Check if NVIDIA GPU is present - if lspci | grep -i "nvidia" &> /dev/null; then + if lspci | grep -i "nvidia" &>/dev/null; then echo "${INFO} HOWEVER ${YELLOW}NVIDIA GPU${RESET} detected. Reminder that you must REBOOT your SYSTEM..." printf "\n%.0s" {1..1} fi @@ -570,4 +566,3 @@ else fi printf "\n%.0s" {1..2} - From a1a4bb4622905b1c031c02601a2cdb9741774b9c Mon Sep 17 00:00:00 2001 From: Don Williams Date: Fri, 10 Oct 2025 13:22:29 -0400 Subject: [PATCH 19/20] Updated CHANGELOG and README Committer: Don Williams On branch hl-051 Your branch is up to date with 'origin/hl-051' Changes to be committed: modified: CHANGELOGS.md modified: README.md --- CHANGELOGS.md | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 18 +++++++--------- 2 files changed, 64 insertions(+), 11 deletions(-) diff --git a/CHANGELOGS.md b/CHANGELOGS.md index fa41030..316dad4 100644 --- a/CHANGELOGS.md +++ b/CHANGELOGS.md @@ -1,5 +1,62 @@ ## CHANGELOGS +## 10 October 2025 + +### Hyprland 0.51.x install support + +- Hyprland builds 0.51.x from source +- Added documentation for upgrading from 0.49/0.50.x to 0.51.1. + +### New scripts and modules + - update-hyprland.sh: Manage the Hyprland stack with: + - --install / --dry-run build modes + - --only and --skip for selective components + - --with-deps to (re)install build deps + - --set {KEY=TAG} and --restore tag backup support + - --fetch-latest to pull latest GitHub release tags + - --via-helper to delegate summary-only dry-runs + - dry-run-build.sh: Compile-only helper with summary output + - install-scripts/wayland-protocols-src.sh: Build wayland-protocols from + source (>= 1.45) to satisfy Hyprland 0.51.x requirements + +### Core features + - Centralized tag management via hypr-tags.env; tags exported to all + modules. Environment overrides remain first priority. + - Automatic dependency ordering for Hyprland 0.51.x: + wayland-protocols-src → hyprland-protocols → hyprutils → hyprlang → + aquamarine → hyprland + - Optional auto-fetch of latest tags on install runs that include + hyprland (can be disabled via --no-fetch) + - Selective updates for targeted components and skip lists + - Dry-run mode to validate builds without installing + +### Installer integration + - install.sh reads hypr-tags.env and optionally refreshes tags. + - Ensures wayland-protocols-src is built before Hyprland. + - Maintains proper sequencing for the Hyprland dependencies. + +### Docs + - Debian-Hyprland-Install-Upgrade.md and .es.md: + - Add explicit section: Upgrade 0.49/0.50.x → 0.51.1 + - Recommend: `./update-hyprland.sh --install --only hyprland` + - Provide optional `--with-deps` and `--dry-run` flows + - Full install via install.sh is not required for this + upgrade unless optional modules need refresh + +### Usage highlights + - Pin and upgrade to 0.51.1: + ./update-hyprland.sh --set HYPRLAND=v0.51.1 + ./update-hyprland.sh --install --only hyprland + - Optional: + ./update-hyprland.sh --with-deps --install --only hyprland + ./update-hyprland.sh --dry-run --only hyprland + +### Notes + - Target OS remains Debian Trixie/Testing/SID + - Run as sudo-capable user (not root) + - Ensure deb-src entries are enabled. + + ## 22 July 2025 - Updated sddm theme and script to work with the updated simple_sddm_2 theme - Manual building process diff --git a/README.md b/README.md index ee2637e..72eff7c 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ https://github.com/user-attachments/assets/49bc12b2-abaf-45de-a21c-67aacd9bb872 #### ⚠️ Pre-requisites and VERY Important! ### - Do not run this installer as sudo or as root - This Installer requires a user with a priviledge to install packages -- Needs a Debian 13 Testing (Trixie) Branch as it needs a newer wayland packages! I have tried on Stable Debian 12 Bookworm in which, Hyprland wont build. +- Needs a Debian 13 Trixie or greater. As it needs a newer wayland packages! I have tried on Stable Debian 12 Bookworm in which, Hyprland wont build. - edit your /etc/apt/sources.list and remove # on lines with deb-src to enable source packaging else will not install properly especially Hyprland ```bash sudo nano /etc/apt/sources.list @@ -91,11 +91,12 @@ sudo nano /etc/apt/sources.list - the wallpaper offered to be downloaded towards the end is from this [`WALLPAPER-REPO`](https://github.com/JaKooLit/Wallpaper-Bank) #### ✨ Some notes on this installer / Prerequisites -- This script is meant to install in Debian Testing (Trixie) and Debian Unstable (SID). This script Will NOT work with Bookworm +- This script is meant to install in Debian Trixie or newer . This script Will NOT work with Bookworm - If However, decided to try, recommend to install SDDM. Apart from GDM and SDDM, any other Login Manager may not work nor launch Hyprland. However, hyprland can be launched through tty by type Hyprland - 🕯️ network-manager-gnome (nm-applet) has been removed from the packages to install. This is because it is known to restart the networkmanager causing issues in the installation process. After you boot up, inorder to get the network-manager applet, install network-manager-gnome. `sudo apt install network-manager-gnome` See below if your network or wifi became unmanaged after installation - If you have nvidia, and wanted to use proprietary drivers, uninstall nouveau first (if installed). This script will be installing proprietary nvidia drivers and will not deal with removal of nouveau. - NVIDIA users / owners, after installation, check [`THIS`](https://github.com/JaKooLit/Hyprland-Dots/wiki/Notes_to_remember#--for-nvidia-gpu-users) +- NIVIDIA users: Strongly suggest you visit this site and install current drivers for newer GPUs. [`NVIDIA-Drivers`](https://github.com/mexersus/debian-nvidia-drivers) #### ✨ Costumize the packages to be installed - inside the install-scripts directory, you can edit 01-hypr-pkgs.sh. Do not edit 00-dependencies.sh unless you know what you are doing. Care though as the Hyprland Dots may not work properly! @@ -126,7 +127,7 @@ sudo apt install --no-install-recommends -y sddm ## ✨ Auto clone and install > [!CAUTION] -> If you are using FISH SHELL, DO NOT use this function. Clone and ran install.sh instead +> If you are using FISH SHELL, DO NOT use this function. Clone and run install.sh instead - you can use this command to automatically clone the installer and ran the script for you - NOTE: `curl` package is required before running this command @@ -181,13 +182,9 @@ source ~/.zshrc #### Most common question I got is, Hey Ja, Why the heck it is taking long time to install? Other distro like Arch its only a minute or two. Why here takes like forever?!?!?! - Well, most of the core packages are downloaded and Build and compiled from SOURCE. Unlike Other distros, they already have prepacked binary that can just download and install. -## 🛎 *** DEBIAN and UBUNTU Hyprland Dots UPDATING NOTES *** -> [!IMPORTANT] -> This is very Important for Debian and Ubuntu Dots -- Some parts of KooL's Hyprland Dots [`LINK`](https://github.com/JaKooLit/Hyprland-Dots) are not compatible on Debian and Ubuntu especially the hyprland settings. -- That is the reason the DOTS for those distro's are "fixed" and they are being pulled on different branch of KooL Dots. - -- To update your KooL's Dots follow this [WIKI](https://github.com/JaKooLit/Hyprland-Dots/wiki#--debian-and-ubuntu-hyprland-dots-updating-notes-) +## 🛎 *** DEBIAN Hyprland Dots UPDATING NOTES *** +> [!CHANGE] +- With this new update to Debian-Hyprland the current Hyprland-Dots are now compatible with Debian. This applies only to Debian, not ubuntu. > [!NOTE] > This script does not setup audio. Kindly set up. If you have not, I recommend pipewire. `sudo apt install -y pipewire` @@ -284,7 +281,6 @@ cd ~/Debian-Hyprland - Want to contribute on KooL-Hyprland-Dots Click [`HERE`](https://github.com/JaKooLit/Hyprland-Dots/blob/main/CONTRIBUTING.md) for a guide how to contribute - Want to contribute on This Installer? Click [`HERE`](https://github.com/JaKooLit/Debian-Hyprland/blob/main/CONTRIBUTING.md) for a guide how to contribute - #### 👍👍👍 Thanks and Credits! - [`Hyprland`](https://hyprland.org/) Of course to Hyprland and @vaxerski for this awesome Dynamic Tiling Manager. From 5928c27dcabfc7753af041aab1c647f2f30c8259 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Fri, 10 Oct 2025 13:30:27 -0400 Subject: [PATCH 20/20] Updated README --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 72eff7c..f26e9dd 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,14 @@ sudo nano /etc/apt/sources.list - ensure to allow to install non-free drivers especially for users with NVIDIA gpus. You can also install non-free drivers if required. Edit install-scripts/nvidia.sh and change the nvidia stuff's if required ### 🪧🪧🪧 ANNOUNCEMENT 🪧🪧🪧 + +- 10 OCTOBER 2025 Update! +- Hyprland-Debian nows builds 0.51.1 from source! + - The installer now can be used to install newer releases later + - If you are currently running 0.49, or 0.50, you can upgrade to 0.51.1 + - You do not have to re-install everything, but re-running `install.sh` works also + - Intstructions are available in English and Spanish + - 25 July 2025 Update! - All Hyprland and associated packages set to install using this script are downloaded and built from source (github). However, do note that it is downloaded from each individual releases. You can set versions by editing the scripts located install-scripts directory. - These packages are NOT updated automatically. You need to manually update it yourself