From 8208c3735b0e760557a2af148ca84f4fcd7995b5 Mon Sep 17 00:00:00 2001 From: CPTN Cosmo Date: Sun, 11 Jan 2026 01:47:43 +0100 Subject: [PATCH] added steamdeck installer --- README.md | 23 +++++++++++ install-steamdeck.sh | 97 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100755 install-steamdeck.sh diff --git a/README.md b/README.md index 56e63fa..7bb562c 100644 --- a/README.md +++ b/README.md @@ -36,3 +36,26 @@ The script will: 2. Wait for the launcher to start its local HTTP server (port 4646). 3. Generate the current OTP code. 4. Send it to the launcher automatically. + +## Steam Deck / Linux Desktop Installation + +For Steam Deck or standard Linux desktop users, you can use the provided installer script to set everything up automatically. + +1. **Run the Installer:** + ```bash + ./install-steamdeck.sh + ``` + Follow the prompts to enter your OTP secret. + +2. **What it does:** + * Creates the configuration file with your secret. + * Installs the wrapper to `~/.local/bin/xivlauncher-wrapper`. + * Installs a `.desktop` file to `~/.local/share/applications/` so it appears in your application menu (and can be added to Steam as a non-Steam game). + +3. **Steam Integration:** + * Switch to Desktop Mode. + * Open Steam. + * "Games" -> "Add a Non-Steam Game to My Library". + * Select "XIVLauncher Wrapper" from the list. + * Return to Gaming Mode and launch "XIVLauncher Wrapper". + diff --git a/install-steamdeck.sh b/install-steamdeck.sh new file mode 100755 index 0000000..5b612c1 --- /dev/null +++ b/install-steamdeck.sh @@ -0,0 +1,97 @@ +#!/bin/bash + +CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/xivlauncher-wrapper" +CONFIG_FILE="$CONFIG_DIR/config.json" +LAUNCHER_CMD="flatpak run dev.goats.xivlauncher" + +# Install paths +BIN_DIR="$HOME/.local/bin" +APP_DIR="$HOME/.local/share/applications" +ICON_DIR="$HOME/.local/share/icons/hicolor/512x512/apps" + +echo "XIVLauncher Wrapper - Steam Deck Installer" +echo "==========================================" + +# Create config directory if it doesn't exist +mkdir -p "$CONFIG_DIR" + +SETUP_CONFIG=true +if [ -f "$CONFIG_FILE" ]; then + echo "Configuration file already exists at: $CONFIG_FILE" + read -p "Do you want to overwrite it? (y/N): " OVERWRITE + if [[ ! "$OVERWRITE" =~ ^[Yy]$ ]]; then + echo "Skipping configuration setup." + SETUP_CONFIG=false + fi +fi + +if [ "$SETUP_CONFIG" = true ]; then + echo "We will now set up the configuration file." + echo "You will need your generic TOTP secret (base32 format)." + read -p "Enter your TOTP Secret: " SECRET + + if [ -z "$SECRET" ]; then + echo "Error: Secret cannot be empty." + # We can continue to install files even if config fails? + # Or should we exit? Probably exit or just warn. + # Let's exit for safety if they intended to set it up but failed. + exit 1 + fi + + cat > "$CONFIG_FILE" < "$APP_DIR/xivlauncher-wrapper.desktop" </dev/null 2>&1; then + update-desktop-database "$APP_DIR" +else + echo "update-desktop-database not found, skipping." +fi + +echo "" +echo "Installation complete!" +echo "You may need to add $BIN_DIR to your PATH if it's not already there." +