VirtualBox

Changeset 108306 in vbox


Ignore:
Timestamp:
Feb 20, 2025 9:39:09 AM (3 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
167650
Message:

Host installer/win: Fixed a regression from r166426 which could lead to an ERROR_BAD_EXE_FORMAT error. See comments for details. bugref:10762

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/win/VBoxMergeApp.wxi

    r108109 r108306  
    7373
    7474    <!-- COM components have a separate entry mainly because of the KeyPath attribute (that hints the
    75          TypeLib element where to take the TLB resource from) may appear only once per component -->
     75         TypeLib element where to take the TLB resource from) may appear only once per component.
     76
     77         Note: Before we VBoxSDS in an own component (cp_VBoxSDS), however, this makes the MSI validator freak
     78               out, as our (generated) typelib definitions we install below use files (VBoxC.dll + VBoxSDS.exe)
     79               from different components then. So we have to keep VBoxC.dll and VBoxSDS.exe in the same component -->
    7680    <Component Id="cp_MainCOM" Guid="CD4A3C6C-C2D5-428D-90A1-B6DA3D0777D6" Bitness="$(var.Property_Bitness)">
    7781
    7882        <!-- Note: This file ID *must not* be changed because of our typelib template generation file! -->
    79         <File Id="VBoxSVC" Name="VBoxSVC.exe" Source="$(env.PATH_OUT)\bin\VBoxSVC.exe">
    80         </File>
    81 
     83        <File Id="VBoxSVC" Name="VBoxSVC.exe" Source="$(env.PATH_OUT)\bin\VBoxSVC.exe" />
     84
     85        <!-- The following ifdef is needed to not have two files with a KeyPath attribute set, which breaks the build.
     86             If VBOX_WITH_SDS is defined, the VBoxSDS.exe below is being used as a KeyPath, as ServiceInstall uses the
     87             file for which the KeyPath attribute has been set as the service binary being written to the registry.
     88             So we have to prefer VBoxSDS in that case -->
     89<?if $(env.VBOX_WITH_SDS) = "yes" ?>
     90        <File Id="VBoxC" Name="VBoxC.dll" Source="$(env.PATH_OUT)\bin\VBoxC.dll" />
     91<?else?>
    8292        <!-- We set KeyPath on this file to instruct TypeLib to read the TLB resource from it
    83              and create appropriate Interface registry entries. Note that the same TLB is present
    84              in VBoxSVC.exe - it's just a matter of choice which one to use -->
    85         <!-- Note: This file ID *must not* be changed because of our typelib template generation file! -->
    86         <File Id="VBoxC" Name="VBoxC.dll" Source="$(env.PATH_OUT)\bin\VBoxC.dll" KeyPath="yes">
    87         </File>
    88 
     93             and create appropriate Interface registry entries
     94
     95             Note that the same TLB is present in VBoxSVC.exe and VBoxSDS.exe - it's just a matter of choice which one to use
     96             The file ID *must not* be changed because of our typelib template generation file! -->
     97        <File Id="VBoxC" Name="VBoxC.dll" Source="$(env.PATH_OUT)\bin\VBoxC.dll" KeyPath="$(var.Property_VBoxCDllAsTypelib)" />
     98<?endif?>
    8999        <!-- Include the auto-generated TypeLib block -->
    90100        <?include $(env.PATH_TARGET)\VirtualBox_TypeLib.wxi ?>
    91101
    92102<?if $(env.VBOX_WITH_SDS) = "yes" ?>
    93         <File Id="VBoxSDS" Name="VBoxSDS.exe" Vital="yes" Source="$(env.PATH_OUT)\bin\VBoxSDS.exe" />
     103        <File Id="VBoxSDS" Name="VBoxSDS.exe" Vital="yes" Source="$(env.PATH_OUT)\bin\VBoxSDS.exe" KeyPath="yes" />
    94104
    95105        <!-- The name of the Windows service is referenced in different places.
Note: See TracChangeset for help on using the changeset viewer.

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