@echo off setlocal EnableExtensions pushd "%~dp0" echo Sync Python runtime deps to runner.dist (skip full Nuitka rebuild) ... if not exist "runner.dist\api_runner.exe" ( echo ERROR: runner.dist\api_runner.exe not found. echo Run build_runner.bat once first, then use this for dependency updates. popd exit /b 1 ) where py >nul 2>&1 if %errorlevel%==0 ( set "PYTHON=py -3.11" ) else ( set "PYTHON=python" ) for /f "delims=" %%i in ('%PYTHON% -c "import site; print(site.getsitepackages()[0])"') do set "SITE=%%i" if not exist "%SITE%\sympy" ( echo ERROR: sympy not installed. Run: python -m pip install -r requirements.txt popd exit /b 1 ) echo Copy sympy from %SITE% ... xcopy /E /I /Y /Q "%SITE%\sympy" "runner.dist\sympy\" >nul if exist "%SITE%\sympy-*.dist-info" ( for /d %%d in ("%SITE%\sympy-*.dist-info") do xcopy /E /I /Y /Q "%%d" "runner.dist\%%~nxd\" >nul ) if exist "%SITE%\mpmath" ( echo Copy mpmath ... xcopy /E /I /Y /Q "%SITE%\mpmath" "runner.dist\mpmath\" >nul if exist "%SITE%\mpmath-*.dist-info" ( for /d %%d in ("%SITE%\mpmath-*.dist-info") do xcopy /E /I /Y /Q "%%d" "runner.dist\%%~nxd\" >nul ) ) echo SUCCESS: sympy/mpmath synced to runner.dist echo Offline runtime ready. Next: npm run electron:build popd exit /b 0 endlocal