From 4f4afec6b2f023afd93f948f02f2ffa1c95f5a39 Mon Sep 17 00:00:00 2001 From: nocode Date: Sat, 4 Jul 2026 12:56:44 +0200 Subject: [PATCH] feat(releng): add fws-proton-ge script for proton-ge installation Add a user-friendly bash script that automates downloading and installing Proton-GE (GloriousEggroll) for Steam. The script fetches the latest release from GitHub, verifies integrity with SHA512 checksums, and installs it to the user's Steam compatibility tools directory. Includes error handling and user guidance for Steam configuration. --- .../airootfs/usr/local/bin/fws-proton-ge | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 configs/releng/airootfs/usr/local/bin/fws-proton-ge diff --git a/configs/releng/airootfs/usr/local/bin/fws-proton-ge b/configs/releng/airootfs/usr/local/bin/fws-proton-ge new file mode 100755 index 0000000..8aa035a --- /dev/null +++ b/configs/releng/airootfs/usr/local/bin/fws-proton-ge @@ -0,0 +1,46 @@ +#!/bin/bash +# FWS — installe/actualise Proton-GE (GloriousEggroll) pour Steam : +# meilleure compatibilité des jeux Windows que le Proton officiel. +# S'exécute en UTILISATEUR (installe dans ~/.steam/root/compatibilitytools.d). +set -u +say() { printf '\n\033[1;34m==> %s\033[0m\n' "$*"; } +fail() { printf '\033[1;31m ✗ %s\033[0m\n' "$*"; read -rp "Entrée pour fermer. " _; exit 1; } + +[ "$(id -u)" -eq 0 ] && fail "à lancer en utilisateur normal (pas root) : l'outil s'installe dans ton Steam." + +API="https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/latest" +DEST="$HOME/.steam/root/compatibilitytools.d" + +say "Recherche de la dernière version de Proton-GE…" +JSON="$(curl -fsSL "$API")" || fail "GitHub inaccessible (réseau ?)" +URL="$(printf '%s' "$JSON" | grep -o '"browser_download_url": *"[^"]*\.tar\.gz"' | cut -d'"' -f4 | head -1)" +SUM_URL="$(printf '%s' "$JSON" | grep -o '"browser_download_url": *"[^"]*\.sha512sum"' | cut -d'"' -f4 | head -1)" +[ -n "$URL" ] || fail "archive introuvable dans la release GitHub" +NAME="$(basename "$URL" .tar.gz)" + +if [ -d "$DEST/$NAME" ]; then + say "$NAME est déjà installé ✔" + read -rp "Entrée pour fermer. " _; exit 0 +fi + +TMP="$(mktemp -d)" +trap 'rm -rf "$TMP"' EXIT +say "Téléchargement de $NAME (~450 Mo)…" +curl -fL --progress-bar -o "$TMP/$NAME.tar.gz" "$URL" || fail "téléchargement échoué" + +if [ -n "$SUM_URL" ]; then + say "Vérification de l'intégrité (sha512)…" + curl -fsSL -o "$TMP/sum" "$SUM_URL" \ + && (cd "$TMP" && sed "s|[^ ]*\.tar\.gz|$NAME.tar.gz|" sum | sha512sum -c -) \ + || fail "somme de contrôle invalide — archive corrompue ?" +fi + +say "Installation dans $DEST…" +mkdir -p "$DEST" +tar -xzf "$TMP/$NAME.tar.gz" -C "$DEST" || fail "extraction échouée" + +say "$NAME installé ✔" +echo " Dans Steam : Paramètres → Compatibilité → activer, puis choisir" +echo " « $NAME » (ou par jeu : Propriétés → Compatibilité)." +echo " Redémarre Steam pour qu'il apparaisse." +read -rp "Entrée pour fermer. " _