Skip to content

Commit

Permalink
Update run_windows.bat
Browse files Browse the repository at this point in the history
  • Loading branch information
Coolbossco authored Dec 10, 2024
1 parent 8eb925e commit b1d365d
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion project/run_windows.bat
Original file line number Diff line number Diff line change
@@ -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 (
Expand All @@ -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.
Expand Down

0 comments on commit b1d365d

Please sign in to comment.