Skip to content

fix(config): accept 'linux' platform string in getStartDir#39

Merged
MudDev merged 1 commit into
mainfrom
fix/config-linux-platform
May 18, 2026
Merged

fix(config): accept 'linux' platform string in getStartDir#39
MudDev merged 1 commit into
mainfrom
fix/config-linux-platform

Conversation

@MudDev
Copy link
Copy Markdown

@MudDev MudDev commented May 18, 2026

Summary

Fixes #33. The official Linux PyInstaller release binary crashes during startup with:

RuntimeError: UNKNOWN PLATFORM: linux. Something must have went terribly wrong!

Root cause

The Linux release workflow runs build.py --platform=linux (.github/workflows/build-installers.yml:226), which writes platform = 'linux' (lowercase) into src/Build.py. But Config.getStartDir() only accepted 'libredesktop' or 'Linux' (capitalized) for the Linux branch — 'linux' fell through to the else: raise RuntimeError(...) clause.

Source installs were unaffected because they set self.platform = 'source' (Config.py:52), which is handled separately. Only the bundled Linux release tarball (EpixNet-linux-x64.tar.gz from GitHub Releases) hits this.

Fix

One-line change in src/Config.py:248: add 'linux' to the accepted tuple.

-        elif self.platform in ('libredesktop', 'Linux'):
+        elif self.platform in ('libredesktop', 'Linux', 'linux'):

Kept 'libredesktop' and 'Linux' for backwards compatibility with any out-of-tree builds.

Why this side and not the CI side

Could equally be fixed by changing the workflow to --platform=libredesktop, but accepting 'linux' in Config is preferable:

  • 'linux' is the conventional string (matches platform.system().lower(), sys.platform, PyInstaller's --target-platform)
  • 'libredesktop' is an obscure legacy term
  • Future build scripts/wrappers can use the obvious value without remembering the magic string

Test plan

  • python3 -c "import ast; ast.parse(open('src/Config.py').read())" — syntax OK
  • Build the Linux PyInstaller artifact (python build.py --type=installer --platform=linux && pyinstaller epixnet.spec --distpath dist/linux) and verify ./dist/linux/EpixNet/EpixNet starts and creates ~/.local/share/EpixNet/
  • Verify source install (python3 epixnet.py) still works — should be unaffected since platform = 'source' takes a different branch

Severity note

This bug means every user who downloads EpixNet-linux-x64.tar.gz from GitHub Releases hits this on first launch, regardless of distro or display setup. Worth flagging for a point release once merged.

The Linux release workflow runs `build.py --platform=linux`
(.github/workflows/build-installers.yml:226), which writes
`platform = 'linux'` into src/Build.py. Config.getStartDir() only
matched 'libredesktop' or 'Linux' (capitalized), so the PyInstaller
binary raised RuntimeError("UNKNOWN PLATFORM: linux") during
Config.__init__ and the daemon never started.

Source installs were unaffected because they set platform = 'source'.

Add 'linux' (lowercase) to the accepted tuple so every official
Linux release tarball boots. Keeping 'libredesktop' and 'Linux' for
backwards compatibility with any out-of-tree builds.

Fixes #33
@MudDev MudDev mentioned this pull request May 18, 2026
@MudDev MudDev merged commit 050a200 into main May 18, 2026
3 checks passed
@MudDev MudDev deleted the fix/config-linux-platform branch May 18, 2026 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error on start

1 participant