35 lines
778 B
Batchfile
35 lines
778 B
Batchfile
@echo off
|
|
REM L Language 安装包构建脚本
|
|
REM 前置条件: 已编译 l_lang.exe (cd build && mingw32-make -j4)
|
|
|
|
set VERSION=0.6.0
|
|
set NSIS=D:\Program Files (x86)\NSIS\Bin\makensis.exe
|
|
|
|
echo === 构建 L Language %VERSION% 安装包 ===
|
|
echo.
|
|
|
|
REM 1. 确保编译器已编译
|
|
if not exist "build\l_lang.exe" (
|
|
echo 错误: build\l_lang.exe 不存在,请先编译
|
|
exit /b 1
|
|
)
|
|
|
|
REM 2. 复制 LICENSE 到 scripts 目录
|
|
copy LICENSE scripts\LICENSE.txt >nul 2>&1
|
|
|
|
REM 3. 添加 BOM 并构建
|
|
cd scripts
|
|
(
|
|
echo // BOM marker
|
|
) > _bom.tmp
|
|
copy /b _bom.tmp + installer.nsi installer_bom.nsi >nul
|
|
del _bom.tmp
|
|
|
|
"%NSIS%" -DVERSION=%VERSION% installer_bom.nsi
|
|
del installer_bom.nsi
|
|
cd ..
|
|
|
|
echo.
|
|
echo === 完成 ===
|
|
echo 安装包: build\L-Language-%VERSION%-setup.exe
|