added steamdeck installer

This commit is contained in:
CPTN Cosmo 2026-01-11 01:47:43 +01:00
parent efb7e52a14
commit 8208c3735b
No known key found for this signature in database
2 changed files with 120 additions and 0 deletions

View file

@ -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".

97
install-steamdeck.sh Executable file
View file

@ -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" <<EOF
{
"secret": "$SECRET",
"launcher_cmd": "$LAUNCHER_CMD"
}
EOF
echo "Configuration created successfully at: $CONFIG_FILE"
echo "Launcher command set to: $LAUNCHER_CMD"
fi
echo ""
echo "Installing application files..."
# Create directories
mkdir -p "$BIN_DIR"
mkdir -p "$APP_DIR"
mkdir -p "$ICON_DIR"
# Install Wrapper Script
echo "Installing wrapper script to $BIN_DIR/xivlauncher-wrapper..."
cp wrapper.py "$BIN_DIR/xivlauncher-wrapper"
chmod +x "$BIN_DIR/xivlauncher-wrapper"
# Install Icon
echo "Installing icon to $ICON_DIR/xivlauncher-wrapper.png..."
if [ -f "xivlauncher-wrapper.png" ]; then
cp xivlauncher-wrapper.png "$ICON_DIR/xivlauncher-wrapper.png"
else
echo "Warning: xivlauncher-wrapper.png not found in current directory. Icon installation skipped."
fi
# Install Desktop File
echo "Installing desktop file to $APP_DIR/xivlauncher-wrapper.desktop..."
# We generate the desktop file content to ensure paths are correct
cat > "$APP_DIR/xivlauncher-wrapper.desktop" <<EOF
[Desktop Entry]
Name=XIVLauncher Wrapper
Comment=FFXIV Launcher with OTP Injection
Exec=$BIN_DIR/xivlauncher-wrapper
Icon=xivlauncher-wrapper
Terminal=false
Type=Application
Categories=Game;
Keywords=ffxiv;launcher;mmo;
EOF
echo "Updating desktop database..."
if command -v update-desktop-database >/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."