【问题标题】:WiX nesting child directories under installation directoryWiX在安装目录下嵌套子目录
【发布时间】:2018-09-27 17:59:12
【问题描述】:

我正在创建一个 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>

【问题讨论】:

  • 如何“允许用户更改安装目录”?
  • @BobArnson 在更新 INSTALL_FOLDER 属性的自定义 UI 对话框中。
  • @BobArnson 我已经回答了这个问题 - 不知道为什么你的问题最终是相关的!

标签: wix windows-installer


【解决方案1】:

问题在于INSTALL_FOLDER 下方的文件夹 ID 的大写字母。将这些更改为具有一些小写字符可以解决此问题。这似乎是因为只有大写的 ID 被区别对待。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-10-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-01-31
    相关资源
    最近更新 更多