Don Williams 48e4f067d9 Fixed ver mismatch in FF Pinned stable to 53.2 create build dir
Now the code will compile in build directory vs. base directory
Easier to clean up

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   CHANGELOG.md
	modified:   Debian-Hyprland-Install-Upgrade.es.md
	modified:   Debian-Hyprland-Install-Upgrade.md
	modified:   README.md
	modified:   hypr-tags.env
	modified:   install-scripts/Global_functions.sh
	modified:   install-scripts/ags.sh
	modified:   install-scripts/aquamarine.sh
	modified:   install-scripts/hyprcursor.sh
	modified:   install-scripts/hyprgraphics.sh
	modified:   install-scripts/hypridle.sh
	modified:   install-scripts/hyprland-guiutils.sh
	modified:   install-scripts/hyprland-protocols.sh
	modified:   install-scripts/hyprland-qt-support.sh
	modified:   install-scripts/hyprland.sh
	modified:   install-scripts/hyprlang.sh
	modified:   install-scripts/hyprlock.sh
	modified:   install-scripts/hyprpolkitagent.sh
	modified:   install-scripts/hyprtoolkit.sh
	modified:   install-scripts/hyprutils.sh
	modified:   install-scripts/hyprwayland-scanner.sh
	modified:   install-scripts/hyprwire.sh
	modified:   install-scripts/quickshell.sh
	modified:   install-scripts/rofi-wayland.sh
	modified:   install-scripts/wayland-protocols-src.sh
	modified:   install-scripts/xdph.sh
	modified:   install-scripts/xkbcommon.sh
	modified:   refresh-hypr-tags.sh
	modified:   update-hyprland.sh
2026-01-23 16:39:49 -05:00

76 lines
2.5 KiB
Bash
Executable File

#!/bin/bash
# 💫 https://github.com/JaKooLit 💫 #
# XDG-Desktop-Portals for hyprland #
xdg=(
libdrm-dev
libpipewire-0.3-dev
libspa-0.2-dev
libsdbus-c++-dev
libwayland-client0
wayland-protocols
xdg-desktop-portal-gtk
)
#specific branch or release
tag="v1.3.10"
## 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
LOG="Install-Logs/install-$(date +%d-%H%M%S)_xdph.log"
MLOG="install-$(date +%d-%H%M%S)_xdph2.log"
# Check if the file exists and remove it
[[ -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 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 $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 $tag "https://github.com/hyprwm/xdg-desktop-portal-hyprland.git"; then
cd "xdg-desktop-portal-hyprland" || exit 1
BUILD_DIR="$BUILD_ROOT/xdg-desktop-portal-hyprland"
mkdir -p "$BUILD_DIR"
cmake -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib -DCMAKE_INSTALL_PREFIX=/usr -B "$BUILD_DIR"
cmake --build "$BUILD_DIR"
if sudo cmake --install "$BUILD_DIR" 2>&1 | tee -a "$MLOG"; then
printf "${OK} ${MAGENTA}xdph $tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG"
else
echo -e "${ERROR} Installation failed for ${YELLOW}xdph $tag${RESET}" 2>&1 | tee -a "$MLOG"
fi
# Move the additional logs to Install-Logs directory
[ -f "$MLOG" ] && mv "$MLOG" ../Install-Logs/ || true
cd ..
else
echo -e "${ERROR} Download failed for ${YELLOW}xdph $tag${RESET}" 2>&1 | tee -a "$LOG"
fi
printf "\n%.0s" {1..2}