]> git.lizzy.rs Git - rust.git/blob - src/etc/installer/msi/remove-duplicates.xsl
Rollup merge of #100379 - davidtwco:triagebot-diag, r=Mark-Simulacrum
[rust.git] / src / etc / installer / msi / remove-duplicates.xsl
1 <?xml version="1.0" ?>
2 <xsl:stylesheet version="1.0"
3         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4         xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">
5     <!-- Copy all attributes and elements to the output. -->
6     <xsl:template match="@*|*">
7         <xsl:copy>
8             <xsl:apply-templates select="@*|*"/>
9         </xsl:copy>
10     </xsl:template>
11     <xsl:output method="xml" indent="yes" />
12
13     <!-- LICENSE* files are installed from rustc dir. -->
14     <xsl:key name="duplicates-cmp-ids" match="wix:Component[./wix:File[contains(@Source, 'LICENSE')]|./wix:File[contains(@Source, 'rust-installer-version')]]" use="@Id" />
15     <xsl:template match="wix:Component[key('duplicates-cmp-ids', @Id)]" />
16     <xsl:template match="wix:ComponentRef[key('duplicates-cmp-ids', @Id)]" />
17
18     <xsl:template match="wix:File[contains(@Source, 'README.md')]">
19         <xsl:copy>
20             <xsl:apply-templates select="@*|*"/>
21             <xsl:attribute name="Name">README-CARGO.md</xsl:attribute>
22         </xsl:copy>
23     </xsl:template>
24 </xsl:stylesheet>