增加自动化编译打包脚本

This commit is contained in:
2026-09-04 14:59:14 +08:00
parent f4eb881ba7
commit 011bc43621
6 changed files with 275 additions and 205 deletions
+30
View File
@@ -0,0 +1,30 @@
@echo off
chcp 65001 >nul
cd /d "%~dp0"
setlocal EnableDelayedExpansion
REM JieLi make / mkdir_win / rm / fixbat live in tools\utils, not in system PATH
set "PATH=%~dp0tools\utils;%PATH%"
REM USB burn: default WITH key. build.bat nokey to burn without key
set "JL_BURN_KEY=1"
set "MAKE_ARGS="
for %%A in (%*) do (
if /i "%%~A"=="key" (
set "JL_BURN_KEY=1"
) else if /i "%%~A"=="nokey" (
set "JL_BURN_KEY=0"
) else (
set "MAKE_ARGS=!MAKE_ARGS! %%~A"
)
)
if "!JL_BURN_KEY!"=="1" (
echo [build] USB burn: WITH key
) else (
echo [build] USB burn: NO key
)
make !MAKE_ARGS!
exit /b !errorlevel!