diff --git a/build-dist-windows.sh b/build-dist-windows.sh index 2f7ea11..4e4b500 100644 --- a/build-dist-windows.sh +++ b/build-dist-windows.sh @@ -348,6 +348,11 @@ mkdir -p "$DIST_DIR/data" "$DIST_DIR/logs" find "$APP_DIR" -name "*.map" -delete 2>/dev/null || true find "$APP_DIR" -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true +# Pre-compile Python bytecode for faster startup +echo " Pre-compiling Python bytecode..." +python -m compileall -b -q "$APP_DIR/src" 2>/dev/null || true +python -m compileall -b -q "$SITE_PACKAGES" 2>/dev/null || true + # ── Create launcher ────────────────────────────────────────── echo "[8b/9] Creating launcher and packaging..."