@echo off rem ================================================================ rem PICCREATE - Python Virtual Environment einrichten (Windows) rem ================================================================ setlocal rem nicht das Python aus einer alten .venv nehmen set "PICCREATE_PYTHON=" if exist "%~dp0..\.venv\Scripts\python.exe" goto :installed rem Python fuer das Anlegen der .venv suchen for /f "delims=" %%P in ('py -3 -c "import sys; print(sys.executable)" 2^>nul') do set "PICCREATE_PYTHON=%%P" if not defined PICCREATE_PYTHON for /f "delims=" %%P in ('python -c "import sys; print(sys.executable)" 2^>nul') do set "PICCREATE_PYTHON=%%P" if not defined PICCREATE_PYTHON ( echo Python 3 nicht gefunden. Bitte installieren von https://www.python.org echo oder mit: winget install Python.Python.3.13 exit /b 1 ) call "%~dp0setenv.bat" || exit /b 1 echo Initialisiere Python virtual environment... "%PICCREATE_PYTHON%" -m venv "%PICCREATE%\.venv" --upgrade-deps if errorlevel 1 ( rmdir /s /q "%PICCREATE%\.venv" 2>nul echo Fehlgeschlagen. exit /b 1 ) echo Erfolgreich. echo Installiere erforderliche Python Packages... "%PICCREATE%\.venv\Scripts\pip" install -r "%PICCREATE%\requirements.txt" -q || exit /b 1 echo Erfolgreich. goto :browser :installed call "%~dp0setenv.bat" || exit /b 1 echo Erforderliche Python Packages bereits installiert! :browser rem Browser fuer webscan if exist "%LOCALAPPDATA%\ms-playwright\chromium*" ( echo Playwright Browser bereits installiert! exit /b 0 ) echo Installiere Playwright Browser... "%PICCREATE%\.venv\Scripts\playwright" install chromium || exit /b 1 echo Erfolgreich. exit /b 0