Files
swingmusic-extended/run.py
T
Tomas Dvorak 38f1981283 Move backend files to root level for cleaner GitHub display
- Move all backend files from swingmusic/ to root level
- Backend files now display directly on GitHub repository page
- Keep client applications as submodules (swingmusic-android, swingmusic-desktop, swingmusic-webclient)
- Update README to reflect new structure (no cd swingmusic needed)
- Cleaner, more professional GitHub repository layout

Files moved to root:
- src/ (main source code)
- pyproject.toml, requirements.txt, run.py
- swingmusic.spec, uv.lock, version.txt
- services/

Result: GitHub shows backend files directly while maintaining organized structure
2026-03-17 22:37:49 +01:00

28 lines
890 B
Python

# Launcher script
import sys
import zipfile
import multiprocessing
from pathlib import Path
import swingmusic.__main__ as app
if __name__ == "__main__":
# Fixed: freeze_support() must be called immediately to prevent
# recursive process spawning and ArgumentParser errors on Windows EXE.
multiprocessing.freeze_support()
# this entry should only be used by pyinstaller.
# add freeze support here as pyinstaller uses this entry
if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"):
# INFO: extract client.zip to sys._MEIPASS
with zipfile.ZipFile(sys._MEIPASS + "/client.zip", "r") as zip_ref:
zip_ref.extractall(sys._MEIPASS)
client = Path(sys._MEIPASS) / "client"
client_str = str(client)
sys.argv.extend(["--client", client_str])
sys.orig_argv.extend(["--client", client_str])
app.run()