5d0238260f
- 新增 lib/license/license_service.dart:读取 exe 同级 license/*.lic,按算法由本机 MAC 计算期望授权串比对 - 算法:MAC 去分隔符 → A=01..Z=26(数字 00..09)→ 末尾加 26 → 整串倒序 - 未授权时「导出 SVG / PNG」置灰,并在导出入口二次拦截 - 关于页:显示授权状态、本机 MAC、授权申请邮箱 liuyu65@126.com,并可「提交授权申请」(唤起邮件客户端发送 MAC+发件人信息) - 新增 license/ 目录(含说明);构建脚本把 license/ 复制到 dist/ - 新增 tools/keygen(Win32 图形界面 keygen.exe + 构建脚本)用于生成 .lic - 版本 1.1.1+3;新增授权算法单元测试;重新构建 dist
40 lines
1.5 KiB
Batchfile
40 lines
1.5 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 Copy the license folder (so .lic files live next to the exe).
|
|
if exist license xcopy /e /i /y /q "license\*" "dist\license\" >nul
|
|
|
|
echo.
|
|
echo Build OK: dist\sequence_diagram.exe
|
|
endlocal
|