-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlaunch.bat
More file actions
37 lines (29 loc) · 749 Bytes
/
launch.bat
File metadata and controls
37 lines (29 loc) · 749 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
37
@echo off
REM Set cmd encoding to UTF-8
chcp 65001 >nul
REM Set Python interpreter path
set PYTHON_EXEC=runtime\python.exe
REM Get the first argument as the script path
set SCRIPT=%1
REM Check if the parameter is provided
if "%SCRIPT%"=="" (
echo Please provide the script file as the first parameter.
pause
exit /b
)
REM Check if the Python interpreter exists
if not exist %PYTHON_EXEC% (
echo %PYTHON_EXEC% not found, please ensure the path is correct.
pause
exit /b
)
REM Check if the script exists
if not exist %SCRIPT% (
echo Script %SCRIPT% not found, please ensure the path is correct.
pause
exit /b
)
REM Execute the Python script
%PYTHON_EXEC% %SCRIPT%
REM Wait for user to view the output
pause