04311cdc40
- 对话框缩放改用「放大 SizedBox + FittedBox」,布局与绘制同步放大,背景与内容同尺寸 (修复 100% 显示比例大屏下文字超出弹窗背景的问题) - 安全:构建只复制 license/*.lic 到 dist,绝不打包任何说明文档 - 算法说明从 license/README.md 移到仅仓库可见的 docs/LICENSE-GUIDE.md - 移除 dist 中已误打包的 README;license/ 仅保留 .gitkeep;重新构建 dist
42 lines
1.6 KiB
Batchfile
42 lines
1.6 KiB
Batchfile
@echo off
|
|
rem Build the Windows release and copy the runnable bundle to .\dist\
|
|
rem (ASCII only: .bat files are read with the OEM codepage.)
|
|
setlocal
|
|
|
|
set FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
|
|
set PUB_HOSTED_URL=https://pub.flutter-io.cn
|
|
|
|
rem NOTE: avoid `if (...)` blocks here -- %PATH% contains parentheses
|
|
rem (e.g. "Program Files (x86)") which break cmd block parsing.
|
|
set FLUTTER_BIN=D:\flutter\bin
|
|
if not exist D:\flutter\bin\flutter.bat set FLUTTER_BIN=E:\flutter\bin
|
|
set PATH=%FLUTTER_BIN%;%PATH%
|
|
|
|
set FLUTTER_CMAKE_PATH=
|
|
if exist D:\cmake-lv\bin\cmk2.exe set FLUTTER_CMAKE_PATH=D:\cmake-lv\bin\cmk2.exe
|
|
if exist E:\cmake-lv\bin\cmk2.exe set FLUTTER_CMAKE_PATH=E:\cmake-lv\bin\cmk2.exe
|
|
if "%FLUTTER_CMAKE_PATH%"=="" echo [warn] renamed CMake not found: D:\cmake-lv\bin\cmk2.exe
|
|
if "%FLUTTER_CMAKE_PATH%"=="" echo [warn] if a transparent-encryption DLP is installed, run scripts\setup-cmake.bat first.
|
|
|
|
cd /d "%~dp0.."
|
|
rem --no-tree-shake-icons: bundle the full Material icon font so newly used
|
|
rem icons are always present (avoids stale/blank icons after incremental builds).
|
|
call flutter build windows --release --no-tree-shake-icons
|
|
if errorlevel 1 (
|
|
echo Build failed.
|
|
exit /b 1
|
|
)
|
|
|
|
if exist dist rmdir /s /q dist
|
|
mkdir dist
|
|
xcopy /e /i /y /q "build\windows\x64\runner\Release\*" "dist\" >nul
|
|
|
|
rem Create an empty license folder next to the exe and copy ONLY *.lic files.
|
|
rem IMPORTANT: never ship any documentation (the algorithm must stay private).
|
|
if not exist "dist\license" mkdir "dist\license"
|
|
if exist "license\*.lic" xcopy /y /q "license\*.lic" "dist\license\" >nul
|
|
|
|
echo.
|
|
echo Build OK: dist\sequence_diagram.exe
|
|
endlocal
|