diff --git a/build/build-dist-windows.sh b/build/build-dist-windows.sh index a2f64bc..48f3f43 100644 --- a/build/build-dist-windows.sh +++ b/build/build-dist-windows.sh @@ -178,10 +178,16 @@ echo "[6/9] Downloading Windows dependencies..." WHEEL_DIR="$BUILD_DIR/win-wheels" mkdir -p "$WHEEL_DIR" -# Core dependencies (cross-platform, should have win_amd64 wheels) +# Core dependencies (cross-platform, should have win_amd64 wheels). +# KEEP IN SYNC with server/pyproject.toml [project.dependencies] — this +# list duplicates it because cross-build on Linux can't invoke `pip install +# ` against pyproject.toml with a Windows target. Missing entries +# ship a broken installer that silently fails under pythonw.exe (no +# traceback visible to the user). Audit after every pyproject.toml edit. DEPS=( "fastapi>=0.115.0" "uvicorn[standard]>=0.32.0" + "cryptography>=42.0.0" "httpx>=0.27.2" "mss>=9.0.2" "numpy>=2.1.3" @@ -201,6 +207,7 @@ DEPS=( "aiomqtt>=2.0.0" "openrgb-python>=0.2.15" "opencv-python-headless>=4.8.0" + "just-playback>=0.1.7" ) # Windows-only deps @@ -291,9 +298,10 @@ compile_and_strip_sources "$SITE_PACKAGES" "python" echo " Verifying required submodules exist after cleanup..." for required in \ "numpy/linalg" "numpy/lib" "numpy/matrixlib" "numpy/ma" \ - "zeroconf/_services"; do + "zeroconf/_services" \ + "cryptography" "cffi" "just_playback"; do if [ ! -d "$SITE_PACKAGES/$required" ] && [ ! -f "$SITE_PACKAGES/$required.py" ] && [ ! -f "$SITE_PACKAGES/$required.pyc" ]; then - echo " ERROR: $required missing from site-packages — cleanup_site_packages removed something required. Aborting." + echo " ERROR: $required missing from site-packages — either cleanup_site_packages removed something required, or DEPS is out of sync with pyproject.toml. Aborting." exit 1 fi done @@ -328,6 +336,12 @@ cd /d "%~dp0" set PYTHONPATH=%~dp0app\src set LEDGRAB_CONFIG_PATH=%~dp0app\config\default_config.yaml +:: Tcl/Tk ship under python\ but Tk's default search path is +:: \..\lib\tcl8.6. Point it at the right location so +:: the screen-overlay feature (tkinter) can start without errors. +set TCL_LIBRARY=%~dp0python\tcl8.6 +set TK_LIBRARY=%~dp0python\tk8.6 + :: Create data directory if missing if not exist "%~dp0data" mkdir "%~dp0data" if not exist "%~dp0logs" mkdir "%~dp0logs" diff --git a/build/build-dist.ps1 b/build/build-dist.ps1 index 0f6cb60..30ade02 100644 --- a/build/build-dist.ps1 +++ b/build/build-dist.ps1 @@ -208,6 +208,12 @@ cd /d "%~dp0" set PYTHONPATH=%~dp0app\src set LEDGRAB_CONFIG_PATH=%~dp0app\config\default_config.yaml +:: Tcl/Tk ship under python\ but Tk's default search path is +:: \..\lib\tcl8.6. Point it at the right location so +:: the screen-overlay feature (tkinter) can start without errors. +set TCL_LIBRARY=%~dp0python\tcl8.6 +set TK_LIBRARY=%~dp0python\tk8.6 + :: Create data directory if missing if not exist "%~dp0data" mkdir "%~dp0data" if not exist "%~dp0logs" mkdir "%~dp0logs" diff --git a/build/installer.nsi b/build/installer.nsi index 73df191..550d126 100644 --- a/build/installer.nsi +++ b/build/installer.nsi @@ -98,6 +98,12 @@ Section "!${APPNAME} (required)" SecCore RMDir /r "$INSTDIR\app" RMDir /r "$INSTDIR\scripts" Delete "$INSTDIR\LedGrab.bat" + ; Legacy leftovers from the wled_controller-era install. The current + ; build does not ship debug.bat, but upgrades from older versions left + ; one behind with a stale `-m wled_controller` command that gives a + ; misleading ModuleNotFoundError when run. Remove it on upgrade. + Delete "$INSTDIR\debug.bat" + Delete "$INSTDIR\debug.log" ; Copy the entire portable build File /r "LedGrab\python" @@ -187,6 +193,8 @@ Section "Uninstall" RMDir /r "$INSTDIR\app" RMDir /r "$INSTDIR\scripts" Delete "$INSTDIR\LedGrab.bat" + Delete "$INSTDIR\debug.bat" + Delete "$INSTDIR\debug.log" Delete "$INSTDIR\uninstall.exe" ; Remove logs (but keep data/)