mirror of
https://github.com/2dust/v2rayN.git
synced 2025-08-30 14:56:19 +00:00
42 lines
No EOL
787 B
PowerShell
42 lines
No EOL
787 B
PowerShell
param (
|
|
[Parameter()]
|
|
[ValidateNotNullOrEmpty()]
|
|
[string]
|
|
$OutputPath = '.\bin\v2rayN'
|
|
)
|
|
|
|
Write-Host 'Building'
|
|
|
|
dotnet publish `
|
|
.\v2rayN\v2rayN.csproj `
|
|
-c Release `
|
|
-r win-x64 `
|
|
--self-contained false `
|
|
-p:PublishReadyToRun=false `
|
|
-p:PublishSingleFile=true `
|
|
-o "$OutputPath\win-x64"
|
|
|
|
dotnet publish `
|
|
.\v2rayN.Desktop\v2rayN.Desktop.csproj `
|
|
-c Release `
|
|
-r linux-x64 `
|
|
--self-contained true `
|
|
-p:PublishReadyToRun=false `
|
|
-p:PublishSingleFile=true `
|
|
-o "$OutputPath\linux-x64"
|
|
|
|
|
|
if ( -Not $? ) {
|
|
exit $lastExitCode
|
|
}
|
|
|
|
if ( Test-Path -Path .\bin\v2rayN ) {
|
|
rm -Force "$OutputPath\win-x64\*.pdb"
|
|
rm -Force "$OutputPath\linux-x64\*.pdb"
|
|
}
|
|
|
|
Write-Host 'Build done'
|
|
|
|
ls $OutputPath
|
|
7z a v2rayN.zip $OutputPath
|
|
exit 0 |