Files
SteamFrame-FPV-Control-Center/launch.sh
T

21 lines
708 B
Bash
Executable File

#!/usr/bin/env bash
# SteamFrame FPV Launcher
set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
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"
fi
# Vérifier si le binaire release existe, sinon le compiler
if [ ! -f "$DIR/target/release/steamframe-fpv" ]; then
echo "Compilation initiale de SteamFrame FPV en mode Release..."
cargo build --release
fi
exec "$DIR/target/release/steamframe-fpv" "$@"