beyond-all-reason / beyond-all-reason/BAR-Devtools

Add Flatpak detection & launcher path support

Open
#46 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
6
Forks
7
Avg merge
12h 58m
Merged PRs (30d)
2

Description

**Problem:** `just bar::launch` (GUI default) requires a `Beyond-All-Reason*.AppImage` on Linux because `_launch_uses_appimage()` returns true for Chobby boots. Flatpak users don't have an AppImage — they launch via `flatpak run info.beyondallreason.bar`. The shell scripts have no awareness of Flatpak at all.

**Changes needed:**

1. **`scripts/setup.sh` — `ensure_bar_appimage_path_set()`:** After the existing `~/Applications/` auto-detect, run `flatpak info info.beyondallreason.bar &>/dev/null` and if found, offer the user an option to use Flatpak (or auto-detect it silently). Add new environment variable `BAR_FLATPAK_PATH=flatpak:info.beyondallreason.bar` to `.env`. (or possibly we need to emit the full application path)

2. **`scripts/setup.sh` — `bar_appimage_resolves()`:** Accept `flatpak:*` as a valid sentinel in addition to file/directory paths. (or have a separate function that checks for bar_flatpak_resolves() )

3. **`scripts/setup.sh` — `detect_game_dir()`:** Add auto-detection of the Flatpak data dir at `~/.var/app/info.beyondallreason.bar/data` so linking and chobby-channel detection work out of the box.

4. **`scripts/launch.sh` — `run_linux()`:** When `BAR_FLATPAK_PATH` exists`, inject `--launcher-binary flatpak` (or equivalent) into the `bar-launch` args so the Python side knows which execution mode to use.

5. **`scripts/doctor.sh`:** Report Flatpak install alongside the AppImage status

(this issue was researched and written by Deepseek v4 flash, with an edit by NortySpock to focus on a new BAR_FLATPAK_PATH environment variable. It could easily contain errors)

Contributor guide

Open the contributing guide

Research direction

Read scripts/setup.sh, especially ensure_bar_appimage_path_set(), bar_appimage_resolves(), and detect_game_dir(), then inspect scripts/launch.sh run_linux() and scripts/doctor.sh. Run the setup, launch, and doctor flows on a Linux system with Flatpak installed to compare existing AppImage behavior. Done means Flatpak is detected and recorded in .env, its data directory is found, launch receives the Flatpak mode, and doctor reports the installation.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, shell
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.