gpt4 book ai didi

Wix 安装程序和禁用的功能

转载 作者:行者123 更新时间:2023-12-05 00:09:17 25 4
gpt4 key购买 nike

我正在使用带有功能树 UI 的 Wix3 测试版。我将几个程序集作为单独的组件安装到 ProgramFiles 内的自定义子目录中,以及安装到 GAC 中。此外,我想将相同程序集的 DEBUG 版本打包为一个组件,并让用户决定是否安装它们。现在默认情况下禁用调试程序集的此功能,但无论如何都会安装调试程序集。

在相关片段下方:

<DirectoryRef Id="INSTALLDIR">
<Directory Id="bin" Name="bin">
<Directory Id="Debug" Name="Debug">
<Component Id="DebugComponent" Guid="PUT-GUID-HERE">
<File Id="DebugAssemblyXXX" DiskId="1" Source="Debug\XXX.dll"></File>
</Component>
</Directory>
<Directory Id="Release" Name="Release">
<Component Id="ReleaseComponent" Guid="PUT-GUID-HERE">
<File Id="ReleaseAssemblyXXX" DiskId="1" Source="Release\XXX.dll"></File>
</Component>
</Directory>
</Directory>
</DirectoryRef>

<Feature Id="All" ConfigurableDirectory="INSTALLDIR" Title="Title" Level="1"
Display="expand" AllowAdvertise="no" Absent="disallow" Description="Desc">

<Feature Id="DebugAssemblies" Title="Debug Assemblies" Level="1000" Absent="allow"
AllowAdvertise="no" Description="Debug versions of assemblies.">
<ComponentRef Id="DebugComponent" />
</Feature>

<Feature Id="ReleaseFeature1" Title="Feature" Level="3"
AllowAdvertise="no" Description="Another description">
<ComponentRef Id="ReleaseComponent"/>
</Feature>
</Feature>

奇怪的是,如果我再次运行 msi 文件并转到“更改”并禁用调试功能,调试程序集将被删除,例如这次逻辑运行良好。

默认的 INSTALLLEVEL 是 3。

有什么建议?

最佳答案

如果其他人对此感到困惑:显然顶级功能不应该像我的情况一样命名为“全部” - 它可能对 Wix/Windows Installer 具有一些默认含义。将其重命名为其他名称后,一切都按预期工作。

关于Wix 安装程序和禁用的功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/650884/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com