我正在创建WiX安装程序,并允许用户更改安装目录INSTALL_FOLDER
。如果用户更改了安装目录,请说D:\Here
,然后将组件文件添加到AAX_BIN_FOLDER
仍然会导致该文件被添加到C:\Program Files\Manufacturer\Product\Test AAX Plugin\Context\x64\Test.aaxplugin
而不是D:\Here\Test AAX Plugin\Context\x64\Test.aaxplugin
。
我在以下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>
答案 0 :(得分:0)
问题是INSTALL_FOLDER
下面的文件夹ID的大写字母。更改这些字符以使其具有一些小写字符可以解决此问题。这似乎是由于仅对大写ID进行了不同处理。