1
0
Fork 0
mirror of https://github.com/fiso64/slsk-batchdl.git synced 2024-12-22 22:42:41 +00:00
slsk-batchdl/publish.bat

23 lines
936 B
Batchfile
Raw Permalink Normal View History

2023-10-08 20:41:44 +00:00
@echo off
setlocal
2024-12-20 22:56:44 +00:00
set FRAMEWORK=net6.0
2024-08-11 14:53:11 +00:00
2023-10-08 20:41:44 +00:00
if not exist slsk-batchdl\bin\zips mkdir slsk-batchdl\bin\zips
2024-12-20 22:56:44 +00:00
call :publish_and_zip win-x86 false sldl_win-x86.zip
call :publish_and_zip win-x86 true sldl_win-x86_self-contained.zip
call :publish_and_zip linux-x64 true sldl_linux-x64.zip
call :publish_and_zip linux-arm true sldl_linux-arm.zip
2023-10-08 20:41:44 +00:00
2024-12-20 22:56:44 +00:00
endlocal
exit /b
2024-12-15 16:23:32 +00:00
2024-12-20 22:56:44 +00:00
:publish_and_zip
dotnet publish -c Release -r %1 -p:PublishSingleFile=true -p:PublishTrimmed=%2 -p:DefineConstants=WINDOWS --self-contained=%2
if exist slsk-batchdl\bin\Release\%FRAMEWORK%\%1\publish\*.pdb del /F /Q slsk-batchdl\bin\Release\%FRAMEWORK%\%1\publish\*.pdb
if exist slsk-batchdl\bin\zips\%3 del /F /Q slsk-batchdl\bin\zips\%3
powershell.exe -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::CreateFromDirectory('slsk-batchdl\bin\Release\%FRAMEWORK%\%1\publish', 'slsk-batchdl\bin\zips\%3'); }"
exit /b
2023-10-08 20:41:44 +00:00