mirror of
https://github.com/netchx/netch.git
synced 2026-05-11 23:45:06 +08:00
Update build.ps1
This commit is contained in:
37
build.ps1
37
build.ps1
@@ -22,24 +22,24 @@ param (
|
||||
$PublishSingleFile = $True
|
||||
)
|
||||
|
||||
Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent)
|
||||
Push-Location (Split-Path $MyInvocation.MyCommand.Path -Parent)
|
||||
|
||||
if (Test-Path -Path $OutputPath) {
|
||||
Remove-Item -Recurse -Force $OutputPath
|
||||
if (Test-Path -Path "$OutputPath") {
|
||||
Remove-Item -Recurse -Force "$OutputPath"
|
||||
}
|
||||
|
||||
if (Test-Path -Path $OutputPath -IsValid) {
|
||||
New-Item -ItemType Directory -Name $OutputPath | Out-Null
|
||||
if (Test-Path -Path "$OutputPath" -IsValid) {
|
||||
New-Item -ItemType Directory -Name "$OutputPath" | Out-Null
|
||||
}
|
||||
|
||||
.\deps.ps1 $OutputPath
|
||||
.\deps.ps1 "$OutputPath"
|
||||
if ( -Not $? ) { exit $lastExitCode }
|
||||
|
||||
.\other\build.ps1
|
||||
if ( -Not $? ) { exit $lastExitCode }
|
||||
|
||||
if (Test-Path .\other\release) {
|
||||
Copy-Item -Recurse -Force .\other\release\* $OutputPath\bin
|
||||
if (Test-Path '.\other\release') {
|
||||
Copy-Item -Recurse -Force '.\other\release\*' "$OutputPath\bin"
|
||||
}
|
||||
|
||||
Write-Host
|
||||
@@ -48,12 +48,12 @@ dotnet publish `
|
||||
-c $Configuration `
|
||||
-r 'win-x64' `
|
||||
-p:Platform='x64' `
|
||||
-p:PublishSingleFile=$PublishSingleFile `
|
||||
-p:SelfContained=$SelfContained `
|
||||
-p:PublishTrimmed=$SelfContained `
|
||||
-p:PublishReadyToRun=$PublishReadyToRun `
|
||||
-o $OutputPath `
|
||||
Netch\Netch.csproj
|
||||
-p:PublishSingleFile="$PublishSingleFile" `
|
||||
-p:SelfContained="$SelfContained" `
|
||||
-p:PublishTrimmed="$SelfContained" `
|
||||
-p:PublishReadyToRun="$PublishReadyToRun" `
|
||||
-o "$OutputPath" `
|
||||
'.\Netch\Netch.csproj'
|
||||
if ( -Not $? ) { exit $lastExitCode }
|
||||
|
||||
Write-Host
|
||||
@@ -61,14 +61,15 @@ Write-Host 'Building Redirector'
|
||||
msbuild `
|
||||
-property:Configuration=Release `
|
||||
-property:Platform=x64 `
|
||||
Redirector\Redirector.vcxproj
|
||||
'.\Redirector\Redirector.vcxproj'
|
||||
if ( -Not $? ) { exit $lastExitCode }
|
||||
|
||||
Copy-Item -Force Redirector\bin\Redirector.bin $OutputPath\bin
|
||||
Copy-Item -Force 'Redirector\bin\Redirector.bin' "$OutputPath\bin"
|
||||
|
||||
if ( $Configuration.Equals('Release') ) {
|
||||
Remove-Item -Force $OutputPath\*.pdb
|
||||
Remove-Item -Force $OutputPath\*.xml
|
||||
Remove-Item -Force "$OutputPath\*.pdb"
|
||||
Remove-Item -Force "$OutputPath\*.xml"
|
||||
}
|
||||
|
||||
Pop-Location
|
||||
exit 0
|
||||
Reference in New Issue
Block a user