diff --git a/project/run_windows.bat b/project/run_windows.bat index c8fde65..13937e5 100644 --- a/project/run_windows.bat +++ b/project/run_windows.bat @@ -1,8 +1,26 @@ @echo off -echo Setting up Python virtual environment... +echo Setting up arcade games... + +REM Download requirements.txt and arcade_games.py +echo Downloading files... +powershell -Command "Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/Coolbossco/Coolbossco/main/project/requirements.txt' -OutFile 'requirements.txt'" +powershell -Command "Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/Coolbossco/Coolbossco/main/project/arcade_games.py' -OutFile 'arcade_games.py'" + +REM Check if downloads were successful +if not exist requirements.txt ( + echo Failed to download requirements.txt + pause + exit /b 1 +) +if not exist arcade_games.py ( + echo Failed to download arcade_games.py + pause + exit /b 1 +) REM Check if venv exists if not exist venv ( + echo Creating virtual environment... python -m venv venv echo Virtual environment created. ) else ( @@ -23,6 +41,10 @@ python arcade_games.py REM Deactivate virtual environment deactivate +REM Clean up downloaded files +del requirements.txt +del arcade_games.py + REM Keep window open if there's an error if %ERRORLEVEL% neq 0 ( echo An error occurred. Press any key to exit.