From c7b89dcf71a4e7fd26e43c33054629ed7bc4f9ce Mon Sep 17 00:00:00 2001 From: Faryan Rezagholi Date: Sat, 14 Aug 2021 16:57:42 +0200 Subject: [PATCH] another test --- Tools/zip_files.ps1 | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/Tools/zip_files.ps1 b/Tools/zip_files.ps1 index 823c8c1bc..449c7f891 100644 --- a/Tools/zip_files.ps1 +++ b/Tools/zip_files.ps1 @@ -37,17 +37,21 @@ if ($ConfigurationName -match "Release") { $zipFilePrefix = "mRemoteNG-symbols" } - $outputZipPath = "$($SolutionDir)Release\$zipFilePrefix-$($version).zip" $debugFile = Join-Path -Path $TargetDir -ChildPath "mRemoteNG.pdb" - # Fix for AppVeyor - if(!([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER))) { - #$outputZipPath = "Release\$zipFilePrefix-$($version).zip" - $outputZipPath = Join-Path -Path $SolutionDir -ChildPath "Release\$zipFilePrefix-$($version).zip" - } - Write-Output "Creating debug symbols ZIP file $($outputZipPath) from $($debugFile)" - Compress-Archive $debugFile $outputZipPath -Force + + # AppVeyor build + if(!([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER))) { + $outputZipPath = "Release\$zipFilePrefix-$($version).zip" + #$outputZipPath = Join-Path -Path $SolutionDir -ChildPath "Release\$zipFilePrefix-$($version).zip" + 7z a $outputZipPath $debugFile + } + # Local build + else { + $outputZipPath = "$($SolutionDir)Release\$zipFilePrefix-$($version).zip" + Compress-Archive $debugFile $outputZipPath -Force + } } Write-Output "" @@ -56,18 +60,19 @@ Write-Output "" if ($ConfigurationName -eq "Release Portable") { Write-Output "Packaging Release Portable ZIP" - $outputZipPath="$($SolutionDir)\Release\mRemoteNG-Portable-$($version).zip" - - # Fix for AppVeyor - if(!([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER))) { - $outputZipPath = "Release\mRemoteNG-Portable-$($version).zip" - } - # Exclude debug symbols from folder $FileExclude = @("*.pdb") $Source = Get-ChildItem -Recurse -Path $TargetDir -Exclude $FileExclude Write-Output "Creating portable ZIP file $($outputZipPath) from $($Source)" + + # AppVeyor build + if(!([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER))) { + $outputZipPath = "Release\mRemoteNG-Portable-$($version).zip" + 7z a $outputZipPath $Source + } + + $outputZipPath="$($SolutionDir)\Release\mRemoteNG-Portable-$($version).zip" Compress-Archive $Source $outputZipPath -Force }