From 1d993404259ce91d423cc8a9a507430dd503f4c4 Mon Sep 17 00:00:00 2001 From: David Sparer Date: Fri, 17 Mar 2017 16:33:27 -0600 Subject: [PATCH] remove quoting --- InstallerProjects/Installer/Installer.wixproj | 6 +++--- Tools/copy_release_installer.ps1 | 21 ++++++++++++------- Tools/rename_installer_with_version.ps1 | 14 ++++++++----- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/InstallerProjects/Installer/Installer.wixproj b/InstallerProjects/Installer/Installer.wixproj index 9d3dec61..ec8ef841 100644 --- a/InstallerProjects/Installer/Installer.wixproj +++ b/InstallerProjects/Installer/Installer.wixproj @@ -132,14 +132,14 @@ call "$(ProjectDir)Resources\Pandoc\pandoc.exe" -s -t rtf -o "$(ProjectDir)\Reso REM Sign MSI IF EXIST C:\mRemoteNG_code_signing_cert.pfx ( IF %25buildenv: Portable=%25==Release ( - powershell -File "$(SolutionDir)Tools\signfiles.ps1" -PathToSignableFiles %27%25cd%25%27 + powershell -File "$(SolutionDir)Tools\signfiles.ps1" -PathToSignableFiles %25cd%25 ) ) REM Rename MSI to include version number -powershell -ExecutionPolicy Bypass -File "$(SolutionDir)Tools\rename_installer_with_version.ps1" %27$(SolutionDir)%27 +powershell -ExecutionPolicy Bypass -File "$(SolutionDir)Tools\rename_installer_with_version.ps1" -SolutionDir $(SolutionDir) REM Copy MSI to Release folder -IF %25buildenv: Portable=%25==Release (powershell -ExecutionPolicy Bypass -File "$(SolutionDir)Tools\copy_release_installer.ps1" %27$(TargetDir)%27 %27$(SolutionDir)Release)%27 +IF %25buildenv: Portable=%25==Release (powershell -ExecutionPolicy Bypass -File "$(SolutionDir)Tools\copy_release_installer.ps1" -SourcePath $(TargetDir) -DestinationDir $(SolutionDir)Release) \ No newline at end of file diff --git a/Tools/copy_release_installer.ps1 b/Tools/copy_release_installer.ps1 index 67797c06..c7160870 100644 --- a/Tools/copy_release_installer.ps1 +++ b/Tools/copy_release_installer.ps1 @@ -1,16 +1,21 @@ -$sourcePath = $args[0] -$destinationDir = $args[1] +param ( + [string] + $SourcePath, -Write-Host $sourcePath -Write-Host $destinationDir + [string] + $DestinationDir +) -if (!(Test-Path -Path $destinationDir)) +Write-Host $SourcePath +Write-Host $DestinationDir + +if (!(Test-Path -Path $DestinationDir)) { - New-Item -Path $destinationDir -ItemType "directory" + New-Item -Path $DestinationDir -ItemType "directory" } -$sourceFiles = Get-ChildItem -Path $sourcePath -Recurse | ?{$_.Extension -match "exe|msi"} +$sourceFiles = Get-ChildItem -Path $SourcePath -Recurse | ?{$_.Extension -match "exe|msi"} foreach ($item in $sourceFiles) { - Copy-Item -Path $item.FullName -Destination $destinationDir -Force + Copy-Item -Path $item.FullName -Destination $DestinationDir -Force } \ No newline at end of file diff --git a/Tools/rename_installer_with_version.ps1 b/Tools/rename_installer_with_version.ps1 index 795840a0..eec9fae0 100644 --- a/Tools/rename_installer_with_version.ps1 +++ b/Tools/rename_installer_with_version.ps1 @@ -1,11 +1,15 @@ -$solutionDir = $args[0] -$renameTarget = $solutionDir + "InstallerProjects\Installer\bin\Release\en-US\mRemoteNG-Installer.msi" +param ( + [string] + $SolutionDir +) -Write-Host $solutionDir +$renameTarget = $SolutionDir + "InstallerProjects\Installer\bin\Release\en-US\mRemoteNG-Installer.msi" + +Write-Host $SolutionDir Write-Host $renameTarget -$targetVersionedFile = "$solutionDir\mRemoteV1\bin\Release\mRemoteNG.exe" -$version = &"$solutionDir\Tools\sigcheck.exe" /accepteula -q -n $targetVersionedFile +$targetVersionedFile = "$SolutionDir\mRemoteV1\bin\Release\mRemoteNG.exe" +$version = &"$SolutionDir\Tools\sigcheck.exe" /accepteula -q -n $targetVersionedFile $renameTargetFileObject = Get-Item -Path $renameTarget -ErrorAction SilentlyContinue