@echo off rem Called by the Windows launchers to create and validate the project environment. set "PYTHON_EXE=%~dp0.venv\Scripts\python.exe" if not exist "%PYTHON_EXE%" ( echo Creating the Galemu Python environment... python -m venv "%~dp0.venv" if errorlevel 1 ( echo Could not create .venv. Install Python 3.12 or newer and try again. exit /b 1 ) ) "%PYTHON_EXE%" -c "from importlib.metadata import version; raise SystemExit(0 if version('z80-python') == '0.3.0' else 1)" >nul 2>&1 if not errorlevel 1 exit /b 0 echo Installing Galemu and its required display dependencies... "%PYTHON_EXE%" -m pip install --disable-pip-version-check -e ".[display]" if errorlevel 1 ( echo Could not install the required dependencies. exit /b 1 ) "%PYTHON_EXE%" -c "from importlib.metadata import version; raise SystemExit(0 if version('z80-python') == '0.3.0' else 1)" >nul 2>&1 if errorlevel 1 ( echo Galemu requires z80-python version 0.3.0, but it could not be installed. exit /b 1 ) exit /b 0