重构:模块化 RRPP Lite 并更新入口

This commit is contained in:
RoyirinRosmontis
2026-09-16 23:13:28 +08:00
parent c37d8af821
commit 02d36c72f7
35 changed files with 2286 additions and 1079 deletions
+42
View File
@@ -0,0 +1,42 @@
@echo off
cd /d "%~dp0"
call ..\.venv\Scripts\python.exe -m nuitka --version >nul 2>&1
if errorlevel 1 (
echo Nuitka not installed. Run first:
echo ..\.venv\Scripts\python.exe -m pip install nuitka zstandard
pause
exit /b 1
)
rem Remove prior artifacts and the SCons incremental state before every build.
rem The constants blob is embedded outside normal dependency tracking, so reuse
rem can leave new UI strings and settings keys out of the executable.
rd /s /q "dist\main.build" 2>nul
rd /s /q "dist\main.dist" 2>nul
rd /s /q "dist\main.onefile-build" 2>nul
rem Use Nuitka COFF objects for embedded constants to avoid compiler cache reuse.
rem Zig C23 embed caches do not reliably track embedded blob changes.
set NUITKA_RESOURCE_MODE=coff_obj
rem Convert config.json version to Windows file-version segments (each <= 65535).
for /f %%v in ('..\.venv\Scripts\python.exe -c "import json;v=json.load(open('config.json',encoding='utf-8'))['version'];print(f'9999.{int(v[4:8])}.{int(v[8:12])}.0')"') do set "FILEVER=%%v"
call ..\.venv\Scripts\python.exe -m nuitka ^
--standalone --onefile ^
--enable-plugin=pyqt5 ^
--include-data-files=config.json=config.json ^
--windows-icon-from-ico=ico.ico ^
--windows-console-mode=disable ^
--company-name="Global Rosmanka Cloud Nexus Inc" ^
--product-name="R.R.P.P." ^
--file-version=%FILEVER% ^
--output-dir=dist ^
--output-filename="Royirin Rosmontis Private Proxy Lite.exe" ^
--assume-yes-for-downloads ^
main.py
if errorlevel 1 (
echo.
echo Build failed.
pause
exit /b 1
)
echo.
echo Build complete. Output: dist\Royirin Rosmontis Private Proxy Lite.exe
pause