From a354e6cff83c054b5df6c0b122079deb18d4c2d0 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Wed, 16 Aug 2017 23:28:34 +0100 Subject: [PATCH 1/4] #4458 MSI installer checks that the Windows C Runtime and VS Studio 2015 C++ redistributables are present and returns error message if not. Includes tests to check that the Wix file contains the download URLs and those URLs are not dead. --- assets/Product.wxs | 24 +++++++++++++++++ .../Installer/WindowsInstaller.Tests.ps1 | 26 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 test/powershell/Installer/WindowsInstaller.Tests.ps1 diff --git a/assets/Product.wxs b/assets/Product.wxs index ab516102b86..0a8d858c4f3 100644 --- a/assets/Product.wxs +++ b/assets/Product.wxs @@ -60,6 +60,30 @@ + + + + + + + + + + + + + + + + + + = "14.0.23918")]]> + + + = "14.0.23918")]]> + diff --git a/test/powershell/Installer/WindowsInstaller.Tests.ps1 b/test/powershell/Installer/WindowsInstaller.Tests.ps1 new file mode 100644 index 00000000000..4f9850810e9 --- /dev/null +++ b/test/powershell/Installer/WindowsInstaller.Tests.ps1 @@ -0,0 +1,26 @@ +$thisTestFolder = Split-Path $MyInvocation.MyCommand.Path -Parent +$wixProductFile = Join-Path $thisTestFolder "..\..\..\assets\Product.wxs" + +Describe "Windows Installer" -Tags "Scenario" { + + Context "Universal C Runtime Download Link" { + $universalCRuntimeDownloadLink = 'https://www.microsoft.com/en-us/download/details.aspx?id=50410' + It "Wix file should have download link about Universal C runtime" { + (Get-Content $wixProductFile -Raw).Contains($universalCRuntimeDownloadLink) | Should Be $true + } + It "Should have download link about Universal C runtime that is reachable" { + (Invoke-WebRequest $universalCRuntimeDownloadLink.Replace("https://",'http://')) | Should Not Be $null + } + } + + Context "Visual Studio C++ Redistributables Link" { + $visualStudioCPlusPlusRedistributablesDownloadLink = 'https://www.microsoft.com/en-gb/download/details.aspx?id=48145' + It "WiX file should have documentation about Visual Studio C++ redistributables" { + (Get-Content $wixProductFile -Raw).Contains($visualStudioCPlusPlusRedistributablesDownloadLink) | Should Be $true + } + It "Should have download link about Universal C runtime that is reachable" { + (Invoke-WebRequest $visualStudioCPlusPlusRedistributablesDownloadLink.Replace("https://",'http://')) | Should Not Be $null + } + } + +} \ No newline at end of file From a0fde6eae28adc3bbb127ee06d9866788bfd6ad1 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Thu, 17 Aug 2017 08:11:56 +0100 Subject: [PATCH 2/4] #4458 Fixed simple typo in error message spotted during code review of PR #4602 --- assets/Product.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/Product.wxs b/assets/Product.wxs index 0a8d858c4f3..db171f027d1 100644 --- a/assets/Product.wxs +++ b/assets/Product.wxs @@ -75,7 +75,7 @@ - + From 87611d348fe30f8c45b7480f9e61c76f35e2cbba Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Thu, 17 Aug 2017 21:13:15 +0100 Subject: [PATCH 3/4] Update download link to Visual Studio C++ redistributables in Windows pre-requisites documentation as the current link requires an MSDN subscription and to make the link consistent with the one in the error message by the installer. --- docs/installation/windows.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation/windows.md b/docs/installation/windows.md index 325b7619196..0503dbca377 100644 --- a/docs/installation/windows.md +++ b/docs/installation/windows.md @@ -17,7 +17,7 @@ There is a shortcut placed in the Start Menu upon installation. * Install the [Universal C Runtime](https://www.microsoft.com/en-us/download/details.aspx?id=50410) on Windows versions prior to Windows 10. It is available via direct download or Windows Update. Fully patched (including optional packages), supported systems will already have this installed. -* Install the [Visual C++ Redistributable](https://my.visualstudio.com/Downloads?pid=2082) for VS2015. +* Install the [Visual C++ Redistributable](https://www.microsoft.com/en-gb/download/details.aspx?id=48145) for VS2015. ## Deploying on Nano Server From f5b7dc2a72db08a4e4737e787dbfa9cc64d97c16 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Thu, 17 Aug 2017 23:57:01 +0100 Subject: [PATCH 4/4] #4458 Removed language identifiers in URLs as requested by code review in PR #4602 --- assets/Product.wxs | 6 +++--- docs/installation/windows.md | 6 +++--- test/powershell/Installer/WindowsInstaller.Tests.ps1 | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/assets/Product.wxs b/assets/Product.wxs index db171f027d1..31432c18616 100644 --- a/assets/Product.wxs +++ b/assets/Product.wxs @@ -75,13 +75,13 @@ - + - + = "14.0.23918")]]> - + = "14.0.23918")]]> diff --git a/docs/installation/windows.md b/docs/installation/windows.md index 0503dbca377..b764f0f346a 100644 --- a/docs/installation/windows.md +++ b/docs/installation/windows.md @@ -14,14 +14,14 @@ There is a shortcut placed in the Start Menu upon installation. ### Prerequisites -* Install the [Universal C Runtime](https://www.microsoft.com/en-us/download/details.aspx?id=50410) on Windows versions prior to Windows 10. +* Install the [Universal C Runtime](https://www.microsoft.com/download/details.aspx?id=50410) on Windows versions prior to Windows 10. It is available via direct download or Windows Update. Fully patched (including optional packages), supported systems will already have this installed. -* Install the [Visual C++ Redistributable](https://www.microsoft.com/en-gb/download/details.aspx?id=48145) for VS2015. +* Install the [Visual C++ Redistributable](https://www.microsoft.com/download/details.aspx?id=48145) for VS2015. ## Deploying on Nano Server -These instructions assume that Windows PowerShell is running on the Nano Server image and that it has been generated by the [Nano Server Image Builder](https://technet.microsoft.com/en-us/windows-server-docs/get-started/deploy-nano-server). +These instructions assume that Windows PowerShell is running on the Nano Server image and that it has been generated by the [Nano Server Image Builder](https://technet.microsoft.com/windows-server-docs/get-started/deploy-nano-server). Nano Server is a "headless" OS and deployment of PowerShell Core binaries can happen in two different ways: 1. Offline - Mount the Nano Server VHD and unzip the contents of the zip file to your chosen location within the mounted image. diff --git a/test/powershell/Installer/WindowsInstaller.Tests.ps1 b/test/powershell/Installer/WindowsInstaller.Tests.ps1 index 4f9850810e9..ef1a08ae180 100644 --- a/test/powershell/Installer/WindowsInstaller.Tests.ps1 +++ b/test/powershell/Installer/WindowsInstaller.Tests.ps1 @@ -4,7 +4,7 @@ $wixProductFile = Join-Path $thisTestFolder "..\..\..\assets\Product.wxs" Describe "Windows Installer" -Tags "Scenario" { Context "Universal C Runtime Download Link" { - $universalCRuntimeDownloadLink = 'https://www.microsoft.com/en-us/download/details.aspx?id=50410' + $universalCRuntimeDownloadLink = 'https://www.microsoft.com/download/details.aspx?id=50410' It "Wix file should have download link about Universal C runtime" { (Get-Content $wixProductFile -Raw).Contains($universalCRuntimeDownloadLink) | Should Be $true } @@ -14,7 +14,7 @@ Describe "Windows Installer" -Tags "Scenario" { } Context "Visual Studio C++ Redistributables Link" { - $visualStudioCPlusPlusRedistributablesDownloadLink = 'https://www.microsoft.com/en-gb/download/details.aspx?id=48145' + $visualStudioCPlusPlusRedistributablesDownloadLink = 'https://www.microsoft.com/download/details.aspx?id=48145' It "WiX file should have documentation about Visual Studio C++ redistributables" { (Get-Content $wixProductFile -Raw).Contains($visualStudioCPlusPlusRedistributablesDownloadLink) | Should Be $true }