From 2357e80e00283a1993a021b87205c8115b45f650 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Mon, 29 Dec 2025 11:46:34 -0500 Subject: [PATCH] Adding hyprwire depdency On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: hypr-tags.env new file: install-scripts/hyprwire.sh modified: install.sh modified: refresh-hypr-tags.sh modified: update-hyprland.sh --- hypr-tags.env | 1 + install-scripts/hyprwire.sh | 62 +++++++++++++++++++++++++++++++++++++ install.sh | 5 ++- refresh-hypr-tags.sh | 4 ++- update-hyprland.sh | 5 ++- 5 files changed, 74 insertions(+), 3 deletions(-) create mode 100644 install-scripts/hyprwire.sh mode change 100644 => 100755 refresh-hypr-tags.sh diff --git a/hypr-tags.env b/hypr-tags.env index 81c0404..95cdb27 100644 --- a/hypr-tags.env +++ b/hypr-tags.env @@ -12,4 +12,5 @@ HYPRWAYLAND_SCANNER_TAG=v0.4.5 HYPRLAND_PROTOCOLS_TAG=v0.7.0 HYPRLAND_QT_SUPPORT_TAG=v0.1.0 HYPRLAND_GUIUTILS_TAG=v0.2.0 +HYPRWIRE_TAG=auto WAYLAND_PROTOCOLS_TAG=1.46 diff --git a/install-scripts/hyprwire.sh b/install-scripts/hyprwire.sh new file mode 100644 index 0000000..bee094a --- /dev/null +++ b/install-scripts/hyprwire.sh @@ -0,0 +1,62 @@ +#!/bin/bash +# 💫 https://github.com/JaKooLit 💫 # +# Hypr Ecosystem +# hyprwire + +# Specific branch or release (honor env override) +tag="v0.1.0" +if [ -n "${HYPRWIRE_TAG:-}" ]; then tag="$HYPRWIRE_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)_hyprwire.log" +MLOG="install-$(date +%d-%H%M%S)_hyprwire2.log" + +printf "${NOTE} Installing hyprwire $tag...\n" + +# Remove existing tree if present +if [ -d "hyprwire" ]; then + printf "${NOTE} Removing existing hyprwire folder...\n" + rm -rf "hyprwire" 2>&1 | tee -a "$LOG" +fi + +# Clone and build +if git clone --recursive -b "$tag" https://github.com/hyprwm/hyprwire.git; then + cd hyprwire || exit 1 + cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local + cmake --build build -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 + printf "${OK} hyprwire $tag installed successfully.\n" 2>&1 | tee -a "$MLOG" + else + echo -e "${ERROR} Installation failed for hyprwire $tag" 2>&1 | tee -a "$MLOG" + fi + else + echo "${NOTE} DRY RUN: Skipping installation of hyprwire $tag." + fi + [ -f "$MLOG" ] && mv "$MLOG" ../Install-Logs/ + cd .. +else + echo -e "${ERROR} Download failed for hyprwire $tag" 2>&1 | tee -a "$LOG" +fi + +printf "\n%.0s" {1..2} diff --git a/install.sh b/install.sh index 9e489b2..9dcf278 100755 --- a/install.sh +++ b/install.sh @@ -293,7 +293,7 @@ if [ -f "./hypr-tags.env" ]; then 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 + export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG HYPRWAYLAND_SCANNER_TAG HYPRLAND_PROTOCOLS_TAG HYPRLAND_QT_SUPPORT_TAG HYPRLAND_QTUTILS_TAG HYPRWIRE_TAG WAYLAND_PROTOCOLS_TAG fi ################# @@ -540,6 +540,9 @@ else sleep 1 execute_script "xkbcommon.sh" sleep 1 + # Build hyprwire before Hyprland (required by Hyprland >= 0.53) + execute_script "hyprwire.sh" + sleep 1 execute_script "hyprland.sh" sleep 1 execute_script "hyprpolkitagent.sh" diff --git a/refresh-hypr-tags.sh b/refresh-hypr-tags.sh old mode 100644 new mode 100755 index e48f1a7..e669de2 --- a/refresh-hypr-tags.sh +++ b/refresh-hypr-tags.sh @@ -13,7 +13,7 @@ SUMMARY_LOG="$LOG_DIR/refresh-tags-$TS.log" # Ensure tags file exists if [[ ! -f "$TAGS_FILE" ]]; then - cat > "$TAGS_FILE" <<'EOF' +cat > "$TAGS_FILE" <<'EOF' HYPRLAND_TAG=v0.51.1 AQUAMARINE_TAG=v0.9.3 HYPRUTILS_TAG=v0.8.2 @@ -23,6 +23,7 @@ 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 +HYPRWIRE_TAG=auto WAYLAND_PROTOCOLS_TAG=1.45 EOF fi @@ -47,6 +48,7 @@ declare -A repos=( [HYPRLAND_PROTOCOLS_TAG]="hyprwm/hyprland-protocols" [HYPRLAND_QT_SUPPORT_TAG]="hyprwm/hyprland-qt-support" [HYPRLAND_QTUTILS_TAG]="hyprwm/hyprland-qtutils" + [HYPRWIRE_TAG]="hyprwm/hyprwire" ) # Read existing diff --git a/update-hyprland.sh b/update-hyprland.sh index 6063082..ea3c3a6 100755 --- a/update-hyprland.sh +++ b/update-hyprland.sh @@ -44,6 +44,7 @@ DEFAULT_MODULES=( hyprland-protocols hyprland-qt-support hyprland-guiutils + hyprwire hyprland ) @@ -75,6 +76,7 @@ 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 +HYPRWIRE_TAG=auto EOF fi } @@ -156,6 +158,7 @@ fetch_latest_tags() { [HYPRLAND_PROTOCOLS_TAG]="hyprwm/hyprland-protocols" [HYPRLAND_QT_SUPPORT_TAG]="hyprwm/hyprland-qt-support" [HYPRLAND_QTUTILS_TAG]="hyprwm/hyprland-qtutils" + [HYPRWIRE_TAG]="hyprwm/hyprwire" ) declare -A tags @@ -209,7 +212,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 WAYLAND_PROTOCOLS_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 HYPRWIRE_TAG WAYLAND_PROTOCOLS_TAG # Optionally install dependencies (not dry-run) if [[ $WITH_DEPS -eq 1 ]]; then