1 | <?xml version="1.0"?>
|
---|
2 | <!--
|
---|
3 | VirtualBox Windows Installation Script (WiX)
|
---|
4 |
|
---|
5 | Copyright (C) 2006-2016 Oracle Corporation
|
---|
6 |
|
---|
7 | This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
8 | available from http://www.virtualbox.org. This file is free software;
|
---|
9 | you can redistribute it and/or modify it under the terms of the GNU
|
---|
10 | General Public License (GPL) as published by the Free Software
|
---|
11 | Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
12 | VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
13 | hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
14 | -->
|
---|
15 |
|
---|
16 | <Include xmlns="http://schemas.microsoft.com/wix/2006/wi"
|
---|
17 | xmlns:difxapp="http://schemas.microsoft.com/wix/DifxAppExtension">
|
---|
18 |
|
---|
19 | <?if $(env.VBOX_WITH_MIDL_PROXY_STUB) = "yes" ?>
|
---|
20 | <!--
|
---|
21 | Reverse the typelib and registry writing order to make proxy stub work.
|
---|
22 |
|
---|
23 | A few things are ganging up on us here:
|
---|
24 | - A Typelib element is translated into a typelib table entry.
|
---|
25 | - While a Interface element is translated into a registry table
|
---|
26 | entry.
|
---|
27 | - The typelib table is by default processed after writing the
|
---|
28 | registry table.
|
---|
29 | - The typelib processing will set the ProxyStubClsid32 to a
|
---|
30 | dynamic builtin one that uses the typelib, thus overwriting
|
---|
31 | that bit of intformation from our interface elements (the
|
---|
32 | NumMethods bit is kept, go figure).
|
---|
33 | (- If we set the Advertise attribute on the Typelib element to
|
---|
34 | no, we may get a bit futher with ProxyStubClsid32, but we
|
---|
35 | end up with VBoxC being using instead of VBoxSVC. At least
|
---|
36 | in one of the configurations attempted)
|
---|
37 |
|
---|
38 | The whole point of the proxy stub DLLs is to not use the default
|
---|
39 | dynamic proxy stub from OLE that loads+parses the typelib each time
|
---|
40 | it creates proxies/stubs. There are two workarounds:
|
---|
41 | 1. Don't use the typelib and interface elements, but instead emit
|
---|
42 | plain registry entries (heat.exe can help).
|
---|
43 | 2. Make the registry writing happen after the typelib registration.
|
---|
44 |
|
---|
45 | Going with option two for now.
|
---|
46 |
|
---|
47 | ASSUMES RegisterTypeLibraries has sequence number 5500 and
|
---|
48 | WriteRegistryValues 5000. Modifies both.
|
---|
49 | -->
|
---|
50 | <RegisterTypeLibraries Sequence="4999"/>
|
---|
51 | <WriteRegistryValues Sequence="5501"/>
|
---|
52 | <?endif?>
|
---|
53 |
|
---|
54 | </Include>
|
---|
55 |
|
---|