WiX – 在两个不同的位置安装相同的文件
在我的安装程序中,我有两个可选功能,即同一软件的版本5和6的插件.它们将相同的文件(相同名称,相同的二进制内容)安装到应用程序的“plugins”文件夹中.
但是我有以下错误:
我试过了: >使用相同的文件,两个组件都将其用作Source 但是,静止,WiX拒绝建立. wxs文件详细信息: >在注册表中搜索TheApp v5和v6的安装目录: <Property Id="PROP_APPV5PATH"> <RegistrySearch Id='RegSearch_AppV5Path' Type='raw' Root='HKLM' Key='SOFTWARETheCompanyTheApp5.0' Name='Installdir' Win64="yes"/> </Property> <Property Id="PROP_APPV6PATH"> <RegistrySearch Id='RegSearch_3AppV6Path' Type='raw' Root='HKLM' Key='SOFTWARETheCompanyTheApp6.0' Name='Installdir' Win64="yes"/> </Property> >单独的组件: <Directory Id="DIR_APPV5"> <Directory Id="Dir_AppV5Plugins" Name="plugins"> <Component Id="Comp_ThisAppV5_plugin" Guid="*"> <File Id="appv5plugin_dll" Source="filespluginsappv5app_plugin.dll" KeyPath="yes"/> </Component> </Directory> </Directory> <Directory Id="DIR_APPV6"> <Directory Id="Dir_AppV6Plugins" Name="plugins"> <Component Id="Comp_ThisAppV6_plugin" Guid="*"> <File Id="appv6plugin_dll" Source="filespluginsappv6app_plugin.dll" KeyPath="yes"/> </Component> </Directory> </Directory> >两个安装目录: <SetDirectory Id="DIR_APPV5" Value="[PROP_APPV5PATH]" /> <SetDirectory Id="DIR_APPV6" Value="[PROP_APPV6PATH]" /> >两个独立的功能 <Feature Id="Feat_ThisAppV5_plugin" Title="Plugin for App V5" ConfigurableDirectory="DIR_APPV5" Level="1000" AllowAdvertise='no' InstallDefault='local' Absent='allow'> <ComponentRef Id="Comp_ThisAppV5_plugin"/> </Feature> <Feature Id="Feat_ThisAppV6_plugin" Title="Plugin for App V6" ConfigurableDirectory="DIR_APPV6" Level="1000" AllowAdvertise='no' InstallDefault='local' Absent='allow'> <ComponentRef Id="Comp_ThisAppV6_plugin"/> </Feature> 解决方法
在为所有组件提供唯一的GUID并为每个文件提供唯一的Id和ShortName之后,我仍然遇到所有这些错误.我通过抑制ICE30的ICE验证来“修复”它.我还没有测试过,所以我不知道在安装和卸载多个版本的应用程序的插件时它是否能正常工作……
注意:忽略ICE错误的设置可在“工具设置”选项卡下的“项目属性”中找到. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |