Title: Linux build: fix resource_path resolution for frozen build + auto build script
Hi, I tested basiliskLLM on Linux and found a resource path issue in frozen builds.
Problem
- Runtime error:
Failed to load sound: .../dist/basilisk/res/sounds/progress.wav
- In Linux cx_Freeze build, resources are in
dist/res/..., while code expected a different path in some layouts.
What I changed
basilisk/global_vars.py
- Added
_resolve_resource_path() that checks multiple valid locations and picks the first existing one:
<base_path>/res
<base_path>/_internal/basilisk/res (PyInstaller-style layout)
<package_dir>/res (source run)
- Added helper build script
scripts/update_and_build_from_github.py
- Clones/updates repo and builds automatically on Linux using
uv (or pip/venv fallback).
Result
- Rebuild completed successfully on Linux.
progress.wav resolved correctly from dist/res/sounds/progress.wav.
- App starts and sound loading error is gone.
Patch
- I attached a patch generated from commit:
4a0c023 Fix frozen resource path and add GitHub auto-build script
If you want, I can split this into 2 separate commits (bugfix + build tooling).
Title: Linux build: fix resource_path resolution for frozen build + auto build script
Hi, I tested basiliskLLM on Linux and found a resource path issue in frozen builds.
Problem
Failed to load sound: .../dist/basilisk/res/sounds/progress.wavdist/res/..., while code expected a different path in some layouts.What I changed
basilisk/global_vars.py_resolve_resource_path()that checks multiple valid locations and picks the first existing one:<base_path>/res<base_path>/_internal/basilisk/res(PyInstaller-style layout)<package_dir>/res(source run)scripts/update_and_build_from_github.pyuv(or pip/venv fallback).Result
progress.wavresolved correctly fromdist/res/sounds/progress.wav.Patch
4a0c023 Fix frozen resource path and add GitHub auto-build scriptIf you want, I can split this into 2 separate commits (bugfix + build tooling).