From b62236fad6ddb54b7ba94890933c520357e4211c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=9F=E4=B8=8D=E6=87=82=E5=93=8E?= <1797499294@qq.com> Date: Fri, 3 Apr 2026 09:20:41 +0800 Subject: [PATCH] Add files via upload --- 启动.bat | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 启动.bat diff --git a/启动.bat b/启动.bat new file mode 100644 index 0000000..11eed9e --- /dev/null +++ b/启动.bat @@ -0,0 +1,48 @@ +@echo off +setlocal enabledelayedexpansion +title Launcher + +:: Skip dependency check if already installed before +if exist ".deps_installed" goto :launch + +:: Check if requirements.txt exists +if not exist "requirements.txt" ( + echo. + echo [WARNING] requirements.txt not found! + echo. + set /p "choice= Skip dependency install and launch directly? [Y/N]: " + echo. + if /i "!choice!"=="Y" goto :launch + echo Cancelled. + timeout /t 2 >nul + exit /b 1 +) + +:: requirements.txt found, ask to install +echo. +echo [OK] requirements.txt found. +echo. +set /p "install= Install dependencies? [Y/N]: " +echo. +if /i "!install!"=="Y" ( + echo Installing via Tsinghua mirror, please wait... + echo. + pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple + if errorlevel 1 ( + echo. + echo [ERROR] Installation failed! Check your network or pip config. + pause + exit /b 1 + ) + echo. + echo [OK] Done! Will skip this step on next launch. + echo. > .deps_installed + echo. +) else ( + echo. > .deps_installed +) + +:: Launch gui.py without command window +:launch +start "" pythonw gui.py +exit /b 0