summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThanos Doukoudakis <thanos.doukoudakis@isode.com>2017-11-14 10:28:18 (GMT)
committerTobias Markmann <tm@ayena.de>2017-11-27 15:02:04 (GMT)
commit82ec407254c6fe1d262598ad278132a2543e0e3f (patch)
tree3f91c38f4bd236db7182cf8fefbb8d65fa1e8774
parentff39e92d8b42fbf20eeeab56b0599d5e3db79a21 (diff)
downloadswift-82ec407254c6fe1d262598ad278132a2543e0e3f.zip
swift-82ec407254c6fe1d262598ad278132a2543e0e3f.tar.bz2
Make the Windows installer remove older versions of Swift components
This patch will make the installer remove each file component, before deploying the new version of the file. This is to avoid potentials issues with the installer, when trying to deploy a new version of a file that happens to have the same version information as the original file. The default behaviour of the MSI installer in a case like this is to skip the deployment of the new file. This issue occurs when Visual Studio gets upgraded, and we need to redeploy 3rd party components of the same version but build with the new version of the compiler. Test-information: Generated an installer and tested fresh install and upgrade from Swift 3.0. Tested with Windows 10 and Windows 7, normal and quiet installations. Verified that the Qt DLLs deployed have the correct VS redist dependencies. Change-Id: I6f68126ee63968aad066901704a409b6ebada14f
-rw-r--r--Swift/Packaging/WiX/include.xslt12
1 files changed, 11 insertions, 1 deletions
diff --git a/Swift/Packaging/WiX/include.xslt b/Swift/Packaging/WiX/include.xslt
index ec1ad50..df86446 100644
--- a/Swift/Packaging/WiX/include.xslt
+++ b/Swift/Packaging/WiX/include.xslt
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wix="http://schemas.microsoft.com/wix/2006/wi" xmlns="http://schemas.microsoft.com/wix/2006/wi" exclude-result-prefixes="xsl wix">
<xsl:template match='wix:Directory[@Id="Swift"]/@Id'>
<xsl:attribute name='Id'>INSTALLDIR</xsl:attribute>
@@ -11,4 +11,14 @@
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
+
+ <xsl:template match="wix:Component">
+ <xsl:copy>
+ <xsl:apply-templates select="@*"/>
+ <xsl:value-of select="concat(preceding-sibling::text(), ' ')" />
+ <RemoveFile Id="remove_{@Id}" Name="{@Id}" On="install" />
+ <xsl:apply-templates select="node()"/>
+ </xsl:copy>
+ </xsl:template>
+
</xsl:stylesheet>