keith
keith

Reputation: 5332

WiX nesting child directories under installation directory

I am creating a WiX installer and allow the user to change the installation directory INSTALL_FOLDER. If the user changes the installation directory, say to D:\Here then adding a component file to AAX_BIN_FOLDER still results in the file being added to C:\Program Files\Manufacturer\Product\Test AAX Plugin\Context\x64\Test.aaxplugin rather than D:\Here\Test AAX Plugin\Context\x64\Test.aaxplugin.

What am I doing wrong in the following XML?

<Feature Id="AAX" Title="AAX" Level="1">
    <ComponentGroupRef Id="group.AAX" />
</Feature>

<Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="$(var.Program_Files)">
            <Directory Id="INSTALL_FOLDER_MANUFACTURER" Name="$(var.Manufacturer)">
                <Directory Id="INSTALL_FOLDER" Name="$(var.Short_Name)">
                    <Directory Id="INSTALL_AAX_PLUGIN_FOLDER" Name="$(var.Short_Name) AAX Plugin">
                        <Directory Id="INSTALL_AAX_CONTENT" Name="Content">
                            <Directory Id="INSTALL_AAX_BIN_FOLDER" Name="$(var.AAX_Architecure)" />
                            <Directory Id="INSTALL_AAX_RESOURCES_FOLDER" Name="Resources" />
                        </Directory>
                    </Directory>
                </Directory>
            </Directory>
        </Directory>
    </Directory>

    <ComponentGroup Id="group.AAX">
        <Component Id='component.AAX' Guid='$(var.Component_Aax_Guid)' Transitive="yes" Directory="AAX_BIN_FOLDER">
                <File Id="file.AAX" Source='..\..\build_release$(var.Architecture_Number)\Test.aaxplugin' Name="Test.aaxplugin" Vital='yes' KeyPath='yes' />
        </Component>
    </ComponentGroup>
</Fragment>

Upvotes: 1

Views: 68

Answers (1)

keith
keith

Reputation: 5332

The problem is the upper casing of the folder IDs below INSTALL_FOLDER. Changing these to have some lower case characters fixed the issue. This seems to be due to upper case only IDs being treated differently.

Upvotes: 1

Related Questions