[31659] | 1 | <?xml version="1.0"?>
|
---|
| 2 |
|
---|
| 3 | <!--
|
---|
| 4 | * A template to generate a WiX include file that contains
|
---|
| 5 | * type library definitions for VirtualBox COM components
|
---|
| 6 | * from the generic interface definition expressed in XML.
|
---|
[96314] | 7 | -->
|
---|
| 8 | <!--
|
---|
[98103] | 9 | Copyright (C) 2007-2023 Oracle and/or its affiliates.
|
---|
[31659] | 10 |
|
---|
[96407] | 11 | This file is part of VirtualBox base platform packages, as
|
---|
| 12 | available from https://www.virtualbox.org.
|
---|
| 13 |
|
---|
| 14 | This program is free software; you can redistribute it and/or
|
---|
| 15 | modify it under the terms of the GNU General Public License
|
---|
| 16 | as published by the Free Software Foundation, in version 3 of the
|
---|
| 17 | License.
|
---|
| 18 |
|
---|
| 19 | This program is distributed in the hope that it will be useful, but
|
---|
| 20 | WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
| 22 | General Public License for more details.
|
---|
| 23 |
|
---|
| 24 | You should have received a copy of the GNU General Public License
|
---|
| 25 | along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
| 26 |
|
---|
| 27 | SPDX-License-Identifier: GPL-3.0-only
|
---|
[31659] | 28 | -->
|
---|
| 29 |
|
---|
| 30 | <xsl:stylesheet version="1.0"
|
---|
| 31 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
---|
| 32 |
|
---|
| 33 | <xsl:output method="xml"
|
---|
| 34 | version="1.0"
|
---|
| 35 | encoding="utf-8"
|
---|
| 36 | indent="yes"/>
|
---|
| 37 |
|
---|
| 38 | <xsl:strip-space elements="*"/>
|
---|
| 39 |
|
---|
[48323] | 40 | <xsl:param name="a_sTarget">all</xsl:param>
|
---|
[70228] | 41 | <xsl:param name="a_sWithSDS" select="no"/>
|
---|
[31659] | 42 |
|
---|
[48323] | 43 |
|
---|
[31659] | 44 | <!--
|
---|
| 45 | // templates
|
---|
| 46 | /////////////////////////////////////////////////////////////////////////////
|
---|
| 47 | -->
|
---|
| 48 |
|
---|
| 49 | <!--
|
---|
| 50 | * header
|
---|
| 51 | -->
|
---|
| 52 | <xsl:template match="/idl">
|
---|
| 53 | <xsl:comment>
|
---|
| 54 | /*
|
---|
| 55 | * DO NOT EDIT! This is a generated file.
|
---|
| 56 | *
|
---|
| 57 | * WiX include script for the VirtualBox Type Library
|
---|
| 58 | * generated from XIDL (XML interface definition).
|
---|
| 59 | *
|
---|
| 60 | * Source : src/VBox/Main/idl/VirtualBox.xidl
|
---|
| 61 | * Generator : src/VBox/Installer/VirtualBox_TypeLib.xsl
|
---|
[48323] | 62 | * Arguments : a_sTarget=<xsl:value-of select="$a_sTarget"/>
|
---|
[31659] | 63 | */
|
---|
| 64 | </xsl:comment>
|
---|
| 65 | <xsl:apply-templates/>
|
---|
| 66 | </xsl:template>
|
---|
| 67 |
|
---|
| 68 |
|
---|
| 69 | <!--
|
---|
| 70 | * libraries
|
---|
| 71 | -->
|
---|
| 72 | <xsl:template match="idl/library">
|
---|
| 73 | <Include>
|
---|
| 74 | <TypeLib>
|
---|
| 75 | <xsl:attribute name="Id"><xsl:value-of select="@uuid"/></xsl:attribute>
|
---|
[37289] | 76 | <xsl:attribute name="Advertise">yes</xsl:attribute>
|
---|
[59328] | 77 | <xsl:attribute name="MajorVersion"><xsl:value-of select="substring(@version,1,1)"/></xsl:attribute>
|
---|
| 78 | <xsl:attribute name="MinorVersion"><xsl:value-of select="substring(@version,3)"/></xsl:attribute>
|
---|
[31659] | 79 | <xsl:attribute name="Language">0</xsl:attribute>
|
---|
[66274] | 80 | <xsl:attribute name="Description"><xsl:value-of select="@name"/></xsl:attribute>
|
---|
[64339] | 81 | <xsl:attribute name="HelpDirectory"><xsl:text>msm_VBoxApplicationFolder</xsl:text></xsl:attribute>
|
---|
[76242] | 82 | <xsl:apply-templates select="application | if[@target='midl']/application"/>
|
---|
[31659] | 83 | </TypeLib>
|
---|
| 84 | </Include>
|
---|
| 85 | </xsl:template>
|
---|
| 86 |
|
---|
| 87 |
|
---|
[66274] | 88 | <!--
|
---|
| 89 | * filters to skip VBoxSDS class and interfaces if a VBOX_WITH_SDS is not defined in kmk
|
---|
| 90 | -->
|
---|
| 91 | <xsl:template match="application[@uuid='ec0e78e8-fa43-43e8-ac0a-02c784c4a4fa']">
|
---|
[70228] | 92 | <xsl:if test="$a_sWithSDS='yes'" >
|
---|
[66274] | 93 | <xsl:call-template name="application_template" />
|
---|
| 94 | </xsl:if>
|
---|
| 95 | </xsl:template>
|
---|
[69407] | 96 |
|
---|
[66274] | 97 | <!--
|
---|
| 98 | * applications
|
---|
| 99 | -->
|
---|
| 100 | <xsl:template match="idl/library//application" name="application_template">
|
---|
| 101 | <AppId>
|
---|
| 102 | <xsl:attribute name="Id">
|
---|
| 103 | <xsl:value-of select="@uuid"/>
|
---|
| 104 | </xsl:attribute>
|
---|
| 105 | <xsl:attribute name="Description">
|
---|
| 106 | <xsl:value-of select="@name"/> Application
|
---|
| 107 | </xsl:attribute>
|
---|
[70228] | 108 | <!--
|
---|
| 109 | The name of windows service should be defined as module name in .xidl.
|
---|
| 110 | It's viable for correct registration of COM windows service.
|
---|
| 111 | -->
|
---|
| 112 | <xsl:if test="module/@context = 'LocalService'">
|
---|
| 113 | <xsl:attribute name="LocalService" >
|
---|
| 114 | <xsl:value-of select="module/@name"/>
|
---|
| 115 | </xsl:attribute>
|
---|
| 116 | </xsl:if>
|
---|
[66274] | 117 | <xsl:choose>
|
---|
| 118 | <xsl:when test="$a_sTarget = 'VBoxClient-x86'">
|
---|
| 119 | <xsl:apply-templates select="module[@name='VBoxC']/class"/>
|
---|
| 120 | </xsl:when>
|
---|
| 121 | <xsl:otherwise>
|
---|
| 122 | <xsl:apply-templates select="module/class"/>
|
---|
| 123 | </xsl:otherwise>
|
---|
| 124 | </xsl:choose>
|
---|
| 125 | </AppId>
|
---|
| 126 | </xsl:template>
|
---|
| 127 |
|
---|
[69407] | 128 |
|
---|
[31659] | 129 | <!--
|
---|
| 130 | * classes
|
---|
| 131 | -->
|
---|
| 132 | <xsl:template match="library//module/class">
|
---|
| 133 | <Class>
|
---|
| 134 | <xsl:attribute name="Id"><xsl:value-of select="@uuid"/></xsl:attribute>
|
---|
| 135 | <xsl:attribute name="Description"><xsl:value-of select="@name"/> Class</xsl:attribute>
|
---|
| 136 | <xsl:attribute name="Server"><xsl:value-of select="../@name"/></xsl:attribute>
|
---|
| 137 | <xsl:attribute name="Context">
|
---|
| 138 | <xsl:choose>
|
---|
| 139 | <xsl:when test="../@context='InprocServer'">InprocServer32</xsl:when>
|
---|
[70228] | 140 | <xsl:when test="../@context='LocalServer'" >LocalServer32</xsl:when>
|
---|
| 141 | <xsl:when test="../@context='LocalService'">LocalServer32</xsl:when>
|
---|
[31659] | 142 | <xsl:otherwise>
|
---|
| 143 | <xsl:message terminate="yes">
|
---|
| 144 | <xsl:value-of select="concat(../../@name,'::',../@name,': ')"/>
|
---|
| 145 | <xsl:text>module context </xsl:text>
|
---|
| 146 | <xsl:value-of select="concat('"',../@context,'"')"/>
|
---|
| 147 | <xsl:text> is invalid!</xsl:text>
|
---|
| 148 | </xsl:message>
|
---|
| 149 | </xsl:otherwise>
|
---|
| 150 | </xsl:choose>
|
---|
| 151 | </xsl:attribute>
|
---|
| 152 | <xsl:if test="../@context='InprocServer'">
|
---|
| 153 | <xsl:variable name="tmodel" select="(./@threadingModel | ../@threadingModel)[last()]"/>
|
---|
| 154 | <xsl:attribute name="ThreadingModel">
|
---|
| 155 | <xsl:choose>
|
---|
| 156 | <xsl:when test="$tmodel='Apartment'">apartment</xsl:when>
|
---|
| 157 | <xsl:when test="$tmodel='Free'">free</xsl:when>
|
---|
| 158 | <xsl:when test="$tmodel='Both'">both</xsl:when>
|
---|
| 159 | <xsl:when test="$tmodel='Neutral'">neutral</xsl:when>
|
---|
| 160 | <xsl:when test="$tmodel='Single'">single</xsl:when>
|
---|
| 161 | <xsl:when test="$tmodel='Rental'">rental</xsl:when>
|
---|
| 162 | <xsl:otherwise>
|
---|
| 163 | <xsl:message terminate="yes">
|
---|
| 164 | <xsl:value-of select="concat(../../@name,'::',@name,': ')"/>
|
---|
| 165 | <xsl:text>class (or module) threading model </xsl:text>
|
---|
| 166 | <xsl:value-of select="concat('"',$tmodel,'"')"/>
|
---|
| 167 | <xsl:text> is invalid!</xsl:text>
|
---|
| 168 | </xsl:message>
|
---|
| 169 | </xsl:otherwise>
|
---|
| 170 | </xsl:choose>
|
---|
| 171 | </xsl:attribute>
|
---|
| 172 | </xsl:if>
|
---|
| 173 | <ProgId>
|
---|
| 174 | <xsl:attribute name="Id">
|
---|
| 175 | <xsl:value-of select="concat(//library/@name,'.',@name,'.1')"/>
|
---|
| 176 | </xsl:attribute>
|
---|
| 177 | <xsl:attribute name="Description"><xsl:value-of select="@name"/> Class</xsl:attribute>
|
---|
| 178 | <ProgId>
|
---|
| 179 | <xsl:attribute name="Id">
|
---|
| 180 | <xsl:value-of select="concat(//library/@name,'.',@name)"/>
|
---|
| 181 | </xsl:attribute>
|
---|
| 182 | <xsl:attribute name="Description"><xsl:value-of select="@name"/> Class</xsl:attribute>
|
---|
| 183 | </ProgId>
|
---|
| 184 | </ProgId>
|
---|
| 185 | </Class>
|
---|
| 186 | </xsl:template>
|
---|
| 187 |
|
---|
| 188 | <!--
|
---|
| 189 | * eat everything else not explicitly matched
|
---|
| 190 | -->
|
---|
| 191 | <xsl:template match="*">
|
---|
| 192 | </xsl:template>
|
---|
| 193 |
|
---|
| 194 |
|
---|
| 195 | </xsl:stylesheet>
|
---|