Files
SteamFrame-FPV-Control-Center/scripts/install_on_steamdeck.sh
T

65 lines
2.4 KiB
Bash
Executable File

#!/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 <<EOF > "$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}"