livia-test/publish.bat
2025-03-28 14:31:53 +08:00

30 lines
734 B
Batchfile

setlocal enabledelayedexpansion
if "%~1"=="" (
echo Channel is required.
echo Usage: build.bat [channel] [version]
exit /b 1
)
if "%~2"=="" (
echo Version number is required.
echo Usage: build.bat [channel] [version]
exit /b 1
)
set "channel=%~1"
set "version=%~2"
set list=aStroke CereFlow
RMDIR /q /s %~dp0\livia\bin\
(for %%a in (%list%) do (
echo %%a
RMDIR /q /s %~dp0%%a\publish\
RMDIR /q /s %~dp0%%a\bin\
cd %~dp0%%a
dotnet publish -c Release --self-contained -r win-x64 -o .\publish
vpk pack --packId %%a --packVersion %version% --channel win-%channel% --packAuthors "AnImage" --outputDir d:\publish\%%a\ --icon %~dp0%%a\Resources\Images\%%a.ico --packDir ".\publish" --mainExe %%a.exe
))