-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.bat
More file actions
36 lines (30 loc) · 948 Bytes
/
Copy pathstart.bat
File metadata and controls
36 lines (30 loc) · 948 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
@echo off
title AC Career GT Edition
cd /d "%~dp0"
echo.
echo ==========================================
echo AC CAREER GT EDITION
echo ==========================================
echo.
REM Stop any previously running Flask servers on port 5000
echo [1/3] Stoppen van oude servers...
for /f "tokens=5" %%a in ('netstat -ano 2^>nul ^| findstr ":5000 "') do (
taskkill /F /PID %%a >nul 2>&1
)
timeout /t 1 /nobreak >nul
REM Use venv Python if available, else create it
echo [2/3] Python omgeving controleren...
if not exist "venv\Scripts\python.exe" (
echo [!] venv niet gevonden, aanmaken met Python 3.12...
py -3.12 -m venv venv
venv\Scripts\pip install -r requirements.txt
)
set PYTHON=venv\Scripts\python.exe
set PYTHONNET_RUNTIME=coreclr
set PYTHONNET_RUNTIME_CONFIG=%~dp0pythonnet.runtimeconfig.json
echo [3/3] App starten...
echo.
echo Sluit dit venster of druk Ctrl+C om te stoppen.
echo.
%PYTHON% app.py
pause