mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
[Installer] Split and fix the Visual Studio Redist installation
- It got splitted up into a x86 and x64 component. - Each one is packaged only for the respective archictecture - Always run the installer without registry checks and evaluate the return code. Raise a warning only if its not 0 and not 1638 (newer version already installed). ref T344
This commit is contained in:
committed by
Klaus Basan
parent
14e778c243
commit
8ed01b0259
@@ -17,7 +17,10 @@
|
||||
<file>qt5-binaries.xml</file>
|
||||
</include>
|
||||
<include>
|
||||
<file>vcredist.xml</file>
|
||||
<file>vcredist-x86.xml</file>
|
||||
</include>
|
||||
<include>
|
||||
<file>vcredist-x64.xml</file>
|
||||
</include>
|
||||
</componentList>
|
||||
<preInstallationActionList>
|
||||
|
||||
72
installer/installbuilder/vcredist-x64.xml
Normal file
72
installer/installbuilder/vcredist-x64.xml
Normal file
@@ -0,0 +1,72 @@
|
||||
<component>
|
||||
<name>vcruntime64</name>
|
||||
<description>Visual Studio 2017 x64 Redistributables</description>
|
||||
<canBeEdited>0</canBeEdited>
|
||||
<selected>1</selected>
|
||||
<show>1</show>
|
||||
<folderList>
|
||||
<folder>
|
||||
<description>vcredist</description>
|
||||
<destination>${installdir}/vcredist</destination>
|
||||
<name>vcredist64</name>
|
||||
<platforms>windows</platforms>
|
||||
<actionList>
|
||||
<runProgram>
|
||||
<abortOnError>0</abortOnError>
|
||||
<program>${installdir}/vcredist/vcredist_x64.exe</program>
|
||||
<programArguments>/install /quiet /norestart</programArguments>
|
||||
<progressText>Installing Visual Studio 2017 x64 Redistributables</progressText>
|
||||
<showMessageOnError>0</showMessageOnError>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>windows</type>
|
||||
</platformTest>
|
||||
<compareText>
|
||||
<logic>equals</logic>
|
||||
<text>${architecture}</text>
|
||||
<value>64</value>
|
||||
</compareText>
|
||||
</ruleList>
|
||||
</runProgram>
|
||||
<showWarning>
|
||||
<text>Installation of MS Visual Studio 2017 x64 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>
|
||||
<!-- No error -->
|
||||
<compareValues>
|
||||
<logic>does_not_equal</logic>
|
||||
<value1>${program_exit_code}</value1>
|
||||
<value2>0</value2>
|
||||
</compareValues>
|
||||
|
||||
<!-- A newer version of this product is already installed -->
|
||||
<compareValues>
|
||||
<logic>does_not_equal</logic>
|
||||
<value1>${program_exit_code}</value1>
|
||||
<value2>1638</value2>
|
||||
</compareValues>
|
||||
</ruleList>
|
||||
</showWarning>
|
||||
</actionList>
|
||||
<distributionFileList>
|
||||
<distributionFile>
|
||||
<origin>../../dist/vcredist/vcredist_x64.exe</origin>
|
||||
</distributionFile>
|
||||
</distributionFileList>
|
||||
</folder>
|
||||
</folderList>
|
||||
<shouldPackRuleList>
|
||||
<platformTest>
|
||||
<type>windows</type>
|
||||
</platformTest>
|
||||
<compareValues>
|
||||
<logic>equals</logic>
|
||||
<value1>${architecture}</value1>
|
||||
<value2>64</value2>
|
||||
</compareValues>
|
||||
</shouldPackRuleList>
|
||||
</component>
|
||||
72
installer/installbuilder/vcredist-x86.xml
Normal file
72
installer/installbuilder/vcredist-x86.xml
Normal file
@@ -0,0 +1,72 @@
|
||||
<component>
|
||||
<name>vcruntime32</name>
|
||||
<description>Visual Studio 2017 x86 Redistributables</description>
|
||||
<canBeEdited>0</canBeEdited>
|
||||
<selected>1</selected>
|
||||
<show>1</show>
|
||||
<folderList>
|
||||
<folder>
|
||||
<description>vcredist</description>
|
||||
<destination>${installdir}/vcredist</destination>
|
||||
<name>vcredist32</name>
|
||||
<platforms>windows</platforms>
|
||||
<actionList>
|
||||
<runProgram>
|
||||
<abortOnError>0</abortOnError>
|
||||
<program>${installdir}/vcredist/vcredist_x86.exe</program>
|
||||
<programArguments>/install /quiet /norestart</programArguments>
|
||||
<progressText>Installing Visual Studio 2017 x86 Redistributables</progressText>
|
||||
<showMessageOnError>0</showMessageOnError>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>windows</type>
|
||||
</platformTest>
|
||||
<compareText>
|
||||
<logic>equals</logic>
|
||||
<text>${architecture}</text>
|
||||
<value>32</value>
|
||||
</compareText>
|
||||
</ruleList>
|
||||
</runProgram>
|
||||
<showWarning>
|
||||
<text>Installation of MS Visual Studio 2017 x86 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>
|
||||
<!-- No error -->
|
||||
<compareValues>
|
||||
<logic>does_not_equal</logic>
|
||||
<value1>${program_exit_code}</value1>
|
||||
<value2>0</value2>
|
||||
</compareValues>
|
||||
|
||||
<!-- A newer version of this product is already installed -->
|
||||
<compareValues>
|
||||
<logic>does_not_equal</logic>
|
||||
<value1>${program_exit_code}</value1>
|
||||
<value2>1638</value2>
|
||||
</compareValues>
|
||||
</ruleList>
|
||||
</showWarning>
|
||||
</actionList>
|
||||
<distributionFileList>
|
||||
<distributionFile>
|
||||
<origin>../../dist/vcredist/vcredist_x86.exe</origin>
|
||||
</distributionFile>
|
||||
</distributionFileList>
|
||||
</folder>
|
||||
</folderList>
|
||||
<shouldPackRuleList>
|
||||
<platformTest>
|
||||
<type>windows</type>
|
||||
</platformTest>
|
||||
<compareText>
|
||||
<logic>equals</logic>
|
||||
<text>${architecture}</text>
|
||||
<value>32</value>
|
||||
</compareText>
|
||||
</shouldPackRuleList>
|
||||
</component>
|
||||
@@ -1,87 +0,0 @@
|
||||
<component>
|
||||
<name>vcruntime</name>
|
||||
<description>Visual Studio 2017 Redistributables</description>
|
||||
<canBeEdited>0</canBeEdited>
|
||||
<selected>1</selected>
|
||||
<show>1</show>
|
||||
<folderList>
|
||||
<folder>
|
||||
<description>vcredist</description>
|
||||
<destination>${installdir}/vcredist</destination>
|
||||
<name>vcredist</name>
|
||||
<platforms>windows</platforms>
|
||||
<actionList>
|
||||
<registryGet>
|
||||
<key>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x86</key>
|
||||
<name>Version</name>
|
||||
<variable>vcruntimeversionx86</variable>
|
||||
</registryGet>
|
||||
<registryGet>
|
||||
<key>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64</key>
|
||||
<name>Version</name>
|
||||
<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>
|
||||
</fileExists>
|
||||
<compareVersions>
|
||||
<logic>greater</logic>
|
||||
<version1>v14.15.26706.0</version1>
|
||||
<version2>${vcruntimeversionx86}</version2>
|
||||
</compareVersions>
|
||||
</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>
|
||||
</fileExists>
|
||||
<compareVersions>
|
||||
<logic>greater</logic>
|
||||
<version1>v14.15.26706.0</version1>
|
||||
<version2>${vcruntimeversionx64}</version2>
|
||||
</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>
|
||||
<allowWildcards>1</allowWildcards>
|
||||
<origin>../../dist/vcredist/vcredist_*.exe</origin>
|
||||
</distributionFile>
|
||||
</distributionFileList>
|
||||
</folder>
|
||||
</folderList>
|
||||
<shouldPackRuleList>
|
||||
<platformTest>
|
||||
<type>windows</type>
|
||||
</platformTest>
|
||||
</shouldPackRuleList>
|
||||
</component>
|
||||
Reference in New Issue
Block a user