diff --git a/Tools/exes/sigcheck.exe b/Tools/exes/sigcheck.exe deleted file mode 100644 index 01559ba9..00000000 Binary files a/Tools/exes/sigcheck.exe and /dev/null differ diff --git a/Tools/postbuild_mremoteng.ps1 b/Tools/postbuild_mremoteng.ps1 index 6df72e9a..91aa91ff 100644 --- a/Tools/postbuild_mremoteng.ps1 +++ b/Tools/postbuild_mremoteng.ps1 @@ -42,5 +42,4 @@ 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 -SolutionDir $SolutionDir & "$PSScriptRoot\verify_binary_signatures.ps1" -TargetDir $TargetDir -ConfigurationName $ConfigurationName -CertificatePath $CertificatePath -SolutionDir $SolutionDir -& "$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 +& "$PSScriptRoot\zip_files.ps1" -SolutionDir $SolutionDir -TargetDir $TargetDir -ConfigurationName $ConfigurationName \ No newline at end of file diff --git a/Tools/zip_symbols.ps1 b/Tools/zip_files.ps1 similarity index 53% rename from Tools/zip_symbols.ps1 rename to Tools/zip_files.ps1 index 4aef1e19..17015567 100644 --- a/Tools/zip_symbols.ps1 +++ b/Tools/zip_files.ps1 @@ -14,21 +14,15 @@ Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) =====" -Write-Output "Solution Dir: '$($SolutionDir)'" -Write-Output "Target Dir: '$($TargetDir)'" $ConfigurationName = $ConfigurationName.Trim() Write-Output "Config Name (trimmed): '$($ConfigurationName)'" +$exe = Join-Path -Path $TargetDir -ChildPath $TargetFileName +$Version = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($exe).FileVersion +Write-Output "Version is $($version)" -# Windows Sysinternals Sigcheck from http://technet.microsoft.com/en-us/sysinternals/bb897441 -$SIGCHECK="$($SolutionDir)Tools\exes\sigcheck.exe" - -# Package Zip +# Package debug symbols zip file if ($ConfigurationName -match "Release") { Write-Output "Packaging debug symbols" - - $version = & $SIGCHECK /accepteula -q -n "$($SolutionDir)mRemoteNG\bin\$($ConfigurationName)\mRemoteNG.exe" - - Write-Output "Version is $($version)" if ($ConfigurationName -match "Portable") { $zipFilePrefix = "mRemoteNG-Portable-symbols" @@ -40,10 +34,24 @@ if ($ConfigurationName -match "Release") { Write-Output "Creating debug symbols ZIP file $($outputZipPath)" Remove-Item -Force $outputZipPath -ErrorAction SilentlyContinue - Compress-Archive (Join-Path -Path $TargetDir -ChildPath "mRemoteNG.pdb") $outputZipPath + Compress-Archive (Join-Path -Path $TargetDir -ChildPath "mRemoteNG.pdb") $outputZipPath -Force } -else { - Write-Output "We will not package debug symbols - this isnt a release build." + +Write-Output "" + +# Package portable release zip file +if ($ConfigurationName -eq "Release Portable") { + Write-Output "Packaging Release Portable ZIP" + + $PortableZipDst="$($SolutionDir)\Release\mRemoteNG-Portable-$($version).zip" + + # Excluse debug symbols + $exclude = @("*.pdb") + # get files to compress using exclusion filer + #$files = Get-ChildItem -Recurse -Path $TargetDir -Exclude $exclude + + Write-Output "Creating portable ZIP file $($PortableZipDst)" + Compress-Archive (Get-ChildItem -Recurse -Path $TargetDir -Exclude $exclude) $PortableZipDst -Force } Write-Output "" \ No newline at end of file diff --git a/Tools/zip_portable_files.ps1 b/Tools/zip_portable_files.ps1 deleted file mode 100644 index 38fe8ac2..00000000 --- a/Tools/zip_portable_files.ps1 +++ /dev/null @@ -1,56 +0,0 @@ -param ( - [string] - [Parameter(Mandatory=$true)] - $SolutionDir, - - [string] - [Parameter(Mandatory=$true)] - $TargetDir, - - [string] - [Parameter(Mandatory=$true)] - $ConfigurationName -) - -Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) =====" - -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 -eq "Release Portable") { - Write-Output "Packaging Release Portable ZIP" - - $version = & $SIGCHECK /accepteula -q -n "$($SolutionDir)mRemoteNG\bin\$($ConfigurationName)\mRemoteNG.exe" - - Write-Output "Version is $($version)" - - $PortableZip="$($SolutionDir)Release\mRemoteNG-Portable-$($version).zip" - - $tempFolderPath = Join-Path -Path $SolutionDir -ChildPath "mRemoteNG\bin\package" - Remove-Item -Recurse $tempFolderPath -ErrorAction SilentlyContinue | Out-Null - New-Item $tempFolderPath -ItemType "directory" | Out-Null - - #Write-Output "$($SolutionDir)mRemoteNG\bin\$ConfigurationName" - #Write-Output "$($SolutionDir)mRemoteNG\bin\package" - Copy-Item "$($SolutionDir)mRemoteNG\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 - Compress-Archive $tempFolderPath\* $PortableZip -} -else { - Write-Output "We will not zip anything - this isnt a portable release build." -} - -Write-Output "" \ No newline at end of file