Updated installer post build steps

This commit is contained in:
Sean Kaim
2016-07-08 17:59:25 -04:00
parent c8a684e10d
commit 2b7668aa68
3 changed files with 13 additions and 6 deletions

View File

@@ -135,9 +135,9 @@ IF EXIST C:\mRemoteNG_code_signing_cert.pfx (
)
REM Rename MSI to include version number
powershell "&""$(SolutionDir)Tools\rename_installer_with_version.ps1""" %27$(SolutionDir)%27 %27!(TargetPath)%27
powershell -ExecutionPolicy Bypass -File "$(SolutionDir)Tools\rename_installer_with_version.ps1" $(SolutionDir)
REM Copy MSI to Release folder
IF %25buildenv: Portable=%25==Release (powershell "&amp;""$(SolutionDir)Tools\copy_release_installer.ps1""" %27$(TargetDir)%27 %27$(SolutionDir)Release%27)</PostBuildEvent>
IF %25buildenv: Portable=%25==Release (powershell -ExecutionPolicy Bypass -File "$(SolutionDir)Tools\copy_release_installer.ps1" $(TargetDir) $(SolutionDir)Release)</PostBuildEvent>
</PropertyGroup>
</Project>

View File

@@ -1,6 +1,9 @@
$sourcePath = $args[0]
$destinationDir = $args[1]
Write-Host $sourcePath
Write-Host $destinationDir
if (!(Test-Path -Path $destinationDir))
{
New-Item -Path $destinationDir -ItemType "directory"

View File

@@ -1,7 +1,9 @@
#$solutionDir = $args[0] -replace "\\$"
$solutionDir = "C:\Users\vsparda\Documents\Repositories\mRemoteNG Project\mRemoteNG\"
#$renameTarget = $args[1]
$renameTarget = "C:\Users\vsparda\Documents\Repositories\mRemoteNG Project\mRemoteNG\InstallerProjects\Installer\bin\Release\en-US\mRemoteNG-Installer.msi"
$solutionDir = $args[0]
$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
@@ -12,6 +14,8 @@ if ($renameTargetFileObject)
# Build the new file name
$oldFileName = $renameTargetFileObject.Name
$newFileName = $oldFileName -replace "$("\"+$renameTargetFileObject.Extension)",$("-"+$version+$renameTargetFileObject.Extension)
Write-Host $oldFileName
Write-Host $newFileName
# Delete any items that already exist with the new name (effectively an overwrite)
Remove-Item -Path "$($renameTargetFileObject.Directory.FullName)\$newFileName" -ErrorAction SilentlyContinue