mirror of
https://github.com/JaKooLit/Debian-Hyprland.git
synced 2025-12-21 10:20:12 +01:00
Compare commits
8 Commits
b61d659a48
...
704d4b3c28
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
704d4b3c28 | ||
|
|
64754089d4 | ||
|
|
f776563d3e | ||
|
|
95708df841 | ||
|
|
98c7c31635 | ||
|
|
becb1af622 | ||
|
|
82367a41ae | ||
|
|
ce70cf5c63 |
396
Debian-Hyprland-Install-Upgrade.es.md
Normal file
396
Debian-Hyprland-Install-Upgrade.es.md
Normal file
@ -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.
|
||||||
396
Debian-Hyprland-Install-Upgrade.md
Normal file
396
Debian-Hyprland-Install-Upgrade.md
Normal file
@ -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.
|
||||||
@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
HYPRLAND_TAG=v0.51.1
|
HYPRLAND_TAG=v0.51.1
|
||||||
AQUAMARINE_TAG=v0.9.3
|
AQUAMARINE_TAG=v0.9.3
|
||||||
HYPRUTILS_TAG=v0.8.2
|
HYPRUTILS_TAG=auto
|
||||||
HYPRLANG_TAG=v0.6.4
|
HYPRLANG_TAG=auto
|
||||||
HYPRGRAPHICS_TAG=v0.1.5
|
HYPRGRAPHICS_TAG=v0.1.5
|
||||||
HYPRWAYLAND_SCANNER_TAG=v0.4.5
|
HYPRWAYLAND_SCANNER_TAG=v0.4.5
|
||||||
HYPRLAND_PROTOCOLS_TAG=v0.6.4
|
HYPRLAND_PROTOCOLS_TAG=v0.6.4
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#specific branch or release
|
#specific branch or release
|
||||||
tag="v0.9.2"
|
tag="v0.9.3"
|
||||||
# Allow environment override
|
# Allow environment override
|
||||||
if [ -n "${AQUAMARINE_TAG:-}" ]; then tag="$AQUAMARINE_TAG"; fi
|
if [ -n "${AQUAMARINE_TAG:-}" ]; then tag="$AQUAMARINE_TAG"; fi
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
# Main Hyprland Package#
|
# Main Hyprland Package#
|
||||||
|
|
||||||
#specific branch or release
|
#specific branch or release
|
||||||
tag="v0.50.1"
|
tag="v0.51.1"
|
||||||
# Allow environment override
|
# Allow environment override
|
||||||
if [ -n "${HYPRLAND_TAG:-}" ]; then tag="$HYPRLAND_TAG"; fi
|
if [ -n "${HYPRLAND_TAG:-}" ]; then tag="$HYPRLAND_TAG"; fi
|
||||||
|
|
||||||
@ -84,9 +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."
|
echo "${NOTE} Hyprland compile patch does not apply on $tag; skipping."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
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 [ $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"
|
printf "${OK} ${MAGENTA}Hyprland tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG"
|
||||||
else
|
else
|
||||||
echo -e "${ERROR} Installation failed for ${YELLOW}Hyprland $tag${RESET}" 2>&1 | tee -a "$MLOG"
|
echo -e "${ERROR} Installation failed for ${YELLOW}Hyprland $tag${RESET}" 2>&1 | tee -a "$MLOG"
|
||||||
|
|||||||
@ -45,7 +45,7 @@ fi
|
|||||||
printf "${INFO} Installing ${YELLOW}hyprlang $tag${RESET} ...\n"
|
printf "${INFO} Installing ${YELLOW}hyprlang $tag${RESET} ...\n"
|
||||||
if git clone --recursive -b $tag https://github.com/hyprwm/hyprlang.git; then
|
if git clone --recursive -b $tag https://github.com/hyprwm/hyprlang.git; then
|
||||||
cd hyprlang || exit 1
|
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`
|
cmake --build ./build --config Release --target hyprlang -j`nproc 2>/dev/null || getconf _NPROCESSORS_CONF`
|
||||||
if [ $DO_INSTALL -eq 1 ]; then
|
if [ $DO_INSTALL -eq 1 ]; then
|
||||||
if sudo cmake --install ./build 2>&1 | tee -a "$MLOG" ; then
|
if sudo cmake --install ./build 2>&1 | tee -a "$MLOG" ; then
|
||||||
|
|||||||
@ -43,7 +43,7 @@ fi
|
|||||||
|
|
||||||
if git clone -b $tag "https://github.com/hyprwm/hyprutils.git"; then
|
if git clone -b $tag "https://github.com/hyprwm/hyprutils.git"; then
|
||||||
cd "hyprutils" || exit 1
|
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`
|
cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf _NPROCESSORS_CONF`
|
||||||
if [ $DO_INSTALL -eq 1 ]; then
|
if [ $DO_INSTALL -eq 1 ]; then
|
||||||
if sudo cmake --install build 2>&1 | tee -a "$MLOG"; then
|
if sudo cmake --install build 2>&1 | tee -a "$MLOG"; then
|
||||||
|
|||||||
18
install.sh
18
install.sh
@ -171,6 +171,17 @@ execute_script() {
|
|||||||
if [ -f "./hypr-tags.env" ]; then
|
if [ -f "./hypr-tags.env" ]; then
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
source "./hypr-tags.env"
|
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
|
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
|
fi
|
||||||
|
|
||||||
@ -368,6 +379,13 @@ echo "${INFO} Installing ${SKY_BLUE}necessary fonts...${RESET}" | tee -a "$LOG"
|
|||||||
sleep 1
|
sleep 1
|
||||||
execute_script "fonts.sh"
|
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
|
||||||
|
fi
|
||||||
|
|
||||||
echo "${INFO} Installing ${SKY_BLUE}KooL Hyprland packages...${RESET}" | tee -a "$LOG"
|
echo "${INFO} Installing ${SKY_BLUE}KooL Hyprland packages...${RESET}" | tee -a "$LOG"
|
||||||
sleep 1
|
sleep 1
|
||||||
execute_script "01-hypr-pkgs.sh"
|
execute_script "01-hypr-pkgs.sh"
|
||||||
|
|||||||
92
refresh-hypr-tags.sh
Normal file
92
refresh-hypr-tags.sh
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
#!/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, 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] 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
|
||||||
|
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 [[ -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
|
||||||
|
{
|
||||||
|
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"
|
||||||
@ -51,6 +51,7 @@ DO_DRY_RUN=0
|
|||||||
FETCH_LATEST=0
|
FETCH_LATEST=0
|
||||||
RESTORE=0
|
RESTORE=0
|
||||||
VIA_HELPER=0
|
VIA_HELPER=0
|
||||||
|
NO_FETCH=0
|
||||||
ONLY_LIST=""
|
ONLY_LIST=""
|
||||||
SKIP_LIST=""
|
SKIP_LIST=""
|
||||||
SET_ARGS=()
|
SET_ARGS=()
|
||||||
@ -136,6 +137,13 @@ fetch_latest_tags() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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=(
|
declare -A repos=(
|
||||||
[HYPRLAND_TAG]="hyprwm/Hyprland"
|
[HYPRLAND_TAG]="hyprwm/Hyprland"
|
||||||
[AQUAMARINE_TAG]="hyprwm/aquamarine"
|
[AQUAMARINE_TAG]="hyprwm/aquamarine"
|
||||||
@ -179,7 +187,10 @@ fetch_latest_tags() {
|
|||||||
done < "$TAGS_FILE"
|
done < "$TAGS_FILE"
|
||||||
|
|
||||||
for k in "${!tags[@]}"; do
|
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
|
done
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -228,19 +239,33 @@ export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG H
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Ensure core prerequisites 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
|
# Order: wayland-protocols-src, hyprland-protocols, hyprutils, hyprlang, aquamarine, hyprland
|
||||||
if [[ $DO_INSTALL -eq 1 ]]; then
|
if [[ $DO_INSTALL -eq 1 ]]; then
|
||||||
local has_hl=0 has_aqua=0 has_wp=0 has_utils=0 has_lang=0
|
# 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
|
for m in "${modules[@]}"; do
|
||||||
[[ "$m" == "hyprland" ]] && has_hl=1
|
[[ "$m" == "hyprland" ]] && has_hl=1
|
||||||
[[ "$m" == "aquamarine" ]] && has_aqua=1
|
[[ "$m" == "aquamarine" ]] && has_aqua=1
|
||||||
[[ "$m" == "wayland-protocols-src" ]] && has_wp=1
|
[[ "$m" == "wayland-protocols-src" ]] && has_wp=1
|
||||||
|
[[ "$m" == "hyprland-protocols" ]] && has_hlprot=1
|
||||||
[[ "$m" == "hyprutils" ]] && has_utils=1
|
[[ "$m" == "hyprutils" ]] && has_utils=1
|
||||||
[[ "$m" == "hyprlang" ]] && has_lang=1
|
[[ "$m" == "hyprlang" ]] && has_lang=1
|
||||||
done
|
done
|
||||||
if [[ $has_hl -eq 1 ]]; then
|
if [[ $has_hl -eq 1 ]]; then
|
||||||
# ensure each prerequisite is present
|
# ensure each prerequisite is present
|
||||||
[[ $has_wp -eq 0 ]] && modules=("wayland-protocols-src" "${modules[@]}")
|
[[ $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_utils -eq 0 ]] && modules=("hyprutils" "${modules[@]}")
|
||||||
[[ $has_lang -eq 0 ]] && modules=("hyprlang" "${modules[@]}")
|
[[ $has_lang -eq 0 ]] && modules=("hyprlang" "${modules[@]}")
|
||||||
[[ $has_aqua -eq 0 ]] && modules=("aquamarine" "${modules[@]}")
|
[[ $has_aqua -eq 0 ]] && modules=("aquamarine" "${modules[@]}")
|
||||||
@ -248,14 +273,21 @@ export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG H
|
|||||||
# Reorder to exact sequence before hyprland
|
# Reorder to exact sequence before hyprland
|
||||||
# Remove existing occurrences and rebuild in correct order
|
# Remove existing occurrences and rebuild in correct order
|
||||||
local tmp=()
|
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
|
for m in "${modules[@]}"; do
|
||||||
if [[ "$m" == "wayland-protocols-src" ]]; then
|
if [[ "$m" == "wayland-protocols-src" ]]; then
|
||||||
if [[ $inserted_wp -eq 0 ]]; then tmp+=("wayland-protocols-src"); inserted_wp=1; fi
|
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
|
elif [[ "$m" == "hyprutils" ]]; then
|
||||||
if [[ $inserted_utils -eq 0 ]]; then
|
if [[ $inserted_utils -eq 0 ]]; then
|
||||||
# ensure protocols before utils
|
# ensure protocols before utils
|
||||||
if [[ $inserted_wp -eq 0 ]]; then tmp+=("wayland-protocols-src"); inserted_wp=1; fi
|
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
|
tmp+=("hyprutils"); inserted_utils=1
|
||||||
fi
|
fi
|
||||||
elif [[ "$m" == "hyprlang" ]]; then
|
elif [[ "$m" == "hyprlang" ]]; then
|
||||||
@ -263,6 +295,7 @@ export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG H
|
|||||||
# ensure utils before lang
|
# ensure utils before lang
|
||||||
if [[ $inserted_utils -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_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
|
tmp+=("hyprutils"); inserted_utils=1
|
||||||
fi
|
fi
|
||||||
tmp+=("hyprlang"); inserted_lang=1
|
tmp+=("hyprlang"); inserted_lang=1
|
||||||
@ -273,6 +306,7 @@ export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG H
|
|||||||
if [[ $inserted_lang -eq 0 ]]; then
|
if [[ $inserted_lang -eq 0 ]]; then
|
||||||
if [[ $inserted_utils -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_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
|
tmp+=("hyprutils"); inserted_utils=1
|
||||||
fi
|
fi
|
||||||
tmp+=("hyprlang"); inserted_lang=1
|
tmp+=("hyprlang"); inserted_lang=1
|
||||||
@ -282,6 +316,7 @@ export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG H
|
|||||||
elif [[ "$m" == "hyprland" ]]; then
|
elif [[ "$m" == "hyprland" ]]; then
|
||||||
# ensure all prerequisites already present
|
# ensure all prerequisites already present
|
||||||
if [[ $inserted_wp -eq 0 ]]; then tmp+=("wayland-protocols-src"); inserted_wp=1; fi
|
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_utils -eq 0 ]]; then tmp+=("hyprutils"); inserted_utils=1; fi
|
||||||
if [[ $inserted_lang -eq 0 ]]; then tmp+=("hyprlang"); inserted_lang=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
|
if [[ $inserted_aqua -eq 0 ]]; then tmp+=("aquamarine"); inserted_aqua=1; fi
|
||||||
@ -334,6 +369,7 @@ while [[ $# -gt 0 ]]; do
|
|||||||
--fetch-latest) FETCH_LATEST=1; shift ;;
|
--fetch-latest) FETCH_LATEST=1; shift ;;
|
||||||
--restore) RESTORE=1; shift ;;
|
--restore) RESTORE=1; shift ;;
|
||||||
--via-helper) VIA_HELPER=1; shift ;;
|
--via-helper) VIA_HELPER=1; shift ;;
|
||||||
|
--no-fetch) NO_FETCH=1; shift ;;
|
||||||
--only) ONLY_LIST=${2:-}; shift 2 ;;
|
--only) ONLY_LIST=${2:-}; shift 2 ;;
|
||||||
--skip) SKIP_LIST=${2:-}; shift 2 ;;
|
--skip) SKIP_LIST=${2:-}; shift 2 ;;
|
||||||
--set)
|
--set)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user