feat: add windows x64 installer build with NSIS (#175)

This commit is contained in:
Gadfly 2024-06-23 05:36:45 +08:00
parent d3042bbe8d
commit 4eb068e949
No known key found for this signature in database
4 changed files with 100 additions and 0 deletions

View file

@ -21,3 +21,12 @@ dotnet publish ..\src\SourceGit.csproj -c Release -r win-x64 -o SourceGit -p:Pub
Remove-Item SourceGit\*.pdb -Force
Compress-Archive -Path SourceGit -DestinationPath "sourcegit_$version.win-x64.zip"
# check nsis exist
$nsisPath = Join-Path -Path ${env:ProgramFiles(x86)} -ChildPath "NSIS\makensis.exe"
if (-not (Test-Path $nsisPath)) {
Write-Host "NSIS not found, please install NSIS from https://nsis.sourceforge.io/Download or run 'choco install nsis -y'"
exit 1
}
& $nsisPath /DVERSION=$version .\build.windows.installer.nsi