换位置
This commit is contained in:
+3
-3
@@ -14,10 +14,10 @@ rem Run source modules through the new entrypoints package.
|
||||
cd /d "%ROOT%"
|
||||
set "PYTHONPATH=%ROOT%\src;%PYTHONPATH%"
|
||||
|
||||
rem Prefer packaged main.exe when present.
|
||||
rem Prefer packaged ServerManager.exe when present.
|
||||
set "SM_MAIN="
|
||||
if defined SERVER_MANAGER_MAIN if exist "%SERVER_MANAGER_MAIN%" set "SM_MAIN=%SERVER_MANAGER_MAIN%"
|
||||
if not defined SM_MAIN if exist "%ROOT%\src\dist\main\main.exe" set "SM_MAIN=%ROOT%\src\dist\main\main.exe"
|
||||
if not defined SM_MAIN if exist "%ROOT%\src\dist\ServerManager\ServerManager.exe" set "SM_MAIN=%ROOT%\src\dist\ServerManager\ServerManager.exe"
|
||||
|
||||
rem No arguments enters interactive CLI mode.
|
||||
if "%~1"=="" goto :run_interactive
|
||||
@@ -102,7 +102,7 @@ echo.
|
||||
echo More help: python -m entrypoints.cli --help
|
||||
if defined SM_MAIN (
|
||||
echo.
|
||||
echo Packaged main: %SM_MAIN%
|
||||
echo Packaged program: %SM_MAIN%
|
||||
)
|
||||
goto :end
|
||||
|
||||
|
||||
+3
-3
@@ -20,10 +20,10 @@ export PYTHONPATH="$ROOT/src${PYTHONPATH:+:$PYTHONPATH}"
|
||||
# 默认以项目根目录作为服务器根目录;部署到其它项目时可通过 SERVER_MANAGER_ROOT 覆盖。
|
||||
SERVER_ROOT="${SERVER_MANAGER_ROOT:-$ROOT}"
|
||||
|
||||
# 优先使用 PyInstaller 打包的 main(Linux):环境变量 SERVER_MANAGER_MAIN,或常见构建路径 src/dist/main/main
|
||||
# 优先使用 PyInstaller 打包的 ServerManager(Linux):环境变量 SERVER_MANAGER_MAIN,或常见构建路径 src/dist/ServerManager/ServerManager
|
||||
SM_MAIN="${SERVER_MANAGER_MAIN:-}"
|
||||
if [[ -z "$SM_MAIN" ]] && [[ -x "$ROOT/src/dist/main/main" ]]; then
|
||||
SM_MAIN="$ROOT/src/dist/main/main"
|
||||
if [[ -z "$SM_MAIN" ]] && [[ -x "$ROOT/src/dist/ServerManager/ServerManager" ]]; then
|
||||
SM_MAIN="$ROOT/src/dist/ServerManager/ServerManager"
|
||||
fi
|
||||
|
||||
# 颜色输出
|
||||
|
||||
Reference in New Issue
Block a user