Restructure app-desktop as self-contained package, add PyInstaller build

Consolidates everything the desktop app depends on into app-desktop/ so it
packages cleanly as a standalone Windows exe:

- app-desktop-macos/ -> app-desktop/src/ (drop macOS-only naming, app now
  targets Windows via PyInstaller too)
- remote-server/ws_server.py and app-presets/ moved into app-desktop/src/
  (both were exclusive dependencies of main.py/presets.py) — fixes a
  PyInstaller "missing module" error for ws_server that only surfaced once
  packaging was attempted, since its old location wasn't on the analyzer's
  search path
- .venv relocated into app-desktop/src/ alongside the code it serves
- run.py moved into src/, path logic simplified now that it's co-located
  with main.py instead of bridging from the repo root
- Deleted app/, server/ — stale __pycache__-only fossils from prior reorgs
- .gitignore: added missing .venv/ entry (was only covering venv/, a
  different name — the real folder was never actually ignored) and
  app-desktop/build|dist/ for PyInstaller output

presets.py: added a frozen-vs-source branch. Running from source is
unchanged (app-presets/ next to the code). A packaged exe can't write to
Program Files, so it uses %APPDATA%\VirtualController\ instead — standard
Windows convention. First launch on a machine with no AppData presets yet
seeds from presets.json bundled into the exe (PyInstaller --add-data,
baked into VirtualController.spec), so a fresh install starts with real
presets instead of empty; every launch after that only touches AppData.

Verified: exe builds clean (no missing-module warnings), launches with a
real window, and a clean first-launch correctly seeds AppData from the
bundled presets.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Paul Lipscomb
2026-07-31 18:50:35 -05:00
parent 60c8255c2d
commit a3e6f6415f
28 changed files with 79 additions and 14 deletions
+2 -1
View File
@@ -41,7 +41,8 @@
"Bash(awk '/int REAPERAPI_LoadAPI/,0' /Users/p4piwabl0/Desktop/projects/virtual-controller-clean/extension-reaper-macos/vendor/reaper-sdk/sdk/reaper_plugin_functions.h)",
"Bash(grep -n \"{NULL, NULL}\")",
"Bash(ls -la \"/Applications/REAPER.app/Contents/MacOS/\" 2>&1 | head -5 *)",
"Read(//Applications/REAPER.app/Contents/MacOS/**)"
"Read(//Applications/REAPER.app/Contents/MacOS/**)",
"Bash(src/.venv/Scripts/python.exe -m PyInstaller --name VirtualController --onedir --windowed --distpath dist --workpath build --specpath . --add-data \"src/app-presets/presets.json;app-presets\" src/main.py)"
]
}
}