mirror of
https://github.com/JaKooLit/Debian-Hyprland.git
synced 2026-02-05 17:50:14 +01:00
Compare commits
2 Commits
7613ab90e7
...
030198fb6e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
030198fb6e | ||
|
|
5026d63d6c |
@ -1,5 +1,17 @@
|
||||
## CHANGELOGS
|
||||
|
||||
## 02 January 2026
|
||||
|
||||
- Updated:
|
||||
- `update-hyprland.sh` pinned to v0.52.2
|
||||
- Currently only Debian testing and SID branches build v0.53+
|
||||
- Added `--force-update` to refresh the pacakge versions if pinned
|
||||
- This is only for debian testing+ versions
|
||||
- `update-hyprland.sh` added `-/--help`
|
||||
- documentation for updating hyprland
|
||||
- Added: version update to `refresh-tags` and `update-hyprland` script
|
||||
- Fixed: `--force-update` implies `--fetch-latest`
|
||||
|
||||
## 10 December 2025
|
||||
|
||||
- Updated:
|
||||
|
||||
@ -42,6 +42,12 @@ chmod +x ./update-hyprland.sh
|
||||
./update-hyprland.sh --help # Ver todas las opciones
|
||||
```
|
||||
|
||||
Flags clave:
|
||||
- --fetch-latest: obtiene las últimas etiquetas desde GitHub
|
||||
- --force-update: sobrescribe valores fijados en hypr-tags.env (equivalente a FORCE=1)
|
||||
- --dry-run / --install: solo compilar o compilar+instalar
|
||||
- --only / --skip: limitar qué módulos se ejecutan
|
||||
|
||||
#### dry-run-build.sh
|
||||
Herramienta de pruebas que compila componentes sin instalarlos:
|
||||
```bash
|
||||
@ -100,6 +106,9 @@ Ahora, este método automáticamente:
|
||||
```bash
|
||||
# Obtiene últimas versiones de GitHub e instala
|
||||
./update-hyprland.sh --fetch-latest --install
|
||||
|
||||
# Si tu hypr-tags.env tiene valores fijados y deseas sobrescribirlos:
|
||||
./update-hyprland.sh --fetch-latest --force-update --install
|
||||
```
|
||||
|
||||
### Método 4: Instalación con Preset
|
||||
@ -116,8 +125,11 @@ Enlace rápido: [Actualización 0.49/0.50.x → 0.51.1](#actualización-049050x-
|
||||
|
||||
#### Opción A: Descubrimiento Automático
|
||||
```bash
|
||||
# Obtiene las últimas etiquetas e instala
|
||||
# Obtiene las últimas etiquetas e instala (respeta versiones fijadas en hypr-tags.env)
|
||||
./update-hyprland.sh --fetch-latest --install
|
||||
|
||||
# Forzar la actualización de todas las etiquetas (mismo efecto que ejecutar refresh con FORCE=1)
|
||||
./update-hyprland.sh --fetch-latest --force-update --install
|
||||
```
|
||||
|
||||
#### Opción B: Versión Específica
|
||||
@ -254,6 +266,14 @@ find Install-Logs/ -name "*.log" -mtime +30 -delete
|
||||
|
||||
### Gestión de Versiones
|
||||
|
||||
#### Forzar la Actualización de Todas las Etiquetas
|
||||
```bash
|
||||
# Sobrescribe valores fijados en hypr-tags.env con las últimas versiones
|
||||
./update-hyprland.sh --fetch-latest --force-update --dry-run
|
||||
# Instalar si la dry-run es exitosa
|
||||
./update-hyprland.sh --force-update --install
|
||||
```
|
||||
|
||||
#### Copia de Seguridad y Restauración
|
||||
```bash
|
||||
# Las etiquetas se respaldan automáticamente cuando cambian
|
||||
|
||||
@ -42,6 +42,12 @@ chmod +x ./update-hyprland.sh
|
||||
./update-hyprland.sh --help # View all options
|
||||
```
|
||||
|
||||
Key flags:
|
||||
- --fetch-latest: pull latest release tags from GitHub
|
||||
- --force-update: override pinned values in hypr-tags.env (equivalent to FORCE=1)
|
||||
- --dry-run / --install: compile-only or compile+install
|
||||
- --only / --skip: limit which modules run
|
||||
|
||||
#### dry-run-build.sh
|
||||
A testing tool that compiles components without installing:
|
||||
```bash
|
||||
@ -100,6 +106,9 @@ This method now automatically:
|
||||
```bash
|
||||
# Fetch latest GitHub releases and install
|
||||
./update-hyprland.sh --fetch-latest --install
|
||||
|
||||
# If your hypr-tags.env has pinned values and you want to override them:
|
||||
./update-hyprland.sh --fetch-latest --force-update --install
|
||||
```
|
||||
|
||||
### Method 4: Preset-Based Installation
|
||||
@ -116,8 +125,11 @@ Quick link: [Upgrade 0.49/0.50.x → 0.51.1](#upgrade-049050x--0511)
|
||||
|
||||
#### Option A: Automatic Discovery
|
||||
```bash
|
||||
# Fetch latest tags and install
|
||||
# Fetch latest tags and install (respects pins in hypr-tags.env)
|
||||
./update-hyprland.sh --fetch-latest --install
|
||||
|
||||
# Force-override pinned values (same effect as running refresh with FORCE=1)
|
||||
./update-hyprland.sh --fetch-latest --force-update --install
|
||||
```
|
||||
|
||||
#### Option B: Specific Version
|
||||
@ -254,6 +266,14 @@ find Install-Logs/ -name "*.log" -mtime +30 -delete
|
||||
|
||||
### Tag Management
|
||||
|
||||
#### Force Update All Tags
|
||||
```bash
|
||||
# Override pinned values in hypr-tags.env to the latest releases
|
||||
./update-hyprland.sh --fetch-latest --force-update --dry-run
|
||||
# Install if the dry-run succeeds
|
||||
./update-hyprland.sh --force-update --install
|
||||
```
|
||||
|
||||
#### Backup and Restore
|
||||
```bash
|
||||
# Tags are automatically backed up on changes
|
||||
|
||||
34
README.md
34
README.md
@ -72,7 +72,7 @@
|
||||
|
||||
- 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 Trixie or greater. As it needs a newer wayland packages!
|
||||
- Needs a Debian 13 Trixie or greater. As it needs newer wayland packages!
|
||||
- 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
|
||||
@ -90,13 +90,15 @@ sudo nano /etc/apt/sources.list
|
||||
- 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
|
||||
> Note: At this time Debian 13 (Trixie) can't compile v0.52.2+
|
||||
> Debian Testing and SID can
|
||||
- You do not have to re-install everything, but re-running `install.sh` works also
|
||||
- Instructions are available in English and Spanish
|
||||
|
||||
#### ✨ Some notes on this installer / Prerequisites
|
||||
|
||||
- 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
|
||||
- 🕯️ 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
|
||||
|
||||
### 🚩 changing login manager to SDDM
|
||||
|
||||
@ -116,20 +118,28 @@ sudo apt install --no-install-recommends -y sddm
|
||||
- If you opted to install SDDM theme, here's the [LINK](https://github.com/JaKooLit/simple-sddm-2) which is a modified fork of [LINK](https://github.com/Keyitdev/sddm-astronaut-theme)
|
||||
- If you opted to install GTK Themes, Icons, here's the [LINK](https://github.com/JaKooLit/GTK-themes-icons). This also includes Bibata Modern Ice cursor.
|
||||
|
||||
#### 🔔 NOTICE TO NVIDIA OWNERS ###
|
||||
#### 🔔 NOTICE TO NVIDIA OWNERS
|
||||
|
||||
- By default it is installing the latest and newest **proprietary** NVIDIA drivers. If you have an older NVIDIA GPU (GTX 800 series and older), check out nvidia-debian website [LINK](https://wiki.debian.org/NvidiaGraphicsDrivers) and edit nvidia.sh in install-scripts directory to install proper gpu driver
|
||||
- If you have NVIDIA, and wanted to use proprietary drivers, uninstall nouveau first (if installed).
|
||||
- This script will install proprietary NVIDIA and will not deal with removal of nouveau.
|
||||
|
||||
## > NOTE: If you have new NVIDIA GPUs, RTX5000+ then do **NOT** install these drivers!! Newer GPUs require the open drivers
|
||||
|
||||
> Install those first, before installing Hyprland
|
||||
|
||||
- By default it is installing the latest and newest nvidia drivers. If you have an older nvidia-gpu (GTX 800 series and older), check out nvidia-debian website [LINK](https://wiki.debian.org/NvidiaGraphicsDrivers) and edit nvidia.sh in install-scripts directory to install proper gpu driver
|
||||
- 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)
|
||||
|
||||
> [!IMPORTANT]
|
||||
> If you wish to use the nouveau driver (installed by default in Debian), be sure to not select "Nvidia" in the installation options.
|
||||
> If you wish to use the nouveau driver (installed by default in Debian), be sure to not select "NVIDIA" in the installation options.
|
||||
> See note above about new NVIDIA GPUs.
|
||||
|
||||
> If you select this option, the NVIDIA installer part will attempt to blacklist nouveau; while Hyprland will still be installed, it will skip blacklisting nouveau if you don't select the NVIDIA option.
|
||||
|
||||
## ✨ Auto clone and install
|
||||
>
|
||||
|
||||
> [!CAUTION]
|
||||
> If you are using FISH SHELL, DO NOT use this function. Clone and run 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
|
||||
@ -139,6 +149,7 @@ sh <(curl -L https://raw.githubusercontent.com/JaKooLit/Debian-Hyprland/main/aut
|
||||
```
|
||||
|
||||
## ✨ to use this script
|
||||
|
||||
clone this repo, change directory, make executable and run the script:
|
||||
|
||||
```bash
|
||||
@ -178,11 +189,11 @@ chmod +x install.sh
|
||||
|
||||
**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.
|
||||
- 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 Hyprland Dots UPDATING NOTES***
|
||||
## 🛎 **_DEBIAN Hyprland Dots UPDATING NOTES_**
|
||||
|
||||
- With this new update to Debian-Hyprland the current Hyprland-Dots are now compatible with Debian. This applies only to Debian, not ubuntu.
|
||||
- With this new update to Debian-Hyprland the current Hyprland-Dots are now compatible with Debian.
|
||||
|
||||
> [!NOTE]
|
||||
> This script does not setup audio. Kindly set up. If you have not, I recommend pipewire. `sudo apt install -y pipewire`
|
||||
@ -298,6 +309,7 @@ or
|
||||
[](https://www.buymeacoffee.com/JaKooLit)
|
||||
|
||||
Or you can donate cryto on my btc wallet :)
|
||||
|
||||
> 1N3MeV2dsX6gQB42HXU6MF2hAix1mqjo8i
|
||||
|
||||

|
||||
|
||||
@ -134,11 +134,16 @@ done
|
||||
|
||||
# Summary
|
||||
{
|
||||
echo "\nSummary (dry-run):"
|
||||
printf "\nSummary (dry-run):\n"
|
||||
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"
|
||||
# Show current tag values to make changes visible during dry-runs
|
||||
if [[ -f "$REPO_ROOT/hypr-tags.env" ]]; then
|
||||
printf "\nCurrent versions (from %s):\n" "$REPO_ROOT/hypr-tags.env"
|
||||
grep -E '^[A-Z0-9_]+=' "$REPO_ROOT/hypr-tags.env" | sort
|
||||
fi
|
||||
printf "\nLogs: individual module logs are under Install-Logs/. This summary: %s\n" "$SUMMARY_LOG"
|
||||
} | tee -a "$SUMMARY_LOG"
|
||||
|
||||
# Exit non-zero if any FAIL occurred
|
||||
|
||||
13
hypr-tags.env-v.053
Normal file
13
hypr-tags.env-v.053
Normal file
@ -0,0 +1,13 @@
|
||||
AQUAMARINE_TAG=v0.10.0
|
||||
HYPRGRAPHICS_TAG=v0.5.0
|
||||
HYPRLAND_GUIUTILS_TAG=v0.2.0
|
||||
HYPRLAND_PROTOCOLS_TAG=v0.7.0
|
||||
HYPRLAND_QT_SUPPORT_TAG=v0.1.0
|
||||
HYPRLAND_QTUTILS_TAG=v0.1.5
|
||||
HYPRLAND_TAG=v0.53.0
|
||||
HYPRLANG_TAG=v0.6.7
|
||||
HYPRTOOLKIT_TAG=v0.4.1
|
||||
HYPRUTILS_TAG=v0.11.0
|
||||
HYPRWAYLAND_SCANNER_TAG=v0.4.5
|
||||
HYPRWIRE_TAG=v0.2.1
|
||||
WAYLAND_PROTOCOLS_TAG=1.46
|
||||
@ -115,6 +115,7 @@ hyprland_dep=(
|
||||
libjpeg-dev
|
||||
libjxl-dev
|
||||
libmagic-dev
|
||||
libmuparser-dev
|
||||
libpixman-1-dev
|
||||
libpugixml-dev
|
||||
libre2-dev
|
||||
|
||||
@ -6,6 +6,11 @@
|
||||
|
||||
#specific branch or release
|
||||
tag="v0.10.0"
|
||||
# Auto-source centralized tags if env is unset
|
||||
if [ -z "${AQUAMARINE_TAG:-}" ]; then
|
||||
TAGS_FILE="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/hypr-tags.env"
|
||||
[ -f "$TAGS_FILE" ] && source "$TAGS_FILE"
|
||||
fi
|
||||
# Allow environment override
|
||||
if [ -n "${AQUAMARINE_TAG:-}" ]; then tag="$AQUAMARINE_TAG"; fi
|
||||
|
||||
@ -43,7 +48,7 @@ fi
|
||||
|
||||
# Clone and build
|
||||
printf "${INFO} Installing ${YELLOW}aquamarine $tag${RESET} ...\n"
|
||||
if git clone --recursive -b $tag https://github.com/hyprwm/aquamarine.git; then
|
||||
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/local -S . -B ./build
|
||||
cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`
|
||||
|
||||
0
install-scripts/dotfiles-branch.sh
Normal file → Executable file
0
install-scripts/dotfiles-branch.sh
Normal file → Executable file
@ -10,6 +10,12 @@ librsvg2-dev
|
||||
|
||||
#specific branch or release
|
||||
tag="v0.1.13"
|
||||
# Auto-source centralized tags if env is unset; allow override via HYPRCURSOR_TAG if present
|
||||
if [ -z "${HYPRCURSOR_TAG:-}" ]; then
|
||||
TAGS_FILE="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/hypr-tags.env"
|
||||
[ -f "$TAGS_FILE" ] && source "$TAGS_FILE"
|
||||
fi
|
||||
if [ -n "${HYPRCURSOR_TAG:-}" ]; then tag="$HYPRCURSOR_TAG"; 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 )"
|
||||
|
||||
@ -9,6 +9,11 @@ hyprgraphics=(
|
||||
|
||||
#specific branch or release
|
||||
tag="v0.4.0"
|
||||
# Auto-source centralized tags if env is unset
|
||||
if [ -z "${HYPRGRAPHICS_TAG:-}" ]; then
|
||||
TAGS_FILE="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/hypr-tags.env"
|
||||
[ -f "$TAGS_FILE" ] && source "$TAGS_FILE"
|
||||
fi
|
||||
# Allow environment override
|
||||
if [ -n "${HYPRGRAPHICS_TAG:-}" ]; then tag="$HYPRGRAPHICS_TAG"; fi
|
||||
|
||||
|
||||
@ -18,6 +18,11 @@ guiutils=(
|
||||
|
||||
#specific branch or release
|
||||
tag="v0.2.0"
|
||||
# Auto-source centralized tags if env is unset
|
||||
if [ -z "${HYPRLAND_GUIUTILS_TAG:-}" ]; then
|
||||
TAGS_FILE="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/hypr-tags.env"
|
||||
[ -f "$TAGS_FILE" ] && source "$TAGS_FILE"
|
||||
fi
|
||||
# Allow environment override
|
||||
if [ -n "${HYPRLAND_GUIUTILS_TAG:-}" ]; then tag="$HYPRLAND_GUIUTILS_TAG"; fi
|
||||
|
||||
|
||||
@ -6,6 +6,11 @@
|
||||
|
||||
#specific branch or release
|
||||
tag="v0.7.0"
|
||||
# Auto-source centralized tags if env is unset
|
||||
if [ -z "${HYPRLAND_PROTOCOLS_TAG:-}" ]; then
|
||||
TAGS_FILE="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/hypr-tags.env"
|
||||
[ -f "$TAGS_FILE" ] && source "$TAGS_FILE"
|
||||
fi
|
||||
# Allow environment override
|
||||
if [ -n "${HYPRLAND_PROTOCOLS_TAG:-}" ]; then tag="$HYPRLAND_PROTOCOLS_TAG"; fi
|
||||
|
||||
|
||||
@ -16,6 +16,11 @@ qt_support=(
|
||||
|
||||
#specific branch or release
|
||||
tag="v0.1.0"
|
||||
# Auto-source centralized tags if env is unset
|
||||
if [ -z "${HYPRLAND_QT_SUPPORT_TAG:-}" ]; then
|
||||
TAGS_FILE="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/hypr-tags.env"
|
||||
[ -f "$TAGS_FILE" ] && source "$TAGS_FILE"
|
||||
fi
|
||||
# Allow environment override
|
||||
if [ -n "${HYPRLAND_QT_SUPPORT_TAG:-}" ]; then tag="$HYPRLAND_QT_SUPPORT_TAG"; fi
|
||||
|
||||
|
||||
@ -3,7 +3,12 @@
|
||||
# Main Hyprland Package#
|
||||
|
||||
#specific branch or release
|
||||
tag="v0.52.2"
|
||||
tag="v0.53.0"
|
||||
# Auto-source centralized tags if env is unset
|
||||
if [ -z "${HYPRLAND_TAG:-}" ]; then
|
||||
TAGS_FILE="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/hypr-tags.env"
|
||||
[ -f "$TAGS_FILE" ] && source "$TAGS_FILE"
|
||||
fi
|
||||
# Allow environment override
|
||||
if [ -n "${HYPRLAND_TAG:-}" ]; then tag="$HYPRLAND_TAG"; fi
|
||||
|
||||
@ -22,11 +27,12 @@ hyprland=(
|
||||
libglaze-dev
|
||||
libudis86-dev
|
||||
libinotify-ocaml-dev
|
||||
libmuparser-dev
|
||||
)
|
||||
|
||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||
# Determine the directory where the script is located
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
# Change the working directory to the parent directory of the script
|
||||
PARENT_DIR="$SCRIPT_DIR/.."
|
||||
@ -62,7 +68,6 @@ if [ ! -d /usr/include/glaze ]; then
|
||||
echo "${INFO} ${YELLOW}libglaze-dev from assets${RESET} installed."
|
||||
fi
|
||||
|
||||
|
||||
printf "\n%.0s" {1..1}
|
||||
|
||||
# Clone, build, and install Hyprland using Cmake
|
||||
@ -76,25 +81,76 @@ fi
|
||||
|
||||
if git clone --recursive -b $tag "https://github.com/hyprwm/Hyprland"; then
|
||||
cd "Hyprland" || exit 1
|
||||
|
||||
# Compatibility shim for toolchains without std::vector::{insert_range,append_range}
|
||||
RANGE_HDR="$(pwd)/hypr_range_compat.hpp"
|
||||
cat >"$RANGE_HDR" <<'EOF'
|
||||
#pragma once
|
||||
#include <iterator>
|
||||
#include <ranges>
|
||||
// insert at end using a range
|
||||
#define INSERT_RANGE(vec, ...) (vec).insert((vec).end(), std::ranges::begin(__VA_ARGS__), std::ranges::end(__VA_ARGS__))
|
||||
// insert at explicit position using a range
|
||||
#define INSERT_RANGE_AT(vec, pos, ...) (vec).insert((vec).end() == (pos) ? (vec).end() : (pos), std::ranges::begin(__VA_ARGS__), std::ranges::end(__VA_ARGS__))
|
||||
// append_range compatibility for containers expecting begin/end
|
||||
#define APPEND_RANGE(vec, ...) (vec).insert((vec).end(), std::begin(__VA_ARGS__), std::end(__VA_ARGS__))
|
||||
EOF
|
||||
# Rewrite calls:
|
||||
# x.insert_range(pos, rng) -> INSERT_RANGE_AT(x, pos, rng)
|
||||
# x.insert_range(rng) -> INSERT_RANGE(x, rng)
|
||||
# x.append_range(rng) -> APPEND_RANGE(x, rng)
|
||||
PATCH_FILES=$(grep -REIl --exclude-dir=.git '\.\s*(insert_range|append_range)\s*\(' . || true)
|
||||
if [ -n "$PATCH_FILES" ]; then
|
||||
# Two-arg form first (pos, rng)
|
||||
perl -0777 -pi -e 's/([A-Za-z_][[:alnum:]_:.>\-]*?)\s*\.\s*insert_range\s*\(\s*([^,]+?)\s*,\s*/INSERT_RANGE_AT($1, $2, /gs' $PATCH_FILES
|
||||
# One-arg form (rng only)
|
||||
perl -0777 -pi -e 's/([A-Za-z_][[:alnum:]_:.>\-]*?)\s*\.\s*insert_range\s*\(/INSERT_RANGE($1, /gs' $PATCH_FILES
|
||||
# append_range
|
||||
perl -0777 -pi -e 's/([A-Za-z_][[:alnum:]_:.>\-]*?)\s*\.\s*append_range\s*\(/APPEND_RANGE($1, /gs' $PATCH_FILES
|
||||
fi
|
||||
|
||||
# Replace #embed with an autogenerated bytes include for toolchains lacking it
|
||||
EX_CONF="$(pwd)/example/hyprland.conf"
|
||||
EMBED_INC="$(pwd)/src/config/defaultConfig.bytes.inc"
|
||||
if [ -f "$EX_CONF" ]; then
|
||||
xxd -i -g 1 -c 16 "$EX_CONF" | sed -n '/^{/{flag=1;next} /};/{flag=0} flag p' >"$EMBED_INC" || true
|
||||
# Swap the directive in the header to include the generated bytes
|
||||
sed -ri 's|^\s*#embed\s+"\.{0,2}/\.{0,2}/example/hyprland\.conf"\s*$|#include "defaultConfig.bytes.inc"|g' src/config/defaultConfig.hpp || true
|
||||
fi
|
||||
|
||||
# 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
|
||||
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
|
||||
# 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:-1}
|
||||
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:-}"
|
||||
SYSTEM_FLAGS=("-DUSE_SYSTEM_HYPRUTILS=ON" "-DUSE_SYSTEM_HYPRLANG=ON")
|
||||
SYSTEM_FLAGS=(
|
||||
"-DUSE_SYSTEM_HYPRUTILS=ON"
|
||||
"-DUSE_SYSTEM_HYPRLANG=ON"
|
||||
"-DUSE_SYSTEM_HYPRWIRE=ON"
|
||||
)
|
||||
# Optional preflight: verify hyprwire is discoverable by CMake/pkg-config
|
||||
if [ ! -e "/usr/local/lib/cmake/Hyprwire/HyprwireConfig.cmake" ] && ! pkg-config --exists hyprwire 2>/dev/null; then
|
||||
echo "${NOTE} hyprwire not detected in /usr/local yet. Ensure install-scripts/hyprwire.sh ran successfully or set USE_SYSTEM_HYPRLIBS=0 to use subprojects."
|
||||
fi
|
||||
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")
|
||||
SYSTEM_FLAGS=(
|
||||
"-DUSE_SYSTEM_HYPRUTILS=OFF"
|
||||
"-DUSE_SYSTEM_HYPRLANG=OFF"
|
||||
"-DUSE_SYSTEM_HYPRWIRE=OFF"
|
||||
"-DBUILD_HYPRCTL=OFF"
|
||||
"-DINSTALL_HYPRCTL=OFF"
|
||||
)
|
||||
fi
|
||||
|
||||
# Make sure submodules are present when building bundled deps
|
||||
@ -107,9 +163,10 @@ USE_SYSTEM=${USE_SYSTEM_HYPRLIBS:-1}
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DCMAKE_C_COMPILER="${CC}"
|
||||
-DCMAKE_CXX_COMPILER="${CXX}"
|
||||
-DCMAKE_CXX_STANDARD=26
|
||||
-DCMAKE_CXX_STANDARD=23
|
||||
-DCMAKE_CXX_STANDARD_REQUIRED=ON
|
||||
-DCMAKE_CXX_EXTENSIONS=ON
|
||||
-DCMAKE_CXX_FLAGS="-Wno-unknown-warning-option -include ${RANGE_HDR}"
|
||||
"${SYSTEM_FLAGS[@]}"
|
||||
)
|
||||
cmake -S . -B build "${CONFIG_FLAGS[@]}"
|
||||
|
||||
@ -6,6 +6,11 @@
|
||||
|
||||
#specific branch or release
|
||||
tag="v0.6.7"
|
||||
# Auto-source centralized tags if env is unset
|
||||
if [ -z "${HYPRLANG_TAG:-}" ]; then
|
||||
TAGS_FILE="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/hypr-tags.env"
|
||||
[ -f "$TAGS_FILE" ] && source "$TAGS_FILE"
|
||||
fi
|
||||
# Allow environment override
|
||||
if [ -n "${HYPRLANG_TAG:-}" ]; then tag="$HYPRLANG_TAG"; fi
|
||||
|
||||
|
||||
@ -5,6 +5,11 @@
|
||||
|
||||
#specific branch or release
|
||||
tag="v0.4.1"
|
||||
# Auto-source centralized tags if env is unset
|
||||
if [ -z "${HYPRTOOLKIT_TAG:-}" ]; then
|
||||
TAGS_FILE="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/hypr-tags.env"
|
||||
[ -f "$TAGS_FILE" ] && source "$TAGS_FILE"
|
||||
fi
|
||||
# Allow environment override
|
||||
if [ -n "${HYPRTOOLKIT_TAG:-}" ]; then tag="$HYPRTOOLKIT_TAG"; fi
|
||||
|
||||
|
||||
@ -4,7 +4,12 @@
|
||||
# hyprutils #
|
||||
|
||||
#specific branch or release
|
||||
tag="v0.10.4"
|
||||
tag="v0.11.0"
|
||||
# Auto-source centralized tags if env is unset
|
||||
if [ -z "${HYPRUTILS_TAG:-}" ]; then
|
||||
TAGS_FILE="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/hypr-tags.env"
|
||||
[ -f "$TAGS_FILE" ] && source "$TAGS_FILE"
|
||||
fi
|
||||
# Allow environment override
|
||||
if [ -n "${HYPRUTILS_TAG:-}" ]; then tag="$HYPRUTILS_TAG"; fi
|
||||
|
||||
@ -16,11 +21,14 @@ if [ "$1" = "--dry-run" ] || [ "${DRY_RUN}" = "1" ] || [ "${DRY_RUN}" = "true" ]
|
||||
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 )"
|
||||
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; }
|
||||
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
|
||||
@ -44,7 +52,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/local -S . -B ./build
|
||||
cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf _NPROCESSORS_CONF`
|
||||
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
|
||||
printf "${OK} hyprutils installed successfully.\n" 2>&1 | tee -a "$MLOG"
|
||||
@ -61,5 +69,3 @@ else
|
||||
fi
|
||||
|
||||
printf "\n%.0s" {1..2}
|
||||
|
||||
|
||||
|
||||
@ -9,6 +9,11 @@ scan_depend=(
|
||||
|
||||
#specific branch or release
|
||||
tag="v0.4.5"
|
||||
# Auto-source centralized tags if env is unset
|
||||
if [ -z "${HYPRWAYLAND_SCANNER_TAG:-}" ]; then
|
||||
TAGS_FILE="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/hypr-tags.env"
|
||||
[ -f "$TAGS_FILE" ] && source "$TAGS_FILE"
|
||||
fi
|
||||
# Allow environment override
|
||||
if [ -n "${HYPRWAYLAND_SCANNER_TAG:-}" ]; then tag="$HYPRWAYLAND_SCANNER_TAG"; fi
|
||||
|
||||
|
||||
91
install-scripts/hyprwire.sh
Executable file
91
install-scripts/hyprwire.sh
Executable file
@ -0,0 +1,91 @@
|
||||
#!/bin/bash
|
||||
# 💫 https://github.com/JaKooLit 💫 #
|
||||
# Hypr Ecosystem
|
||||
# hyprwire
|
||||
|
||||
# Specific branch or release (honor env override)
|
||||
tag="v0.1.0"
|
||||
# Auto-source centralized tags if env is unset
|
||||
if [ -z "${HYPRWIRE_TAG:-}" ]; then
|
||||
TAGS_FILE="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/hypr-tags.env"
|
||||
[ -f "$TAGS_FILE" ] && source "$TAGS_FILE"
|
||||
fi
|
||||
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
|
||||
|
||||
# Temporary compatibility shim for compilers/libstdc++ without std::vector::append_range
|
||||
cat > append_range_compat.hpp <<'EOF'
|
||||
#pragma once
|
||||
#include <iterator>
|
||||
#define APPEND_RANGE(vec, ...) (vec).insert((vec).end(), std::begin(__VA_ARGS__), std::end(__VA_ARGS__))
|
||||
EOF
|
||||
# Replace X.append_range(Y) -> APPEND_RANGE(X, Y) only where it appears
|
||||
PATCH_FILES=$(grep -RIl --exclude-dir=.git 'append_range\(' . || true)
|
||||
if [ -n "$PATCH_FILES" ]; then
|
||||
# Replace LHS .append_range(arg...) with APPEND_RANGE(LHS, arg...)
|
||||
# LHS: identifiers and common member/ptr chains (this->obj, ns::obj.member)
|
||||
echo "$PATCH_FILES" | xargs -r sed -ri 's/([A-Za-z_][A-Za-z0-9_:\->\.]+)\s*\.\s*append_range\s*\(/APPEND_RANGE(\1, /g'
|
||||
# Show any remaining occurrences
|
||||
REMAIN=$(grep -RIn --exclude-dir=.git '\.\s*append_range\s*\(' $PATCH_FILES || true)
|
||||
if [ -n "$REMAIN" ]; then
|
||||
echo "[WARN] Some append_range() calls remain unpatched:" >&2
|
||||
echo "$REMAIN" >&2
|
||||
fi
|
||||
fi
|
||||
|
||||
# Absolute path for forced include
|
||||
APPEND_HDR="$(pwd)/append_range_compat.hpp"
|
||||
|
||||
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_CXX_STANDARD=23 -DCMAKE_CXX_FLAGS="-include ${APPEND_HDR}"
|
||||
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}
|
||||
266
install-scripts/quickshell.sh
Executable file
266
install-scripts/quickshell.sh
Executable file
@ -0,0 +1,266 @@
|
||||
#!/bin/bash
|
||||
# 💫 https://github.com/JaKooLit 💫 #
|
||||
# Quickshell (QtQuick-based shell toolkit) - Debian builder
|
||||
|
||||
set -Eeuo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
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
|
||||
|
||||
# Prefer /usr/local for pkg-config and CMake (for locally built libs like Breakpad)
|
||||
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:${PKG_CONFIG_PATH:-}"
|
||||
export CMAKE_PREFIX_PATH="/usr/local:${CMAKE_PREFIX_PATH:-}"
|
||||
|
||||
# Ensure logs dir exists at repo root (we cd into source later)
|
||||
mkdir -p "$PARENT_DIR/Install-Logs"
|
||||
|
||||
LOG="$PARENT_DIR/Install-Logs/install-$(date +%d-%H%M%S)_quickshell.log"
|
||||
MLOG="$PARENT_DIR/Install-Logs/install-$(date +%d-%H%M%S)_quickshell_build.log"
|
||||
|
||||
# Debian Trixie guard: Quickshell not compatible on Trixie at this time
|
||||
if grep -Eiq '\bVERSION_CODENAME=trixie\b' /etc/os-release; then
|
||||
echo "[INFO] debian Trixie not compatible with quickshell. Skipping quickshell install." | tee -a "$LOG"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Refresh sudo credentials once (install_package uses sudo internally)
|
||||
if command -v sudo >/dev/null 2>&1; then
|
||||
sudo -v 2>/dev/null || sudo -v
|
||||
fi
|
||||
|
||||
note() { echo -e "${NOTE} $*" | tee -a "$LOG"; }
|
||||
info() { echo -e "${INFO} $*" | tee -a "$LOG"; }
|
||||
|
||||
# Build-time and runtime deps per upstream BUILD.md (Qt 6.6+)
|
||||
# Some may already be present from 00-dependencies.sh
|
||||
DEPS=(
|
||||
build-essential
|
||||
git
|
||||
autoconf
|
||||
automake
|
||||
libtool
|
||||
zlib1g-dev
|
||||
libcurl4-openssl-dev
|
||||
cmake
|
||||
ninja-build
|
||||
pkg-config
|
||||
spirv-tools
|
||||
qt6-base-dev
|
||||
qt6-declarative-dev
|
||||
qt6-shadertools-dev
|
||||
qt6-tools-dev
|
||||
qt6-tools-dev-tools
|
||||
qt6-declarative-private-dev
|
||||
# Wayland + protocols
|
||||
libwayland-dev
|
||||
wayland-protocols
|
||||
# Screencopy/GBM/DRM
|
||||
libdrm-dev
|
||||
libgbm-dev
|
||||
# Optional integrations enabled by default
|
||||
libpipewire-0.3-dev
|
||||
libpam0g-dev
|
||||
libglib2.0-dev
|
||||
libpolkit-gobject-1-dev
|
||||
libpolkit-agent-1-dev
|
||||
libjemalloc-dev
|
||||
# X11 (optional but harmless)
|
||||
libxcb1-dev
|
||||
# SVG support (package name differs across releases; try both)
|
||||
qt6-svg-dev
|
||||
libqt6svg6-dev
|
||||
# Third-party libs used by Quickshell
|
||||
libcli11-dev
|
||||
# Qt Quick runtime QML modules required at runtime (RectangularShadow, etc.)
|
||||
qml6-module-qtquick-effects
|
||||
qml6-module-qtquick-shapes
|
||||
qml6-module-qtquick-controls
|
||||
qml6-module-qtquick-layouts
|
||||
qml6-module-qt5compat-graphicaleffects
|
||||
)
|
||||
|
||||
printf "\n%s - Installing ${SKY_BLUE}Quickshell build dependencies${RESET}....\n" "${NOTE}"
|
||||
# Single apt transaction for speed and robustness, but filter packages with no candidate
|
||||
sudo apt update 2>&1 | tee -a "$LOG"
|
||||
AVAILABLE_PKGS=()
|
||||
for PKG in "${DEPS[@]}"; do
|
||||
CAND=$(apt-cache policy "$PKG" | awk '/Candidate:/ {print $2}')
|
||||
if [ -n "$CAND" ] && [ "$CAND" != "(none)" ]; then
|
||||
AVAILABLE_PKGS+=("$PKG")
|
||||
else
|
||||
note "Skipping $PKG (no candidate in APT)"
|
||||
fi
|
||||
done
|
||||
if ! sudo apt install -y "${AVAILABLE_PKGS[@]}" 2>&1 | tee -a "$LOG"; then
|
||||
echo "${ERROR} apt failed when installing Quickshell build dependencies." | tee -a "$LOG"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Validate critical tools
|
||||
for bin in cmake ninja pkg-config; do
|
||||
if ! command -v "$bin" >/dev/null 2>&1; then
|
||||
echo "${ERROR} Required tool '$bin' not found after apt install." | tee -a "$LOG"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# Build Google Breakpad from source if pkg-config 'breakpad' is missing
|
||||
if ! pkg-config --exists breakpad; then
|
||||
note "Building Google Breakpad from source..."
|
||||
BP_DIR="$PARENT_DIR/.thirdparty/breakpad"
|
||||
rm -rf "$BP_DIR"
|
||||
mkdir -p "$BP_DIR"
|
||||
(
|
||||
set -Eeuo pipefail
|
||||
cd "$BP_DIR"
|
||||
# Clone Breakpad into the root of BP_DIR (expected layout: ./src)
|
||||
git clone --depth=1 https://chromium.googlesource.com/breakpad/breakpad . 2>&1 | tee -a "$MLOG"
|
||||
# lss must live at src/third_party/lss relative to Breakpad root
|
||||
git clone --depth=1 https://chromium.googlesource.com/linux-syscall-support src/third_party/lss 2>&1 | tee -a "$MLOG" || true
|
||||
# Autotools bootstrap if needed (at Breakpad root)
|
||||
if [ ! -x ./configure ]; then
|
||||
autoreconf -fi 2>&1 | tee -a "$MLOG"
|
||||
fi
|
||||
./configure --prefix=/usr/local 2>&1 | tee -a "$MLOG"
|
||||
make -j "$(nproc 2>/dev/null || getconf _NPROCESSORS_ONLN)" 2>&1 | tee -a "$MLOG"
|
||||
sudo make install 2>&1 | tee -a "$MLOG"
|
||||
) || { echo "${ERROR} Breakpad build failed." | tee -a "$LOG"; exit 1; }
|
||||
|
||||
# Provide pkg-config file if upstream didn't install one under the name 'breakpad'
|
||||
if ! pkg-config --exists breakpad; then
|
||||
if pkg-config --exists breakpad-client; then
|
||||
sudo mkdir -p /usr/local/lib/pkgconfig
|
||||
sudo ln -sf /usr/local/lib/pkgconfig/breakpad-client.pc /usr/local/lib/pkgconfig/breakpad.pc
|
||||
elif [ -f /usr/local/lib/libbreakpad_client.a ] || [ -f /usr/local/lib/libbreakpad_client.so ]; then
|
||||
TMP_PC="/tmp/breakpad.pc.$$"
|
||||
cat >"$TMP_PC" <<'PCEOF'
|
||||
prefix=/usr/local
|
||||
exec_prefix=${prefix}
|
||||
includedir=${prefix}/include
|
||||
libdir=${exec_prefix}/lib
|
||||
Name: breakpad
|
||||
Description: Google Breakpad client library
|
||||
Version: 0
|
||||
Libs: -L${libdir} -lbreakpad_client
|
||||
Cflags: -I${includedir}
|
||||
PCEOF
|
||||
sudo mkdir -p /usr/local/lib/pkgconfig
|
||||
sudo mv "$TMP_PC" /usr/local/lib/pkgconfig/breakpad.pc
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! pkg-config --exists breakpad; then
|
||||
echo "${ERROR} breakpad pkg-config entry not found after installation." | tee -a "$LOG"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Clone source (prefer upstream forgejo; mirror available at github:quickshell-mirror/quickshell)
|
||||
SRC_DIR="quickshell-src"
|
||||
if [ -d "$SRC_DIR" ]; then
|
||||
note "Removing existing $SRC_DIR"
|
||||
rm -rf "$SRC_DIR"
|
||||
fi
|
||||
|
||||
note "Cloning Quickshell source..."
|
||||
if git clone --depth=1 https://git.outfoxxed.me/quickshell/quickshell "$SRC_DIR" 2>&1 | tee -a "$LOG"; then
|
||||
cd "$SRC_DIR"
|
||||
else
|
||||
echo "${ERROR} Failed to clone Quickshell repo" | tee -a "$LOG"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Configure with Ninja; enable RelWithDebInfo, leave features ON (deps installed above)
|
||||
CMAKE_FLAGS=(
|
||||
-GNinja
|
||||
-B build
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
-DDISTRIBUTOR="Debian-Hyprland installer"
|
||||
)
|
||||
|
||||
note "Configuring Quickshell (CMake)..."
|
||||
# Use explicit source/build dirs and preserve cmake exit code with pipefail
|
||||
if ! cmake -S . -B build "${CMAKE_FLAGS[@]}" 2>&1 | tee -a "$MLOG"; then
|
||||
echo "${ERROR} CMake configure failed. See log: $MLOG" | tee -a "$LOG"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Ensure build files exist before invoking ninja
|
||||
if [ ! -f build/build.ninja ]; then
|
||||
echo "${ERROR} build/build.ninja not generated; aborting build." | tee -a "$LOG"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
note "Building Quickshell (Ninja)..."
|
||||
if ! cmake --build build 2>&1 | tee -a "$MLOG"; then
|
||||
echo "${ERROR} Build failed. See log: $MLOG" | tee -a "$LOG"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
note "Installing Quickshell..."
|
||||
if ! sudo cmake --install build 2>&1 | tee -a "$MLOG"; then
|
||||
echo "${ERROR} Installation failed. See log: $MLOG" | tee -a "$LOG"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "${OK} Quickshell installed successfully." | tee -a "$MLOG"
|
||||
|
||||
# Provide a shim for missing QtQuick.Effects.RectangularShadow (wraps MultiEffect)
|
||||
OVR_DIR=/usr/local/share/quickshell-overrides/QtQuick/Effects
|
||||
sudo install -d -m 755 "$OVR_DIR"
|
||||
sudo tee "$OVR_DIR/RectangularShadow.qml" >/dev/null <<'QML'
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
|
||||
Item {
|
||||
id: root
|
||||
// Minimal RectangularShadow shim using MultiEffect
|
||||
// Map common properties used by configs
|
||||
property alias source: fx.source
|
||||
property color color: "#000000"
|
||||
property real opacity: 0.4
|
||||
property real blur: 32
|
||||
property real xOffset: 0
|
||||
property real yOffset: 6
|
||||
property real scale: 1.0
|
||||
|
||||
MultiEffect {
|
||||
id: fx
|
||||
anchors.fill: parent
|
||||
shadowEnabled: true
|
||||
shadowColor: root.color
|
||||
shadowOpacity: root.opacity
|
||||
shadowBlur: root.blur
|
||||
shadowHorizontalOffset: root.xOffset
|
||||
shadowVerticalOffset: root.yOffset
|
||||
shadowScale: root.scale
|
||||
}
|
||||
}
|
||||
QML
|
||||
|
||||
# Install a wrapper to run Quickshell with system QML imports (avoids Nix/Flatpak overrides)
|
||||
WRAP=/usr/local/bin/qs-system
|
||||
sudo tee "$WRAP" >/dev/null <<'EOSH'
|
||||
#!/usr/bin/env bash
|
||||
# Run Quickshell preferring system Qt6 QML modules and overrides
|
||||
OVR=/usr/local/share/quickshell-overrides
|
||||
export QML_IMPORT_PATH="$OVR${QML_IMPORT_PATH:+:$QML_IMPORT_PATH}"
|
||||
export QML2_IMPORT_PATH="$OVR${QML2_IMPORT_PATH:+:$QML2_IMPORT_PATH}"
|
||||
exec qs "$@"
|
||||
EOSH
|
||||
sudo chmod +x "$WRAP" || true
|
||||
|
||||
# Build logs already written to $PARENT_DIR/Install-Logs
|
||||
# Keep source directory for reference in case user wants to rebuild later
|
||||
|
||||
printf "\n%.0s" {1..1}
|
||||
5
install-scripts/wayland-protocols-src.sh
Normal file → Executable file
5
install-scripts/wayland-protocols-src.sh
Normal file → Executable file
@ -5,6 +5,11 @@
|
||||
|
||||
#specific tag or release (e.g., 1.45, 1.46)
|
||||
tag="1.45"
|
||||
# Auto-source centralized tags if env is unset
|
||||
if [ -z "${WAYLAND_PROTOCOLS_TAG:-}" ]; then
|
||||
TAGS_FILE="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/hypr-tags.env"
|
||||
[ -f "$TAGS_FILE" ] && source "$TAGS_FILE"
|
||||
fi
|
||||
# Allow environment override
|
||||
if [ -n "${WAYLAND_PROTOCOLS_TAG:-}" ]; then tag="$WAYLAND_PROTOCOLS_TAG"; fi
|
||||
|
||||
|
||||
233
install.sh
233
install.sh
@ -1,6 +1,10 @@
|
||||
#!/bin/bash
|
||||
# https://github.com/JaKooLit
|
||||
|
||||
# Source location for pre-built Debian packages (can be local or network share)
|
||||
# Set this variable to the path containing .deb files, or leave empty to build from source
|
||||
DEB_PACKAGES_SOURCE="/mnt/nas/Projects/Jak/debian-pkg/build/debs"
|
||||
|
||||
clear
|
||||
|
||||
# Set some colors for output messages
|
||||
@ -116,6 +120,99 @@ echo -e "\e[35m
|
||||
\e[0m"
|
||||
printf "\n%.0s" {1..1}
|
||||
|
||||
# Function to clean up existing Hyprland installations
|
||||
clean_existing_hyprland() {
|
||||
echo "${INFO} Checking for existing Hyprland installations..." | tee -a "$LOG"
|
||||
|
||||
# List of Hyprland-related packages and binaries to check
|
||||
local hyprland_packages=("hyprland" "hyprutils" "hyprgraphics" "hyprcursor" "hyprtoolkit" "hyprland-guiutils" "hyprwire" "aquamarine" "hypridle" "hyprlock" "hyprpolkitagent" "hyprpicker" "xdg-desktop-portal-hyprland" "hyprland-plugins")
|
||||
local hyprland_binaries=("/usr/local/bin/Hyprland" "/usr/local/bin/hyprland" "/usr/bin/Hyprland" "/usr/bin/hyprland")
|
||||
|
||||
# Remove installed .deb packages
|
||||
echo "${INFO} Removing any previously installed .deb packages..." | tee -a "$LOG"
|
||||
for pkg in "${hyprland_packages[@]}"; do
|
||||
if dpkg -l | grep -q "^ii.*$pkg"; then
|
||||
echo "${NOTE} Removing package: $pkg" | tee -a "$LOG"
|
||||
sudo apt-get remove -y "$pkg" 2>&1 | grep -E "(Setting up|Removing)" | tee -a "$LOG" || true
|
||||
fi
|
||||
done
|
||||
|
||||
# Remove binaries built from source
|
||||
echo "${INFO} Checking for binaries built from source..." | tee -a "$LOG"
|
||||
for binary in "${hyprland_binaries[@]}"; do
|
||||
if [ -e "$binary" ]; then
|
||||
echo "${NOTE} Removing binary: $binary" | tee -a "$LOG"
|
||||
sudo rm -f "$binary"
|
||||
fi
|
||||
done
|
||||
|
||||
# Remove development files from /usr/local
|
||||
if [ -d "/usr/local/include/hyprland" ] || [ -d "/usr/local/lib/libhypr" ]; then
|
||||
echo "${INFO} Removing development files from /usr/local..." | tee -a "$LOG"
|
||||
sudo rm -rf /usr/local/include/hyprland* 2>/dev/null || true
|
||||
sudo rm -rf /usr/local/lib/libhypr* 2>/dev/null || true
|
||||
sudo rm -rf /usr/local/lib/libaquamarine* 2>/dev/null || true
|
||||
sudo rm -rf /usr/local/lib/libypr* 2>/dev/null || true
|
||||
sudo ldconfig 2>/dev/null || true
|
||||
fi
|
||||
|
||||
echo "${OK} Cleanup completed" | tee -a "$LOG"
|
||||
}
|
||||
|
||||
# Function to install packages from pre-built .deb files
|
||||
install_from_packages() {
|
||||
echo "${INFO} Installing from pre-built packages at: ${SKY_BLUE}$DEB_PACKAGES_SOURCE${RESET}" | tee -a "$LOG"
|
||||
|
||||
if [ ! -d "$DEB_PACKAGES_SOURCE" ]; then
|
||||
echo "${ERROR} Package source directory not found: $DEB_PACKAGES_SOURCE" | tee -a "$LOG"
|
||||
return 1
|
||||
fi
|
||||
|
||||
local pkg_count=$(find "$DEB_PACKAGES_SOURCE" -name "*.deb" | wc -l)
|
||||
if [ "$pkg_count" -eq 0 ]; then
|
||||
echo "${ERROR} No .deb files found in $DEB_PACKAGES_SOURCE" | tee -a "$LOG"
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "${INFO} Found ${SKY_BLUE}$pkg_count${RESET} .deb packages" | tee -a "$LOG"
|
||||
|
||||
# Clean up existing installations before installing from packages
|
||||
echo "${CAT} Removing existing Hyprland installations to avoid conflicts..." | tee -a "$LOG"
|
||||
clean_existing_hyprland
|
||||
|
||||
# Update package cache after cleanup
|
||||
echo "${INFO} Updating package cache..." | tee -a "$LOG"
|
||||
sudo apt-get update 2>&1 | tail -3 | tee -a "$LOG"
|
||||
|
||||
# Install core packages only (skip plugins and debug symbols)
|
||||
echo "${INFO} Installing core Hyprland packages (excluding plugins and debug symbols)..." | tee -a "$LOG"
|
||||
|
||||
# Install only essential packages, skip plugins and dbgsym
|
||||
for deb in "$DEB_PACKAGES_SOURCE"/*.deb; do
|
||||
filename=$(basename "$deb")
|
||||
|
||||
# Skip debug symbols and plugins
|
||||
if [[ "$filename" == *"-dbgsym_"* ]]; then
|
||||
continue
|
||||
fi
|
||||
if [[ "$filename" == "hyprland-plugin-"* ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "${INFO} Installing: $filename" | tee -a "$LOG"
|
||||
sudo dpkg -i "$deb" 2>&1 | tee -a "$LOG" || true
|
||||
done
|
||||
|
||||
# Fix any dependency issues
|
||||
echo "${INFO} Fixing any dependency issues..." | tee -a "$LOG"
|
||||
sudo apt-get install -f -y 2>&1 | tail -5 | tee -a "$LOG"
|
||||
|
||||
echo "${OK} Core package installation completed!" | tee -a "$LOG"
|
||||
echo "${NOTE} To install plugins, run: sudo dpkg -i $DEB_PACKAGES_SOURCE/hyprland-plugin-*.deb" | tee -a "$LOG"
|
||||
echo "${NOTE} To install debug symbols, run: sudo dpkg -i $DEB_PACKAGES_SOURCE/*-dbgsym*.deb" | tee -a "$LOG"
|
||||
return 0
|
||||
}
|
||||
|
||||
# Welcome message using whiptail (for displaying information)
|
||||
whiptail --title "KooL Debian-Hyprland Trixie+ (2025) Install Script" \
|
||||
--msgbox "Welcome to KooL Debian-Hyprland Trixie+ (2025) Install Script!!!\n\n\
|
||||
@ -123,9 +220,27 @@ ATTENTION: Run a full system update and Reboot first !!! (Highly Recommended)\n\
|
||||
NOTE: If you are installing on a VM, ensure to enable 3D acceleration otherwise Hyprland may NOT start!" \
|
||||
15 80
|
||||
|
||||
# Ask user to choose build method
|
||||
build_method="source"
|
||||
if [ -d "$DEB_PACKAGES_SOURCE" ] && [ "$(find "$DEB_PACKAGES_SOURCE" -name "*.deb" 2>/dev/null | wc -l)" -gt 0 ]; then
|
||||
if whiptail --title "Build Method" \
|
||||
--yesno "Pre-built Hyprland packages are available at:\n$DEB_PACKAGES_SOURCE\n\nWould you like to install from pre-built packages?\n\nSelect YES for faster installation from packages\nSelect NO to build from source (takes longer)" 15 70; then
|
||||
build_method="packages"
|
||||
echo "${OK} Selected build method: ${SKY_BLUE}Pre-built Packages${RESET}" | tee -a "$LOG"
|
||||
else
|
||||
echo "${OK} Selected build method: ${SKY_BLUE}From Source${RESET}" | tee -a "$LOG"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Ask if the user wants to proceed
|
||||
if [ "$build_method" = "packages" ]; then
|
||||
proceed_msg="Build method: PRE-BUILT PACKAGES\n\nThis will install pre-compiled Hyprland packages from the shared location.\n\nShall we proceed?"
|
||||
else
|
||||
proceed_msg="Build method: FROM SOURCE\n\nVERY IMPORTANT!!!\nYou must be able to install from source by uncommenting deb-src on /etc/apt/sources.list else script may fail.\n\nShall we proceed?"
|
||||
fi
|
||||
|
||||
if ! whiptail --title "Proceed with Installation?" \
|
||||
--yesno "VERY IMPORTANT!!!\n\nYou must be able to install from source by uncommenting deb-src on /etc/apt/sources.list else script may fail to install Hyprland.\n\n\nShall we proceed?" 15 60; then
|
||||
--yesno "$proceed_msg" 15 60; then
|
||||
echo -e "\n"
|
||||
echo "❌ ${INFO} You 🫵 chose ${YELLOW}NOT${RESET} to proceed. ${YELLOW}Exiting...${RESET}" | tee -a "$LOG"
|
||||
echo -e "\n"
|
||||
@ -178,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
|
||||
|
||||
#################
|
||||
@ -187,6 +302,7 @@ gtk_themes="OFF"
|
||||
bluetooth="OFF"
|
||||
thunar="OFF"
|
||||
ags="OFF"
|
||||
quickshell="OFF"
|
||||
sddm="OFF"
|
||||
sddm_theme="OFF"
|
||||
xdph="OFF"
|
||||
@ -286,6 +402,7 @@ options_command+=(
|
||||
"bluetooth" "Do you want script to configure Bluetooth?" "OFF"
|
||||
"thunar" "Do you want Thunar file manager to be installed?" "OFF"
|
||||
"ags" "Install AGS v1 for Desktop-Like Overview" "OFF"
|
||||
"quickshell" "Install Quickshell (QtQuick-based shell toolkit)?" "OFF"
|
||||
"xdph" "Install XDG-DESKTOP-PORTAL-HYPRLAND (for screen share)?" "OFF"
|
||||
"zsh" "Install zsh shell with Oh-My-Zsh?" "OFF"
|
||||
"pokemon" "Add Pokemon color scripts to your terminal?" "OFF"
|
||||
@ -375,55 +492,71 @@ echo "${INFO} Installing ${SKY_BLUE}necessary fonts...${RESET}" | tee -a "$LOG"
|
||||
sleep 1
|
||||
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
|
||||
# Build method selection: from source or pre-built packages
|
||||
if [ "$build_method" = "packages" ]; then
|
||||
echo "${INFO} Installing from ${SKY_BLUE}pre-built packages${RESET}..." | tee -a "$LOG"
|
||||
sleep 1
|
||||
if install_from_packages; then
|
||||
echo "${OK} Pre-built packages installed successfully!" | tee -a "$LOG"
|
||||
else
|
||||
echo "${ERROR} Failed to install pre-built packages. Exiting..." | tee -a "$LOG"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
# Build from source (original method)
|
||||
# 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
|
||||
fi
|
||||
|
||||
echo "${INFO} Installing ${SKY_BLUE}KooL Hyprland packages...${RESET}" | tee -a "$LOG"
|
||||
sleep 1
|
||||
execute_script "01-hypr-pkgs.sh"
|
||||
sleep 1
|
||||
execute_script "hyprutils.sh"
|
||||
sleep 1
|
||||
execute_script "hyprlang.sh"
|
||||
sleep 1
|
||||
execute_script "hyprcursor.sh"
|
||||
sleep 1
|
||||
execute_script "hyprwayland-scanner.sh"
|
||||
sleep 1
|
||||
execute_script "hyprgraphics.sh"
|
||||
sleep 1
|
||||
execute_script "aquamarine.sh"
|
||||
sleep 1
|
||||
execute_script "hyprland-qt-support.sh"
|
||||
sleep 1
|
||||
execute_script "hyprtoolkit.sh"
|
||||
sleep 1
|
||||
execute_script "hyprland-guiutils.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 "xkbcommon.sh"
|
||||
sleep 1
|
||||
execute_script "hyprland.sh"
|
||||
sleep 1
|
||||
execute_script "hyprpolkitagent.sh"
|
||||
sleep 1
|
||||
execute_script "wallust.sh"
|
||||
sleep 1
|
||||
execute_script "swww.sh"
|
||||
sleep 1
|
||||
execute_script "rofi-wayland.sh"
|
||||
sleep 1
|
||||
execute_script "hyprlock.sh"
|
||||
sleep 1
|
||||
execute_script "hypridle.sh"
|
||||
echo "${INFO} Installing ${SKY_BLUE}KooL Hyprland packages from source...${RESET}" | tee -a "$LOG"
|
||||
sleep 1
|
||||
execute_script "01-hypr-pkgs.sh"
|
||||
sleep 1
|
||||
execute_script "hyprutils.sh"
|
||||
sleep 1
|
||||
execute_script "hyprlang.sh"
|
||||
sleep 1
|
||||
execute_script "hyprcursor.sh"
|
||||
sleep 1
|
||||
execute_script "hyprwayland-scanner.sh"
|
||||
sleep 1
|
||||
execute_script "hyprgraphics.sh"
|
||||
sleep 1
|
||||
execute_script "aquamarine.sh"
|
||||
sleep 1
|
||||
execute_script "hyprland-qt-support.sh"
|
||||
sleep 1
|
||||
execute_script "hyprtoolkit.sh"
|
||||
sleep 1
|
||||
execute_script "hyprland-guiutils.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 "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"
|
||||
sleep 1
|
||||
execute_script "wallust.sh"
|
||||
sleep 1
|
||||
execute_script "swww.sh"
|
||||
sleep 1
|
||||
execute_script "rofi-wayland.sh"
|
||||
sleep 1
|
||||
execute_script "hyprlock.sh"
|
||||
sleep 1
|
||||
execute_script "hypridle.sh"
|
||||
fi
|
||||
|
||||
#execute_script "imagemagick.sh" #this is for compiling from source. 07 Sep 2024
|
||||
# execute_script "waybar-git.sh" only if waybar on repo is old
|
||||
@ -464,6 +597,10 @@ for option in "${options[@]}"; do
|
||||
echo "${INFO} Installing ${SKY_BLUE}AGS v1 for Desktop Overview...${RESET}" | tee -a "$LOG"
|
||||
execute_script "ags.sh"
|
||||
;;
|
||||
quickshell)
|
||||
echo "${INFO} Installing ${SKY_BLUE}Quickshell${RESET} (QtQuick-based shell toolkit)..." | tee -a "$LOG"
|
||||
execute_script "quickshell.sh"
|
||||
;;
|
||||
xdph)
|
||||
echo "${INFO} Installing ${SKY_BLUE}xdg-desktop-portal-hyprland...${RESET}" | tee -a "$LOG"
|
||||
execute_script "xdph.sh"
|
||||
|
||||
25
refresh-hypr-tags.sh
Normal file → Executable file
25
refresh-hypr-tags.sh
Normal file → Executable file
@ -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
|
||||
@ -54,10 +56,11 @@ declare -A cur
|
||||
while IFS='=' read -r k v; do
|
||||
[[ -z "${k:-}" || "$k" =~ ^# ]] && continue
|
||||
cur[$k]="$v"
|
||||
edone < "$TAGS_FILE"
|
||||
done < "$TAGS_FILE"
|
||||
|
||||
# Fetch latest, but only update keys set to 'auto' or 'latest' unless forced
|
||||
FORCE=${FORCE:-0}
|
||||
changes=()
|
||||
for key in "${!repos[@]}"; do
|
||||
repo="${repos[$key]}"
|
||||
url="https://api.github.com/repos/$repo/releases/latest"
|
||||
@ -76,12 +79,30 @@ for key in "${!repos[@]}"; do
|
||||
existing="${cur[$key]:-}"
|
||||
if [[ $FORCE -eq 1 ]] || [[ "$existing" =~ ^(auto|latest)$ ]] || [[ -z "$existing" ]]; then
|
||||
cur[$key]="$tag"
|
||||
if [[ "$existing" != "$tag" ]]; then
|
||||
changes+=("$key: $existing -> $tag")
|
||||
fi
|
||||
echo "[OK] $key := $tag" | tee -a "$SUMMARY_LOG"
|
||||
else
|
||||
echo "[SKIP] $key pinned ($existing), not overriding" | tee -a "$SUMMARY_LOG"
|
||||
fi
|
||||
done
|
||||
|
||||
# Show change summary and prompt before writing (interactive only)
|
||||
if [[ -t 0 && ${#changes[@]} -gt 0 ]]; then
|
||||
printf "\nPlanned tag updates (refresh-hypr-tags.sh):\n" | tee -a "$SUMMARY_LOG"
|
||||
printf "%s\n" "${changes[@]}" | tee -a "$SUMMARY_LOG"
|
||||
printf "\nProceed with writing updated tags to %s? [Y/n]: " "$TAGS_FILE"
|
||||
read -r ans || true
|
||||
ans=${ans:-Y}
|
||||
case "$ans" in
|
||||
[nN]|[nN][oO])
|
||||
echo "[INFO] User aborted tag update; leaving $TAGS_FILE unchanged." | tee -a "$SUMMARY_LOG"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Write back
|
||||
{
|
||||
for k in "${!cur[@]}"; do
|
||||
|
||||
@ -17,6 +17,8 @@
|
||||
# ./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
|
||||
# ./update-hyprland.sh --force-update --install # override pinned versions (equivalent to FORCE=1)
|
||||
# ./update-hyprland.sh --help # show this help
|
||||
#
|
||||
# Notes:
|
||||
# - Requires curl; for --fetch-latest, jq is recommended (installed by 00-dependencies.sh)
|
||||
@ -44,6 +46,7 @@ DEFAULT_MODULES=(
|
||||
hyprland-protocols
|
||||
hyprland-qt-support
|
||||
hyprland-guiutils
|
||||
hyprwire
|
||||
hyprland
|
||||
)
|
||||
|
||||
@ -54,12 +57,36 @@ FETCH_LATEST=0
|
||||
RESTORE=0
|
||||
VIA_HELPER=0
|
||||
NO_FETCH=0
|
||||
USE_SYSTEM_LIBS=1
|
||||
AUTO_FALLBACK=0
|
||||
MINIMAL=0
|
||||
FORCE_UPDATE=0
|
||||
ONLY_LIST=""
|
||||
SKIP_LIST=""
|
||||
SET_ARGS=()
|
||||
|
||||
usage() {
|
||||
sed -n '2,120p' "$0" | sed -n '/^# /p' | sed 's/^# \{0,1\}//'
|
||||
# Print the header comments (quick reference) followed by explicit flags overview
|
||||
sed -n '2,140p' "$0" | sed -n '/^# /p' | sed 's/^# \{0,1\}//'
|
||||
cat <<EOF
|
||||
|
||||
Options:
|
||||
-h, --help Show this help and exit
|
||||
--with-deps Install build dependencies before running
|
||||
--dry-run Compile only; do not install
|
||||
--install Compile and install
|
||||
--fetch-latest Fetch latest releases from GitHub
|
||||
--force-update Override pinned values in hypr-tags.env (equivalent to FORCE=1)
|
||||
--restore Restore most recent hypr-tags.env backup
|
||||
--only LIST Comma-separated subset to build (e.g., hyprland,hyprutils)
|
||||
--skip LIST Comma-separated modules to skip
|
||||
--bundled Build Hyprland with bundled hypr* subprojects
|
||||
--system Prefer system-installed hypr* libraries (default)
|
||||
--via-helper Use dry-run-build.sh to summarize a dry-run
|
||||
--minimal Build minimal stack before hyprland
|
||||
--no-fetch Do not auto-fetch tags on install
|
||||
--set K=V [...] Set one or more tags (e.g., HYPRLAND=v0.53.0)
|
||||
EOF
|
||||
}
|
||||
|
||||
ensure_tags_file() {
|
||||
@ -75,6 +102,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
|
||||
}
|
||||
@ -132,6 +160,8 @@ set_tags_from_args() {
|
||||
fetch_latest_tags() {
|
||||
ensure_tags_file
|
||||
backup_tags
|
||||
CHANGES_FILE="$LOG_DIR/update-delta-$TS.log"
|
||||
: >"$CHANGES_FILE"
|
||||
|
||||
# Require curl; jq is preferred. Fallback to grep/sed if jq is missing.
|
||||
if ! command -v curl >/dev/null 2>&1; then
|
||||
@ -156,6 +186,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
|
||||
@ -188,13 +219,41 @@ fetch_latest_tags() {
|
||||
map[$k]="$v"
|
||||
done <"$TAGS_FILE"
|
||||
|
||||
# Build a list of changes (old -> new) according to override rules
|
||||
changes=()
|
||||
for k in "${!tags[@]}"; do
|
||||
# Only override if pinned value is 'auto' or 'latest'
|
||||
if [[ $FORCE_UPDATE -eq 1 ]]; then
|
||||
# Force override regardless of current value (matches FORCE=1 behavior in refresh-hypr-tags.sh)
|
||||
map[$k]="${tags[$k]}"
|
||||
else
|
||||
# Only override if pinned value is 'auto' or 'latest' (or unset)
|
||||
if [[ "${existing[$k]:-}" =~ ^(auto|latest)$ ]] || [[ -z "${existing[$k]:-}" ]]; then
|
||||
map[$k]="${tags[$k]}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Interactive confirmation before writing, if we have a TTY
|
||||
if [[ -t 0 && ${#changes[@]} -gt 0 ]]; then
|
||||
printf "\nPlanned tag updates (update-hyprland.sh):\n" | tee -a "$SUMMARY_LOG"
|
||||
printf "%s\n" "${changes[@]}" | tee -a "$SUMMARY_LOG" | tee -a "$CHANGES_FILE"
|
||||
printf "\nProceed with writing updated tags to %s? [Y/n]: " "$TAGS_FILE"
|
||||
read -r ans || true
|
||||
ans=${ans:-Y}
|
||||
case "$ans" in
|
||||
[nN]|[nN][oO])
|
||||
echo "[INFO] User aborted tag update; leaving $TAGS_FILE unchanged." | tee -a "$SUMMARY_LOG"
|
||||
# restore original copy
|
||||
latest_bak=$(ls -1t "$TAGS_FILE".bak-* 2>/dev/null | head -n1 || true)
|
||||
[[ -n "$latest_bak" ]] && cp "$latest_bak" "$TAGS_FILE"
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
else
|
||||
# non-interactive: still record changes
|
||||
printf "%s\n" "${changes[@]}" >>"$CHANGES_FILE" || true
|
||||
fi
|
||||
|
||||
{
|
||||
for k in "${!map[@]}"; do
|
||||
echo "$k=${map[$k]}"
|
||||
@ -208,8 +267,26 @@ fetch_latest_tags() {
|
||||
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 all tag keys found in the tags file so child scripts inherit them
|
||||
while IFS='=' read -r _k _v; do
|
||||
[[ -z "${_k:-}" || "$_k" =~ ^# ]] && continue
|
||||
# Only export keys that look like TAG variables or protocol version
|
||||
if [[ "$_k" == *"_TAG" || "$_k" == "WAYLAND_PROTOCOLS_TAG" ]]; then
|
||||
export "$_k"
|
||||
fi
|
||||
done < "$TAGS_FILE"
|
||||
|
||||
# Ensure toolchain paths prefer /usr/local for pkg-config and cmake finds
|
||||
export PATH="/usr/local/bin:${PATH}"
|
||||
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:${PKG_CONFIG_PATH:-}"
|
||||
export CMAKE_PREFIX_PATH="/usr/local:${CMAKE_PREFIX_PATH:-}"
|
||||
|
||||
# Propagate system/bundled selection to hyprland.sh
|
||||
if [[ $USE_SYSTEM_LIBS -eq 1 ]]; then
|
||||
export USE_SYSTEM_HYPRLIBS=1
|
||||
else
|
||||
export USE_SYSTEM_HYPRLIBS=0
|
||||
fi
|
||||
|
||||
# Optionally install dependencies (not dry-run)
|
||||
if [[ $WITH_DEPS -eq 1 ]]; then
|
||||
@ -224,9 +301,23 @@ run_stack() {
|
||||
local modules
|
||||
if [[ -n "$ONLY_LIST" ]]; then
|
||||
IFS=',' read -r -a modules <<<"$ONLY_LIST"
|
||||
else
|
||||
if [[ $MINIMAL -eq 1 ]]; then
|
||||
modules=(
|
||||
wayland-protocols-src
|
||||
hyprland-protocols
|
||||
hyprutils
|
||||
hyprlang
|
||||
aquamarine
|
||||
hyprgraphics
|
||||
hyprwayland-scanner
|
||||
hyprwire
|
||||
hyprland
|
||||
)
|
||||
else
|
||||
modules=("${DEFAULT_MODULES[@]}")
|
||||
fi
|
||||
fi
|
||||
if [[ -n "$SKIP_LIST" ]]; then
|
||||
IFS=',' read -r -a _skips <<<"$SKIP_LIST"
|
||||
local filtered=()
|
||||
@ -268,6 +359,20 @@ run_stack() {
|
||||
[[ "$m" == "hyprlang" ]] && has_lang=1
|
||||
done
|
||||
if [[ $has_hl -eq 1 ]]; then
|
||||
# When using system libs, ensure required libs will be built if missing/outdated
|
||||
if [[ $USE_SYSTEM_LIBS -eq 1 ]]; then
|
||||
if ! pkg-config --exists hyprwire 2>/dev/null; then
|
||||
modules=("hyprwire" "${modules[@]}")
|
||||
fi
|
||||
req_utils_ver="0.11.0"
|
||||
have_utils_ver=$(pkg-config --modversion hyprutils 2>/dev/null || echo "")
|
||||
if [[ -z "$have_utils_ver" ]] || [[ "$(printf '%s\n' "$req_utils_ver" "$have_utils_ver" | sort -V | head -n1)" != "$req_utils_ver" ]]; then
|
||||
modules=("hyprutils" "${modules[@]}")
|
||||
fi
|
||||
if ! pkg-config --exists hyprlang 2>/dev/null; then
|
||||
modules=("hyprlang" "${modules[@]}")
|
||||
fi
|
||||
fi
|
||||
# ensure each prerequisite is present
|
||||
[[ $has_wp -eq 0 ]] && modules=("wayland-protocols-src" "${modules[@]}")
|
||||
[[ $has_hlprot -eq 0 ]] && modules=("hyprland-protocols" "${modules[@]}")
|
||||
@ -399,11 +504,21 @@ run_stack() {
|
||||
done
|
||||
|
||||
{
|
||||
echo "\nSummary:"
|
||||
printf "\nSummary:\n"
|
||||
for mod in "${modules[@]}"; do
|
||||
printf "%-24s %s\n" "$mod" "${results[$mod]:-SKIPPED}"
|
||||
done
|
||||
echo "\nLogs under: $LOG_DIR. This run: $SUMMARY_LOG"
|
||||
# Show updated versions (final tag values)
|
||||
if [[ -f "$TAGS_FILE" ]]; then
|
||||
printf "\nUpdated versions (from %s):\n" "$TAGS_FILE"
|
||||
grep -E '^[A-Z0-9_]+=' "$TAGS_FILE" | sort
|
||||
fi
|
||||
# Include change list if present
|
||||
if [[ -f "$LOG_DIR/update-delta-$TS.log" ]]; then
|
||||
printf "\nChanges applied this run:\n"
|
||||
cat "$LOG_DIR/update-delta-$TS.log"
|
||||
fi
|
||||
printf "\nLogs under: %s. This run: %s\n" "$LOG_DIR" "$SUMMARY_LOG"
|
||||
} | tee -a "$SUMMARY_LOG"
|
||||
|
||||
# Non-zero on any FAILs
|
||||
@ -437,6 +552,10 @@ while [[ $# -gt 0 ]]; do
|
||||
FETCH_LATEST=1
|
||||
shift
|
||||
;;
|
||||
--force-update)
|
||||
FORCE_UPDATE=1
|
||||
shift
|
||||
;;
|
||||
--restore)
|
||||
RESTORE=1
|
||||
shift
|
||||
@ -453,6 +572,22 @@ while [[ $# -gt 0 ]]; do
|
||||
ONLY_LIST=${2:-}
|
||||
shift 2
|
||||
;;
|
||||
--bundled)
|
||||
USE_SYSTEM_LIBS=0
|
||||
shift
|
||||
;;
|
||||
--system)
|
||||
USE_SYSTEM_LIBS=1
|
||||
shift
|
||||
;;
|
||||
--auto)
|
||||
AUTO_FALLBACK=1
|
||||
shift
|
||||
;;
|
||||
--minimal)
|
||||
MINIMAL=1
|
||||
shift
|
||||
;;
|
||||
--skip)
|
||||
SKIP_LIST=${2:-}
|
||||
shift 2
|
||||
@ -479,6 +614,11 @@ fi
|
||||
|
||||
ensure_tags_file
|
||||
|
||||
# Env compatibility: honor FORCE=1 as alias for --force-update
|
||||
if [[ ${FORCE:-0} -eq 1 ]]; then
|
||||
FORCE_UPDATE=1
|
||||
fi
|
||||
|
||||
# Apply tag operations
|
||||
if [[ $RESTORE -eq 1 ]]; then
|
||||
restore_tags
|
||||
@ -504,7 +644,13 @@ 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 WAYLAND_PROTOCOLS_TAG
|
||||
# Export all tag variables dynamically
|
||||
while IFS='=' read -r _k _v; do
|
||||
[[ -z "${_k:-}" || "$_k" =~ ^# ]] && continue
|
||||
if [[ "$_k" == *"_TAG" || "$_k" == "WAYLAND_PROTOCOLS_TAG" ]]; then
|
||||
export "$_k"
|
||||
fi
|
||||
done < "$TAGS_FILE"
|
||||
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"
|
||||
@ -519,4 +665,19 @@ if [[ $VIA_HELPER -eq 1 ]]; then
|
||||
exit $?
|
||||
fi
|
||||
|
||||
run_stack
|
||||
if run_stack; then
|
||||
exit 0
|
||||
else
|
||||
rc=$?
|
||||
if [[ $AUTO_FALLBACK -eq 1 && $USE_SYSTEM_LIBS -eq 1 ]]; then
|
||||
echo "[WARN] Build failed with system libs. Retrying with bundled subprojects..." | tee -a "$SUMMARY_LOG"
|
||||
USE_SYSTEM_LIBS=0
|
||||
if run_stack; then
|
||||
exit 0
|
||||
else
|
||||
exit $?
|
||||
fi
|
||||
else
|
||||
exit $rc
|
||||
fi
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user