VirtualBox

Changeset 59329 in vbox for trunk/src/VBox/Installer/win


Ignore:
Timestamp:
Jan 13, 2016 9:24:28 PM (9 years ago)
Author:
vboxsync
Message:

Installer/win: Implemented VBOX_WITH_MIDL_PROXY_STUB=1 registration.

Location:
trunk/src/VBox/Installer/win
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/win/Makefile.kmk

    r59321 r59329  
    658658                $(PATH_SUB_CURRENT)/VirtualBox_TypeLib.xsl \
    659659                $(VBOX_XIDL_FILE) \
     660                $(MAKEFILE) \
     661               $(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),$(PATH_STAGE_BIN)/VBoxProxyStub$(if-expr "$(KBUILD_TARGET_ARCH)" == "amd64",-x86,).dll,) \
    660662                | $$(dir $$@)
     663ifndef VBOX_WITH_MIDL_PROXY_STUB
    661664        $(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
     665else
     666        $(VBOX_XSLTPROC) -o "[email protected]" $< $(VBOX_XIDL_FILE)
     667        $(VBOX_PATH_WIX)/heat.exe \
     668                file $(PATH_STAGE_BIN)/VBoxProxyStub$(if-expr "$(KBUILD_TARGET_ARCH)" == "amd64",-x86,).dll \
     669                -nologo -o [email protected]
     670        $(SED) -e '/\<Interface Id/!d' -e 's/^[[:space:]]*/    /' [email protected] --output [email protected]
     671        $(SED) -e '/<\/AppId>/{' -e 'r [email protected]' -e '}' "[email protected]" --output $@
     672        $(RM) -f -- "[email protected]" "[email protected]" "[email protected]"
     673endif
    662674
    663675$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi: \
    664676                $(PATH_SUB_CURRENT)/VirtualBox_TypeLib.xsl \
    665677                $(VBOX_XIDL_FILE) \
     678               $(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),$(PATH_STAGE_BIN)/VBoxProxyStub-x86.dll,) \
    666679                | $$(dir $$@)
    667         $(VBOX_XSLTPROC) --stringparam "a_sTarget" "VBoxClient-x86"  -o [email protected] $< $(VBOX_XIDL_FILE)
     680ifndef VBOX_WITH_MIDL_PROXY_STUB
     681        $(VBOX_XSLTPROC) --stringparam "a_sTarget" "VBoxClient-x86" -o [email protected] $< $(VBOX_XIDL_FILE)
    668682        $(SED) -e 's/VBoxC/VBoxClient_x86/g' --output $@ [email protected]
    669683        $(RM) -f [email protected]
     684else
     685        $(VBOX_XSLTPROC) --stringparam "a_sTarget" "VBoxClient-x86" -o "[email protected]" $< $(VBOX_XIDL_FILE)
     686        $(SED) -e 's/VBoxC/VBoxClient_x86/g' --output "[email protected]" "[email protected]"
     687        $(VBOX_PATH_WIX)/heat.exe \
     688                file $(PATH_STAGE_BIN)/VBoxProxyStub-x86.dll \
     689                -nologo -o [email protected]
     690        $(SED) -e '/\<Interface Id/!d' -e 's/^[[:space:]]*/    /' [email protected] --output [email protected]
     691        $(SED) -e '/<\/AppId>/{' -e 'r [email protected]' -e '}' [email protected] --output $@
     692        $(RM) -f -- "[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]"
     693endif
    670694
    671695#
  • trunk/src/VBox/Installer/win/VBoxMergeApp.wxi

    r58793 r59329  
    6464        </File>
    6565
     66        <!-- Note: This file ID *must not* be changed because of our typelib template generation file! -->
     67<?if $(env.VBOX_WITH_MIDL_PROXY_STUB) != "yes" ?>
    6668        <!-- We set KeyPath on this file to instruct TypeLib to read the TLB resource from it
    6769             and create appropriate Interface registry entries. Note that the same TLB is present
    6870             in VBoxSVC.exe - it's just a matter of choice which one to use -->
    69         <!-- Note: This file ID *must not* be changed because of our typelib template generation file! -->
    7071        <File Id="VBoxC" Name="VBoxC.dll"
    7172              Source="$(env.PATH_OUT)\bin\VBoxC.dll" KeyPath="yes">
    7273        </File>
     74<?else?>
     75        <File Id="VBoxC" Name="VBoxC.dll"
     76              Source="$(env.PATH_OUT)\bin\VBoxC.dll" KeyPath="no">
     77        </File>
     78
     79        <!-- We put the typelib in the proxy stub since it's always required to be loaded and is
     80             significantly smaller than VBoxC.dll.  So, KeyPath for this element instead of the above. -->
     81        <File Id="file_VBoxProxyStub" Name="VBoxProxyStub.dll" KeyPath="yes"
     82              Source="$(env.PATH_OUT)\bin\VBoxProxyStub.dll">
     83            <!-- TODO: figure how 327E3C00-EE61-462F-AED3-0DFF6CBF9904 is selected. -->
     84            <Class Id="{327E3C00-EE61-462F-AED3-0DFF6CBF9904}" Context="InprocServer32"
     85                Description="PSFactoryBuffer" ThreadingModel="both" >
     86            </Class>
     87        </File>
     88<?endif?>
    7389
    7490        <!-- Include the auto-generated TypeLib block -->
  • trunk/src/VBox/Installer/win/VBoxMergeAppSeq.wxi

    r56299 r59329  
    33    VirtualBox Windows Installation Script (WiX)
    44
    5     Copyright (C) 2006-2015 Oracle Corporation
     5    Copyright (C) 2006-2016 Oracle Corporation
    66
    77    This file is part of VirtualBox Open Source Edition (OSE), as
     
    1717         xmlns:difxapp="http://schemas.microsoft.com/wix/DifxAppExtension">
    1818
     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
    1954</Include>
     55
  • trunk/src/VBox/Installer/win/VBoxMergeCOM32On64.wxi

    r56299 r59329  
    1919<?if $(env.VBOX_WITH_32_ON_64_MAIN_API) = "yes" ?>
    2020    <Directory Id="dir_VBoxCOM32On64X86" Name="x86">
    21         <!-- The 32-bit client COM component (see also cp_MainCom below) -->
     21        <!-- The 32-bit client COM component (see also cp_MainCom in VBoxMergeApp.wxi) -->
    2222        <Component Id="cp_MainCOM_x86" Guid="B600824E-4A25-2EB3-4B44-3D8CB7F9B92D" Win64="no">
    2323            <!-- Note: This file ID *must not* be changed because of our typelib template generation file! -->
     24    <?if $(env.VBOX_WITH_MIDL_PROXY_STUB) != "yes" ?>
    2425            <File Id="VBoxClient_x86" Name="VBoxClient-x86.dll"
    2526                  Source="$(env.PATH_OUT)\bin\x86\VBoxClient-x86.dll" KeyPath="yes"
    2627                  DiskId="$(var.Property_DiskIdCommon)">
    2728            </File>
     29    <?else?>
     30            <File Id="VBoxClient_x86" Name="VBoxClient-x86.dll"
     31                  Source="$(env.PATH_OUT)\bin\x86\VBoxClient-x86.dll"
     32                  DiskId="$(var.Property_DiskIdCommon)">
     33            </File>
     34            <!-- Our key path, see VBoxMergeApp.wxi. -->
     35            <File Id="file_VBoxProxyStub_x86" Name="VBoxProxyStub-x86.dll" KeyPath="yes"
     36                Source="$(env.PATH_OUT)\bin\VBoxProxyStub-x86.dll"
     37                DiskId="$(var.Property_DiskIdCommon)">
     38                <Class Id="{327E3C00-EE61-462F-AED3-0DFF6CBF9904}" Context="InprocServer32"
     39                    Description="PSFactoryBuffer" ThreadingModel="both" />
     40            </File>
     41    <?endif?>
    2842            <File Id="file_VBoxRT_x86" Name="VBoxRT-x86.dll"
    2943                  Source="$(env.PATH_OUT)\bin\x86\VBoxRT-x86.dll"
Note: See TracChangeset for help on using the changeset viewer.

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