diff --git a/Tools/tidy_files_for_release.ps1 b/Tools/tidy_files_for_release.ps1 index c02e7e48a..b56218fb1 100644 --- a/Tools/tidy_files_for_release.ps1 +++ b/Tools/tidy_files_for_release.ps1 @@ -15,7 +15,6 @@ if ($ConfigurationName -match "Release") { Write-Output "Removing unnecessary files from Release versions" Remove-Item -Path (Join-Path -Path $TargetDir -ChildPath "app.publish") -Recurse -Force $filesToDelete = Get-ChildItem -Path $TargetDir -Recurse -Include @( - "*.pdb", "*.publish", "*.xml", "*.backup", diff --git a/Tools/zip_symbols.ps1 b/Tools/zip_symbols.ps1 new file mode 100644 index 000000000..460cd2d8b --- /dev/null +++ b/Tools/zip_symbols.ps1 @@ -0,0 +1,50 @@ +param ( + [string] + [Parameter(Mandatory=$true)] + $SolutionDir, + + [string] + [Parameter(Mandatory=$true)] + $TargetDir, + + [string] + [Parameter(Mandatory=$true)] + $ConfigurationName +) + +Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) =====" + +if(-not [string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER)) { + Write-Output "Too early to run via Appveyor - artifacts don't get generated properly. Exiting" + Exit +} + +Write-Output "Solution Dir: '$($SolutionDir)'" +Write-Output "Target Dir: '$($TargetDir)'" +$ConfigurationName = $ConfigurationName.Trim() +Write-Output "Config Name (tirmmed): '$($ConfigurationName)'" + + +# Windows Sysinternals Sigcheck from http://technet.microsoft.com/en-us/sysinternals/bb897441 +$SIGCHECK="$($SolutionDir)Tools\exes\sigcheck.exe" +$SEVENZIP="$($SolutionDir)Tools\7zip\7za.exe" + +# Package Zip +if ($ConfigurationName -match "Release") { + Write-Output "Packaging debug symbols" + + $version = & $SIGCHECK /accepteula -q -n "$($SolutionDir)mRemoteV1\bin\$($ConfigurationName)\mRemoteNG.exe" + + Write-Output "Version is $($version)" + + $zipFilePath="$($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" +} +else { + Write-Output "We will not package debug symbols - this isnt a release build." +} + +Write-Output "" \ No newline at end of file diff --git a/mRemoteV1/mRemoteV1.csproj b/mRemoteV1/mRemoteV1.csproj index 55c0207c9..b533518ea 100644 --- a/mRemoteV1/mRemoteV1.csproj +++ b/mRemoteV1/mRemoteV1.csproj @@ -1557,16 +1557,18 @@ powershell.exe -ExecutionPolicy Bypass -File "%25psScriptsDir%25\postbuild_mremo false - false + true true bin\Release\ 1591,660,661 - none + full x86 AllRules.ruleset 1 false false + + false