-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlauncher.bat
More file actions
48 lines (42 loc) · 1.36 KB
/
launcher.bat
File metadata and controls
48 lines (42 loc) · 1.36 KB
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
38
39
40
41
42
43
44
45
46
47
48
@echo off
setlocal enabledelayedexpansion
set "SCRIPT_DIR=%~dp0"
set "PYTHON_DIR=%SCRIPT_DIR%python_embedded"
set "PYTHON_EXE=%PYTHON_DIR%\python.exe"
:: Handle commands
if /i "%~1"=="setup" (
echo Running full setup...
call "%SCRIPT_DIR%install.bat"
goto :eof
)
if /i "%~1"=="help" (
echo.
echo Auto Portable Python Deployer - Launcher
echo =========================================
echo.
echo Usage:
echo launcher.bat Launch the Deployer GUI
echo launcher.bat cli [args] Generate packages from command line
echo launcher.bat setup Run full install/setup
echo launcher.bat help Show this help
echo.
echo CLI Examples:
echo launcher.bat cli --name MyApp --python 3.12
echo launcher.bat cli --name WebServer --python 3.13 -r requirements.txt --git
echo launcher.bat cli --name MLProject --python 3.10 -ri "torch,numpy" --no-tkinter
echo launcher.bat cli --list-versions
echo launcher.bat cli --help
echo.
goto :eof
)
:: Check if Python is installed
if not exist "%PYTHON_EXE%" (
echo Python not found. Running first-time setup...
echo.
call "%SCRIPT_DIR%install.bat" %*
goto :eof
)
:: Launch (GUI or CLI depending on arguments)
cd /d "%SCRIPT_DIR%"
"%PYTHON_EXE%" "%SCRIPT_DIR%deployer_app.py" %*
endlocal