From 6092c63df4b09c5fdad3022b1a43728cea63a74c Mon Sep 17 00:00:00 2001 From: David Sparer Date: Mon, 30 Jul 2018 08:03:40 -0500 Subject: [PATCH] fix zipping symbols --- Tools/postbuild_mremotev1.ps1 | 1 + Tools/zip_portable_files.ps1 | 15 +++++++++------ Tools/zip_symbols.ps1 | 8 ++++---- mRemoteV1/mRemoteV1.csproj | 4 ++-- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/Tools/postbuild_mremotev1.ps1 b/Tools/postbuild_mremotev1.ps1 index a2aa5f146..7129950d1 100644 --- a/Tools/postbuild_mremotev1.ps1 +++ b/Tools/postbuild_mremotev1.ps1 @@ -46,4 +46,5 @@ Format-Table -AutoSize -Wrap -InputObject @{ & "$PSScriptRoot\tidy_files_for_release.ps1" -TargetDir $TargetDir -ConfigurationName $ConfigurationName & "$PSScriptRoot\sign_binaries.ps1" -TargetDir $TargetDir -CertificatePath $CertificatePath -CertificatePassword $CertificatePassword -ConfigurationName $ConfigurationName -Exclude $ExcludeFromSigning & "$PSScriptRoot\verify_binary_signatures.ps1" -TargetDir $TargetDir -ConfigurationName $ConfigurationName -CertificatePath $CertificatePath +& "$PSScriptRoot\zip_symbols.ps1" -SolutionDir $SolutionDir -TargetDir $TargetDir -ConfigurationName $ConfigurationName & "$PSScriptRoot\zip_portable_files.ps1" -SolutionDir $SolutionDir -TargetDir $TargetDir -ConfigurationName $ConfigurationName \ No newline at end of file diff --git a/Tools/zip_portable_files.ps1 b/Tools/zip_portable_files.ps1 index 66f0c68bf..6af31e7ce 100644 --- a/Tools/zip_portable_files.ps1 +++ b/Tools/zip_portable_files.ps1 @@ -39,19 +39,22 @@ if ($ConfigurationName -eq "Release Portable") { $PortableZip="$($SolutionDir)Release\mRemoteNG-Portable-$($version).zip" - Remove-Item -Recurse "$($SolutionDir)mRemoteV1\bin\package" -ErrorAction SilentlyContinue | Out-Null - New-Item "$($SolutionDir)mRemoteV1\bin\package" -ItemType "directory" | Out-Null + $tempFolderPath = Join-Path -Path $SolutionDir -ChildPath "mRemoteV1\bin\package" + Remove-Item -Recurse $tempFolderPath -ErrorAction SilentlyContinue | Out-Null + New-Item $tempFolderPath -ItemType "directory" | Out-Null - Copy-Item "$($SolutionDir)mRemoteV1\Resources\PuTTYNG.exe" -Destination "$($SolutionDir)mRemoteV1\bin\package" + Copy-Item "$($SolutionDir)mRemoteV1\Resources\PuTTYNG.exe" -Destination $tempFolderPath #Write-Output "$($SolutionDir)mRemoteV1\bin\$ConfigurationName" #Write-Output "$($SolutionDir)mRemoteV1\bin\package" - Copy-Item "$($SolutionDir)mRemoteV1\bin\$ConfigurationName\*" -Destination "$($SolutionDir)mRemoteV1\bin\package" -Recurse -Force - Copy-Item "$($SolutionDir)*.txt" -Destination "$($SolutionDir)mRemoteV1\bin\package" + Copy-Item "$($SolutionDir)mRemoteV1\bin\$ConfigurationName\*" -Destination $tempFolderPath -Recurse -Force + # Delete any PDB files that accidentally get copied into the temp folder + Get-ChildItem -Path $tempFolderPath -Filter "*.pdb" | Remove-Item + Copy-Item "$($SolutionDir)*.txt" -Destination $tempFolderPath Write-Output "Creating portable ZIP file $($PortableZip)" Remove-Item -Force $PortableZip -ErrorAction SilentlyContinue - & $SEVENZIP a -bt -bd -bb1 -mx=9 -tzip -y -r $PortableZip "$($SolutionDir)mRemoteV1\bin\package\*.*" + & $SEVENZIP a -bt -bd -bb1 -mx=9 -tzip -y -r $PortableZip (Join-Path -Path $tempFolderPath -ChildPath "*.*") #& $SEVENZIP a -bt -mx=9 -tzip -y $PortableZip "$($SolutionDir)*.TXT" } else { diff --git a/Tools/zip_symbols.ps1 b/Tools/zip_symbols.ps1 index 460cd2d8b..a7ad0b5a3 100644 --- a/Tools/zip_symbols.ps1 +++ b/Tools/zip_symbols.ps1 @@ -37,11 +37,11 @@ if ($ConfigurationName -match "Release") { Write-Output "Version is $($version)" - $zipFilePath="$($SolutionDir)Release\mRemoteNG-symbols-$($version).zip" + $outputZipPath="$($SolutionDir)Release\mRemoteNG-symbols-$($version).zip" - Write-Output "Creating debug symbols ZIP file $($zipFilePath)" - Remove-Item -Force $zipFilePath -ErrorAction SilentlyContinue - & $SEVENZIP a -bt -bd -bb1 -mx=9 -tzip -y -r $zipFilePath "$($SolutionDir)mRemoteV1\bin\*.dbg" + Write-Output "Creating debug symbols ZIP file $($outputZipPath)" + Remove-Item -Force $outputZipPath -ErrorAction SilentlyContinue + & $SEVENZIP a -bt -bd -bb1 -mx=9 -tzip -y -r $outputZipPath (Join-Path -Path $TargetDir -ChildPath "*.pdb") } else { Write-Output "We will not package debug symbols - this isnt a release build." diff --git a/mRemoteV1/mRemoteV1.csproj b/mRemoteV1/mRemoteV1.csproj index b533518ea..12ab41d8c 100644 --- a/mRemoteV1/mRemoteV1.csproj +++ b/mRemoteV1/mRemoteV1.csproj @@ -1571,12 +1571,12 @@ powershell.exe -ExecutionPolicy Bypass -File "%25psScriptsDir%25\postbuild_mremo - false + true true bin\Release Portable\ PORTABLE 1591,660,661 - none + full x86 false MinimumRecommendedRules.ruleset