Wix安装程序和禁用的功能
发布时间:2020-12-14 01:36:11 所属栏目:Windows 来源:网络整理
导读:我正在使用Wix3 beta和Feature Tree UI.我将几个程序集作为单独的组件安装到ProgramFiles中的自定义子目录中,也安装到GAC中.另外,我想将相同程序集的DEBUG版本打包为一个组件,让用户决定是否安装它们.现在,默认情况下禁用调试程序集的此功能,但无论如何都会
我正在使用Wix3 beta和Feature Tree UI.我将几个程序集作为单独的组件安装到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="DebugXXX.dll"></File> </Component> </Directory> <Directory Id="Release" Name="Release"> <Component Id="ReleaseComponent" Guid="PUT-GUID-HERE"> <File Id="ReleaseAssemblyXXX" DiskId="1" Source="ReleaseXXX.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. 有什么建议? 解决方法
如果其他人对此感到困惑:显然顶层功能不应该像我的情况一样命名为“All” – 它可能对Wix / Windows Installer有一些默认含义.将其重命名为其他内容时,一切都按预期工作.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |