From 7e6781de5f002e4ded64d8c0eb39b0cd78763252 Mon Sep 17 00:00:00 2001 From: bleackstorm Date: Fri, 6 Nov 2026 13:01:58 +0100 Subject: [PATCH] feat(steamdeck): add install_on_steamdeck.sh and make launch.sh compatible with Arch Linux/SteamOS library paths --- launch.sh | 11 ++++-- scripts/install_on_steamdeck.sh | 64 +++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 2 deletions(-) create mode 100755 scripts/install_on_steamdeck.sh diff --git a/launch.sh b/launch.sh index d7c1e9b..0b1d2fb 100755 --- a/launch.sh +++ b/launch.sh @@ -7,9 +7,16 @@ cd "$DIR" # Vérifier les dépendances locales de linkage (libxkbcommon-x11) mkdir -p "$HOME/.local/lib" -if [ ! -f "$HOME/.local/lib/libxkbcommon-x11.so" ] && [ -f "/usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so.0" ]; then - ln -sf /usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so.0 "$HOME/.local/lib/libxkbcommon-x11.so" +if [ ! -f "$HOME/.local/lib/libxkbcommon-x11.so" ]; then + if [ -f "/usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so.0" ]; then + ln -sf /usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so.0 "$HOME/.local/lib/libxkbcommon-x11.so" + elif [ -f "/usr/lib/libxkbcommon-x11.so.0" ]; then + ln -sf /usr/lib/libxkbcommon-x11.so.0 "$HOME/.local/lib/libxkbcommon-x11.so" + elif [ -f "/usr/lib/libxkbcommon-x11.so" ]; then + ln -sf /usr/lib/libxkbcommon-x11.so "$HOME/.local/lib/libxkbcommon-x11.so" + fi fi +export LD_LIBRARY_PATH="$HOME/.local/lib:${LD_LIBRARY_PATH:-}" # Vérifier si le binaire release existe, sinon le compiler if [ ! -f "$DIR/target/release/steamframe-fpv" ]; then diff --git a/scripts/install_on_steamdeck.sh b/scripts/install_on_steamdeck.sh new file mode 100755 index 0000000..398d577 --- /dev/null +++ b/scripts/install_on_steamdeck.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash +# Installation et intégration de SteamFrame FPV sur SteamOS (Steam Deck) +set -e + +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null 2>&1 && pwd)" +cd "$DIR" + +GREEN='\033[0;32m' +BLUE='\033[0;34m' +YELLOW='\033[1;33m' +NC='\033[0m' + +echo -e "${BLUE}======================================================================${NC}" +echo -e "${BLUE} Installation & Intégration SteamOS (Steam Deck) ${NC}" +echo -e "${BLUE}======================================================================${NC}" + +# 1. Vérification du binaire release +if [ ! -f "$DIR/target/release/steamframe-fpv" ]; then + echo -e "${YELLOW}Compilation du binaire Release...${NC}" + cargo build --release +fi + +chmod +x "$DIR/launch.sh" "$DIR/target/release/steamframe-fpv" + +# 2. Création dynamique du lanceur .desktop avec le bon chemin utilisateur +DESKTOP_SRC="$DIR/steamframe-fpv.desktop" +cat < "$DESKTOP_SRC" +[Desktop Entry] +Version=1.0 +Type=Application +Name=SteamFrame FPV +GenericName=Station FPV & Centre de contrôle +Comment=Streaming vidéo ultra-faible latence et contrôle FPV pour Radxa Zero 3W et RadioMaster Nomad +Exec=$DIR/launch.sh +Path=$DIR +Icon=$DIR/assets/icon.png +Terminal=false +Categories=Video;AudioVideo;Utility; +StartupNotify=true +StartupWMClass=steamframe-fpv +EOF + +# 3. Installation dans les répertoires standards du bureau KDE / SteamOS +mkdir -p "$HOME/.local/share/applications" +cp "$DESKTOP_SRC" "$HOME/.local/share/applications/steamframe-fpv.desktop" + +if [ -d "$HOME/Desktop" ]; then + cp "$DESKTOP_SRC" "$HOME/Desktop/SteamFrame-FPV.desktop" + chmod +x "$HOME/Desktop/SteamFrame-FPV.desktop" +fi + +echo -e "${GREEN}✔ Raccourci installé avec succès dans les applications SteamOS et sur le Bureau !${NC}" +echo "" +echo -e "${BLUE}--- Comment l'utiliser sur le Steam Deck : ---${NC}" +echo -e "1. ${GREEN}En Mode Bureau (Desktop Mode) :${NC}" +echo " Double-cliquez sur l'icône 'SteamFrame FPV' sur votre Bureau." +echo "" +echo -e "2. ${GREEN}En Mode Jeu (Game Mode / Mode Console) :${NC}" +echo " - Ouvrez le client Steam en mode bureau." +echo " - Cliquez sur 'Jeux' (menu du haut) > 'Ajouter un jeu non Steam à ma bibliothèque...'." +echo " - Cochez 'SteamFrame FPV' dans la liste et validez." +echo " - Revenez en Mode Jeu : l'application est accessible directement dans votre bibliothèque Steam !" +echo "" +echo -e "${GREEN}======================================================================${NC}"