Don't abort installation if vcredist returns non zero return code

In case, vcredist returns a non zero return code, don't automatically
abort the installation, but tell the user the error code, the consequences
and continue.

ref T344
This commit is contained in:
Roland Winklmeier
2018-09-13 14:52:28 +02:00
committed by Klaus Basan
parent 521e2044cf
commit e8235a0f53
2 changed files with 20 additions and 1 deletions

View File

@@ -138,7 +138,7 @@ This installs the binaries to run all swift applications.</detailedDescription>
<windowsPath></windowsPath>
</startMenuShortcut>
<startMenuShortcut>
<comment>>Run swiftlauncher</comment>
<comment>Run swiftlauncher</comment>
<name>swiftlauncher ${architecture}bit</name>
<runAsAdmin>0</runAsAdmin>
<runInTerminal>0</runInTerminal>

View File

@@ -22,9 +22,11 @@
<variable>vcruntimeversionx64</variable>
</registryGet>
<runProgram>
<abortOnError>0</abortOnError>
<program>${installdir}/vcredist/vcredist_x86.exe</program>
<programArguments>/install /quiet /norestart</programArguments>
<progressText>Installing VC++ 2017 32 Bit Runtime</progressText>
<showMessageOnError>0</showMessageOnError>
<ruleList>
<fileExists>
<path>${installdir}/vcredist/vcredist_x86.exe</path>
@@ -37,9 +39,11 @@
</ruleList>
</runProgram>
<runProgram>
<abortOnError>0</abortOnError>
<program>${installdir}/vcredist/vcredist_x64.exe</program>
<programArguments>/install /quiet /norestart</programArguments>
<progressText>Installing VC++ 2017 64 Bit Runtime</progressText>
<showMessageOnError>0</showMessageOnError>
<ruleList>
<fileExists>
<path>${installdir}/vcredist/vcredist_x64.exe</path>
@@ -51,6 +55,21 @@
</compareVersions>
</ruleList>
</runProgram>
<showWarning>
<text>Installation of MS Visual Studio 2017 Redistributables failed!
Error Code: ${program_exit_code}
Check if another version was already installed and if not, try to run the installer manually from
${installdir}\vcredist\
The installation will now continue, but swift might not work properly. If this is the case, raise a bugreport on https://dev.swift-project.org with the error code, you received.</text>
<ruleList>
<compareValues>
<logic>does_not_equal</logic>
<value1>${program_exit_code}</value1>
<value2>0</value2>
</compareValues>
</ruleList>
</showWarning>
</actionList>
<distributionFileList>
<distributionFile>