VirtualBox

source: vbox/trunk/src/VBox/Main/src-all/win/VirtualBox_rgs.xsl@ 69498

Last change on this file since 69498 was 66274, checked in by vboxsync, 8 years ago

VBox/Main: ​bugref:3300: VBoxSVC from terminal server session is not 'visible' - added VBoxSDS implementation

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author Id
File size: 5.7 KB
Line 
1<?xml version="1.0"?>
2
3<!--
4 * A template to generate a RGS resource script that contains
5 * registry definitions necessary to properly register
6 * VirtualBox Main API COM components.
7
8 Copyright (C) 2007-2016 Oracle Corporation
9
10 This file is part of VirtualBox Open Source Edition (OSE), as
11 available from http://www.virtualbox.org. This file is free software;
12 you can redistribute it and/or modify it under the terms of the GNU
13 General Public License (GPL) as published by the Free Software
14 Foundation, in version 2 as it comes in the "COPYING" file of the
15 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17-->
18
19<xsl:stylesheet version="1.0"
20 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
21
22<xsl:output method="text"/>
23
24<xsl:strip-space elements="*"/>
25
26<!--
27// parameters
28/////////////////////////////////////////////////////////////////////////////
29-->
30
31<!-- Name of the application to generate the RGS script for -->
32<xsl:param name="Application"/>
33<!-- Name of the module to generate the RGS script for -->
34<xsl:param name="Module"/>
35
36
37<!--
38// templates
39/////////////////////////////////////////////////////////////////////////////
40-->
41
42<!--
43 * header
44-->
45<xsl:template match="/idl">
46 <xsl:apply-templates/>
47</xsl:template>
48
49
50<!--
51 * libraries
52-->
53<xsl:template match="library">
54 <xsl:apply-templates/>
55</xsl:template>
56
57
58<!--
59 * applications
60-->
61<xsl:template match="application">
62 <xsl:if test="@name=$Application">
63 <xsl:variable name="context" select="//module[@name=$Module]/@context"/>
64<xsl:text>HKCR
65{
66 NoRemove AppID
67 {
68 ForceRemove {</xsl:text><xsl:value-of select="@uuid"/>} = s '<xsl:value-of select="@name"/><xsl:text> </xsl:text>
69 <xsl:choose>
70 <xsl:when test="$context='LocalService'">
71 <xsl:text>Service</xsl:text>
72 </xsl:when>
73 <xsl:otherwise>
74 <xsl:text>Application</xsl:text>
75 </xsl:otherwise>
76 </xsl:choose>
77 <xsl:text>'
78</xsl:text>
79 <xsl:if test="$context='LocalService'">
80 <xsl:text> {
81 val LocalService = s '</xsl:text><xsl:value-of select="$Module"/><xsl:text>'
82 }
83</xsl:text>
84 </xsl:if>
85 <xsl:text> '</xsl:text><xsl:value-of select="$Module"/>
86 <xsl:choose>
87 <xsl:when test="$context='InprocServer'">
88 <xsl:text>.dll</xsl:text>
89 </xsl:when>
90 <xsl:otherwise>
91 <xsl:text>.exe</xsl:text>
92 </xsl:otherwise>
93 </xsl:choose>
94 <xsl:text>'
95 {
96 val AppID = s '{</xsl:text><xsl:value-of select="//library/application[@name=$Application]/@uuid"/><xsl:text>}'
97 }
98 }
99
100</xsl:text>
101 <xsl:apply-templates select="module[@name=$Module]/class"/>
102<xsl:text>}
103</xsl:text>
104 </xsl:if>
105</xsl:template>
106
107
108<!--
109 * classes
110-->
111<xsl:template match="library//module/class">
112 <xsl:variable name="cname" select="concat(//library/application/@name,'.',@name)"/>
113 <xsl:variable name="desc" select="concat(@name,' Class')"/>
114 <xsl:text> </xsl:text>
115 <xsl:value-of select="concat($cname,'.1')"/> = s '<xsl:value-of select="$desc"/>'
116 {
117 CLSID = s '{<xsl:value-of select="@uuid"/>}'
118 }
119 <xsl:value-of select="$cname"/> = s '<xsl:value-of select="$desc"/>'
120 {
121 CLSID = s '{<xsl:value-of select="@uuid"/>}'
122 CurVer = s '<xsl:value-of select="concat($cname,'.1')"/>'
123 }
124 NoRemove CLSID
125 {
126 ForceRemove {<xsl:value-of select="@uuid"/>} = s '<xsl:value-of select="$desc"/>'
127 {
128 val AppID = s '{<xsl:value-of select="//library/application[@name=$Application]/@uuid"/><xsl:text>}'
129</xsl:text>
130 <xsl:if test="../@context!='LocalService'">
131 <xsl:text> ProgID = s '</xsl:text><xsl:value-of select="concat($cname,'.1')"/><xsl:text>'
132 VersionIndependentProgID = s '</xsl:text><xsl:value-of select="$cname"/><xsl:text>'
133 </xsl:text>
134 <xsl:choose>
135 <xsl:when test="../@context='InprocServer'">InprocServer32</xsl:when>
136 <xsl:when test="../@context='LocalServer'">LocalServer32</xsl:when>
137 <xsl:otherwise>
138 <xsl:message terminate="yes">
139 <xsl:value-of select="concat(../../@name,'::',../@name,': ')"/>
140 <xsl:text>module context </xsl:text>
141 <xsl:value-of select="concat('&quot;',../@context,'&quot;')"/>
142 <xsl:text> is invalid!</xsl:text>
143 </xsl:message>
144 </xsl:otherwise>
145 </xsl:choose><xsl:text> = s '%MODULE%'
146</xsl:text>
147 <xsl:if test="../@context='InprocServer'">
148 <xsl:variable name="tmodel" select="(./@threadingModel | ../@threadingModel)[last()]"/><xsl:text> {
149 val ThreadingModel = s '</xsl:text>
150 <xsl:choose>
151 <xsl:when test="$tmodel='Apartment'">Apartment</xsl:when>
152 <xsl:when test="$tmodel='Free'">Free</xsl:when>
153 <xsl:when test="$tmodel='Both'">Both</xsl:when>
154 <xsl:when test="$tmodel='Neutral'">Neutral</xsl:when>
155 <xsl:when test="$tmodel='Single'">Single</xsl:when>
156 <xsl:when test="$tmodel='Rental'">Rental</xsl:when>
157 <xsl:otherwise>
158 <xsl:message terminate="yes">
159 <xsl:value-of select="concat(../../@name,'::',@name,': ')"/>
160 <xsl:text>class (or module) threading model </xsl:text>
161 <xsl:value-of select="concat('&quot;',$tmodel,'&quot;')"/>
162 <xsl:text> is invalid!</xsl:text>
163 </xsl:message>
164 </xsl:otherwise>
165 </xsl:choose><xsl:text>'
166 }
167</xsl:text>
168 </xsl:if>
169 <xsl:text> TypeLib = s '{</xsl:text><xsl:value-of select="//library/@uuid"/><xsl:text>}'
170</xsl:text>
171 </xsl:if>
172 <xsl:text> }
173 }
174</xsl:text>
175</xsl:template>
176
177
178<!--
179 * eat everything else not explicitly matched
180-->
181<xsl:template match="*">
182</xsl:template>
183
184
185</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette