WIX:具有多个功能/文件夹的热重复 ID 问题 [英] WIX: Heat duplicate id issue with multiple features/folders

查看:28
本文介绍了WIX:具有多个功能/文件夹的热重复 ID 问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Wix 的新手,正在创建一个多功能 Wix 项目.我们的产品有 4 个模块,每个模块都必须作为一项功能包含在 Windows 安装程序中.但所有功能都共享相同的文件夹结构.

我正在使用命令行来构建我的 Wix 项目.将每个模块收集到不同的 wxs 片段后,light.exe 给出错误,指出目录中的 id 重复.

我的文件树看起来像...

<前>模块A - 核心|--bin|--etc||--mgr|--lib|-- a.txt模块B|--bin|--etc||--mgr|--lib|-- b.txt模块C|--bin|--etc||--mgr|--lib|-- c.txt

我正在使用以下命令...

<前>@echo 正在收集目标文件....heat.exe 目录 .\Mod1 -cg Mod1ComponentGroup -nologo -gg -scom -sfrag -sreg -srd -ke -dr 安装 -var var.mod1files -out Mod1Files.wxsheat.exe 目录 .\Mod2 -cg Mod2ComponentGroup -nologo -gg -scom -sfrag -sreg -srd -ke -dr 安装 -var var.mod2files -out Mod2Files.wxsheat.exe 目录 .\Mod3 -cg Mod3ComponentGroup -nologo -gg -scom -sfrag -sreg -srd -ke -dr 安装 -var var.mod3files -out Mod3Files.wxs@echo 编译模块....蜡烛.exe -nologo myproj.wxs Mod1Files.wxs Mod2Files.wxs Mod3Files.wxs -dmod1files =.\Mod1 -dmod2files=.\Mod2 -dmod3files=.\Mod3@正在创建 MSI...设置 msi_name=MYProduct.1.0.12345.Win32.msilight.exe -nologo -ext WixUIExtension -cultures:en-us myproj.wixobj Mod1Files.wixobj Mod2Files.wixobj Mod3Files.wixobj -o %msi_name%

有什么办法可以避免重复 ID 错误?

任何帮助将不胜感激.

提前致谢.

穆图

解决方案

如果您使用的是 Merge Modules,这没问题,因为每个 ID 都会附加一个唯一的模块 ID.( dir1.GUIDA, dir1.GUIDB, dir1.GUIDC ) 如果您使用片段,您必须更改 ID 或将目录结构规范化为单个 wxs,并使用 DirectoryRef 将其与组件一起拉入其他 wxs.

我不确定 Heat 能否自动处理所有这些.这实际上只是一个起点.

I am newbie to Wix and creating a multi feature Wix project. Our product is having 4 modules and each module has to be included as a feature in the Windows installer. But all features are sharing the same folder structure.

I am using commandline to build my Wix project. After harvesting every module into different wxs fragments, the light.exe giving error saying that duplicate id in the dirercoty table.

My file tree is look like...

    ModuleA - Core
 |--bin
 |--etc
 |   |--mgr
 |--lib
 |-- a.txt

ModuleB
 |--bin
 |--etc
 |   |--mgr
 |--lib
 |-- b.txt

ModuleC 
 |--bin
 |--etc
 |   |--mgr
 |--lib
 |-- c.txt

I am using following commands...

@echo Harvesting target files....
heat.exe dir .\Mod1 -cg Mod1ComponentGroup -nologo -gg -scom -sfrag -sreg -srd -ke -dr INSTALLLOCATION -var var.mod1files -out Mod1Files.wxs

heat.exe dir .\Mod2 -cg Mod2ComponentGroup -nologo -gg -scom -sfrag -sreg -srd -ke -dr INSTALLLOCATION -var var.mod2files -out Mod2Files.wxs

heat.exe dir .\Mod3 -cg Mod3ComponentGroup -nologo -gg -scom -sfrag -sreg -srd -ke -dr INSTALLLOCATION -var var.mod3files -out Mod3Files.wxs

@echo Compile modules....
candle.exe -nologo myproj.wxs Mod1Files.wxs Mod2Files.wxs Mod3Files.wxs -dmod1files =.\Mod1 -dmod2files=.\Mod2  -dmod3files=.\Mod3

@Creating MSI...
set msi_name=MYProduct.1.0.12345.Win32.msi

light.exe -nologo -ext WixUIExtension -cultures:en-us myproj.wixobj Mod1Files.wixobj Mod2Files.wixobj Mod3Files.wixobj -o %msi_name%

Is there any way to avoid the Duplicate ID error?

Any help would be really appreciated.

Thanks in Advance.

Muthu

解决方案

If you were using Merge Modules this would be ok because each ID would be appended with a unique module ID. ( dir1.GUIDA, dir1.GUIDB, dir1.GUIDC ) If you are using fragments you either have to change the ID's or normalize the directory structure into a single wxs and use a DirectoryRef to pull it into your other wxs with your components.

I'm not sure Heat can handle all of this automatically. It's really just more of a starting point.

这篇关于WIX:具有多个功能/文件夹的热重复 ID 问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆