1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2024-11-22 01:42:46 +01:00
Nextcloud-Desktop/admin/win/msi/collect-transform.xsl.in
Michael Schuster a9014f9852
Windows MSI: Add MSI scripts and UI resources
Uses CMake to generate and install all required files in the "msi/" directory.

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-09-21 16:40:19 +02:00

44 lines
1.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">
<xsl:output method="xml" indent="yes" />
<!-- Copy all attributes and elements to the output. -->
<xsl:template match="@*|*">
<xsl:copy>
<xsl:apply-templates select="@*" />
<xsl:apply-templates select="*" />
</xsl:copy>
</xsl:template>
<!-- Identify MainExecutable -->
<xsl:key name="exe-search" match="wix:File[contains(@Source, '@APPLICATION_EXECUTABLE@.exe')]" use="@Id" />
<xsl:template match="wix:File[key('exe-search', @Id)]">
<xsl:copy>
<xsl:apply-templates select="@*" />
<xsl:attribute name="Id">
<xsl:text>MainExecutable</xsl:text>
</xsl:attribute>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<!-- Exclude Shell Extensions -->
<xsl:key name="shellext-search" match="wix:Component[contains(wix:File/@Source, 'shellext')]" use="@Id" />
<xsl:template match="wix:Component[key('shellext-search', @Id)]" />
<xsl:template match="wix:ComponentRef[key('shellext-search', @Id)]" />
<xsl:key name="shellext-search" match="wix:Directory[contains(@Name, 'shellext')]" use="@Id" />
<xsl:template match="wix:Directory[key('shellext-search', @Id)]" />
<!-- Exclude VC Redist -->
<xsl:key name="vc-redist-32-search" match="wix:Component[contains(wix:File/@Source, 'vc_redist.x86.exe')]" use="@Id" />
<xsl:template match="wix:Component[key('vc-redist-32-search', @Id)]" />
<xsl:template match="wix:ComponentRef[key('vc-redist-32-search', @Id)]" />
<xsl:key name="vc-redist-64-search" match="wix:Component[contains(wix:File/@Source, 'vc_redist.x64.exe')]" use="@Id" />
<xsl:template match="wix:Component[key('vc-redist-64-search', @Id)]" />
<xsl:template match="wix:ComponentRef[key('vc-redist-64-search', @Id)]" />
</xsl:stylesheet>