better installation handling

This commit is contained in:
CPTN Cosmo 2026-01-11 06:25:27 +01:00
parent 8208c3735b
commit a9ba614537
No known key found for this signature in database
4 changed files with 215 additions and 50 deletions

View file

@ -1,61 +1,64 @@
# XIVLauncher OTP Wrapper
This is a simple wrapper script for Linux that launches `xivlauncher-core` and automatically injects your One-Time Password (OTP) when the launcher requests it.
This is a wrapper script for Linux that launches `xivlauncher-core` (Native or Flatpak) and automatically injects your One-Time Password (OTP) when the launcher requests it.
## Setup
## Features
- **Auto-Detection**: Automatically detects if you are using the native `xivlauncher-core` (Arch/AUR) or the Flatpak version.
- **OTP Injection**: Generates TOTP codes and sends them to the launcher's internal server.
- **URL Support**: Accepts standard Base32 secrets OR full `otpauth://` URLs (e.g. from QR codes).
- **Auto-Configuration**: Prompts to fix `launcher.ini` settings if they are incorrect.
## Installation (Steam Deck / Linux Desktop)
The easiest way to install is using the provided installer script.
1. **Run the Installer:**
```bash
./installer.sh
```
2. **Enter Secret:**
When prompted, enter your **TOTP Secret** or paste a full **otpauth:// URL**.
**What it does:**
* Creates `~/.config/xivlauncher-wrapper/config.json`.
* Installs the wrapper to `~/.local/bin/xivlauncher-wrapper`.
* Installs a `.desktop` file to `~/.local/share/applications/` so it appears in your application menu.
### Steam Integration (Steam Deck)
1. Switch to Desktop Mode.
2. Open Steam.
3. "Games" -> "Add a Non-Steam Game to My Library".
4. Select "XIVLauncher Wrapper" from the list.
5. Return to Gaming Mode and launch "XIVLauncher Wrapper".
## Manual Setup
1. **Configure:**
Create the configuration directory and copy the example config.
```bash
mkdir -p ~/.config/xivlauncher-wrapper
cp config.example.json ~/.config/xivlauncher-wrapper/config.json
nano ~/.config/xivlauncher-wrapper/config.json
```
* `secret`: Enter your TOTP secret key (in Base32 format, usually provided when you set up your authenticator app).
* `launcher_cmd`: The command to launch XIVLauncher (default: `xivlauncher-core`).
* `secret`: Enter your TOTP secret key or `otpauth://` URL.
* `launcher_cmd`: (Optional) The command to launch XIVLauncher. If omitted, the wrapper will auto-detect it.
2. **Make Executable:**
Ensure the script is executable:
```bash
chmod +x wrapper.py
```
3. **XIVLauncher Settings:**
Ensure that "Enable XL Authenticator app/OTP macro support" is enabled in XIVLauncher settings.
Ensure that "Enable XL Authenticator app/OTP macro support" is enabled in XIVLauncher settings. The wrapper will check for this and prompt you if it's disabled.
## Usage
Simply run the wrapper instead of the launcher:
Simply run the wrapper:
```bash
./wrapper.py
```
The script will:
1. Launch XIVLauncher.
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.
Or launch "XIVLauncher Wrapper" from your application menu/Steam.
## 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".