From 805821e85a2e370c0404df18cb8a5811e0413e2e Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sun, 20 Jul 2025 01:03:34 +0900 Subject: [PATCH] some updates on dependencies --- install-scripts/hyprgraphics.sh | 12 ++++++++ install-scripts/hyprland-qtutils.sh | 5 ++- install-scripts/hyprland.sh | 2 +- install-scripts/hyprpolkitagent.sh | 2 +- install-scripts/xdph.sh | 47 +++++++++++++++++++++++++---- install.sh | 2 -- 6 files changed, 59 insertions(+), 11 deletions(-) diff --git a/install-scripts/hyprgraphics.sh b/install-scripts/hyprgraphics.sh index ac24a5c..e4e1abc 100755 --- a/install-scripts/hyprgraphics.sh +++ b/install-scripts/hyprgraphics.sh @@ -3,6 +3,9 @@ # Hypr Ecosystem # # hyprgraphics # +hyprgraphics=( + libmagic +) #specific branch or release graphics_tag="v0.1.5" @@ -27,6 +30,15 @@ MLOG="install-$(date +%d-%H%M%S)_hyprgraphics2.log" # Installation of dependencies printf "\n%s - Installing ${YELLOW}hyprgraphics dependencies${RESET} .... \n" "${INFO}" +for PKG1 in "${hyprgraphics[@]}"; do + re_install_package "$PKG1" 2>&1 | tee -a "$LOG" + if [ $? -ne 0 ]; then + echo -e "\e[1A\e[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs" + exit 1 + fi +done +printf "\n%.0s" {1..1} + # Check if hyprgraphics directory exists and remove it if [ -d "hyprgraphics" ]; then rm -rf "hyprgraphics" diff --git a/install-scripts/hyprland-qtutils.sh b/install-scripts/hyprland-qtutils.sh index 88d0b02..d0f8ceb 100755 --- a/install-scripts/hyprland-qtutils.sh +++ b/install-scripts/hyprland-qtutils.sh @@ -6,11 +6,14 @@ qtutils=( libqt6core5compat6 qt6-base-dev - qt6-wayland + qt6-wayland-dev + qt6-wayland qt6-declarative-dev qml6-module-qtcore qt6-3d-dev qt6-5compat-dev + libqt6waylandclient6 + qml6-module-qtwayland-client-texturesharing ) #specific branch or release diff --git a/install-scripts/hyprland.sh b/install-scripts/hyprland.sh index 0441c25..b3106a8 100755 --- a/install-scripts/hyprland.sh +++ b/install-scripts/hyprland.sh @@ -45,7 +45,7 @@ printf "\n%s - Installing Hyprland additional dependencies (glaze).... \n" "${NO if [ ! -d /usr/include/glaze ]; then echo "${INFO} ${YELLOW}Glaze${RESET} is not installed. Installing ${YELLOW}glaze from assets${RESET} ..." sudo dpkg -i assets/libglaze-dev_4.4.3-1_all.deb 2>&1 | tee -a "$LOG" - sudo apt install -f -y 2>&1 | tee -a "$LOG" + sudo apt-get install -f -y 2>&1 | tee -a "$LOG" echo "${INFO} ${YELLOW}libglaze-dev from assets${RESET} installed." fi diff --git a/install-scripts/hyprpolkitagent.sh b/install-scripts/hyprpolkitagent.sh index e384a80..667e0ee 100755 --- a/install-scripts/hyprpolkitagent.sh +++ b/install-scripts/hyprpolkitagent.sh @@ -32,7 +32,7 @@ MLOG="install-$(date +%d-%H%M%S)_hyprpolkitagent.log" printf "\n%s - Installing hyprpolkitagent dependencies.... \n" "${NOTE}" for PKG1 in "${polkitagent[@]}"; do - install_package "$PKG1" 2>&1 | tee -a "$LOG" + re_install_package "$PKG1" 2>&1 | tee -a "$LOG" if [ $? -ne 0 ]; then echo -e "\e[1A\e[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs" exit 1 diff --git a/install-scripts/xdph.sh b/install-scripts/xdph.sh index 767abb7..195c4a9 100755 --- a/install-scripts/xdph.sh +++ b/install-scripts/xdph.sh @@ -3,10 +3,17 @@ # XDG-Desktop-Portals for hyprland # xdg=( - xdg-desktop-portal-gtk - xdg-desktop-portal-hyprland + libdrm-dev + libpipewire-0.3-dev + libspa-0.2-dev + libsdbus-c++-dev + libwayland-client0 + wayland-protocols + xdg-desktop-portal-gtk ) +xdph_tag="v1.3.9" + ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" @@ -26,9 +33,37 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_xdph.log" [[ -f "/usr/lib/xdg-desktop-portal-hyprland" ]] && sudo rm "/usr/lib/xdg-desktop-portal-hyprland" # XDG-DESKTOP-PORTAL-HYPRLAND -printf "${NOTE} Installing ${SKY_BLUE}xdg-desktop-portal-hyprland${RESET}\n\n" -for xdgs in "${xdg[@]}"; do - install_package "$xdgs" "$LOG" +printf "${NOTE} Installing ${SKY_BLUE}xdg-desktop-portal-hyprland dependencies${RESET}\n\n" + +for PKG1 in "${xdg[@]}"; do + re_install_package "$PKG1" 2>&1 | tee -a "$LOG" + if [ $? -ne 0 ]; then + echo -e "\e[1A\e[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs" + exit 1 + fi done - + +# Clone, build, and install XDPH +printf "${NOTE} Cloning and Installing ${YELLOW}XDG Desktop Portal Hyprland $hyprland_tag${RESET} ...\n" + +# Check if xdg-desktop-portal-hyprland folder exists and remove it +if [ -d "xdg-desktop-portal-hyprland" ]; then + printf "${NOTE} Removing existing xdg-desktop-portal-hyprland folder...\n" + rm -rf "xdg-desktop-portal-hyprland" 2>&1 | tee -a "$LOG" +fi + +if git clone --recursive -b $xdph_tag "https://github.com/hyprwm/xdg-desktop-portal-hyprland.git"; then + cd "xdg-desktop-portal-hyprland" || exit 1 + make all + if sudo make install 2>&1 | tee -a "$MLOG"; then + printf "${OK} ${MAGENTA}xdph $xdph_tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG" + else + echo -e "${ERROR} Installation failed for ${YELLOW}xdph $xdph_tag${RESET}" 2>&1 | tee -a "$MLOG" + fi + mv $MLOG ../Install-Logs/ || true + cd .. +else + echo -e "${ERROR} Download failed for ${YELLOW}xdph $xdph_tag${RESET}" 2>&1 | tee -a "$LOG" +fi + printf "\n%.0s" {1..2} diff --git a/install.sh b/install.sh index 8c540fc..07991b4 100755 --- a/install.sh +++ b/install.sh @@ -335,8 +335,6 @@ execute_script "hyprlang.sh" sleep 1 execute_script "hyprcursor.sh" sleep 1 -execute_script "hyprutils.sh" -sleep 1 execute_script "hyprwayland-scanner.sh" sleep 1 execute_script "hyprgraphics.sh"