在生成MergeModule的情况下,Component / @ Guid属性是否必须(Is Component/@Guid attribute is a MUST in case of produc

编程入门 行业动态 更新时间:2024-10-08 01:29:28
在生成MergeModule的情况下,Component / @ Guid属性是否必须(Is Component/@Guid attribute is a MUST in case of producing MergeModule)

在我的组件的.wxs文件中,只有具有单个文件的组件,这是可生成的GUID的情况。 但在我看来,对于.msm(合并模块),应该明确指定组件的GUID。 或者我可以自由使用Guid =“*”,那可以吗?

我试过这个: <Component Guid="*"> <File Id="$(var.Logger.TargetFileName)" Source="$(var.Logger.TargetPath)" KeyPath="yes" /> </Component>

光中得到一个错误,那个

组件的密钥文件的路径没有植根于其中一个标准目录(如ProgramFilesFolder)

...我很困惑,因为这条路径植根于ProgramFiles : <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="$(var.PlatformProgramFilesFolder)"> <Directory Id="ProductVendor" Name="$(var.BaseProductVendorDirectory)"> <Directory Id="BaseProductDirectory" Name="$(var.BaseProductName)"> <Directory Id="ConfiguratorDir" Name="Configurator" /> </Directory> </Directory> </Directory> </Directory>

In my .wxs file for components, there are only components with single file, and this is the case for generatable GUIDs. But it seems to me that for .msm (merge module), component's GUID should be explicitly specified. Or I'm free to use Guid="*" and that would be OK?

I tried this:<Component Guid="*"> <File Id="$(var.Logger.TargetFileName)" Source="$(var.Logger.TargetPath)" KeyPath="yes" /> </Component>

And got an error from light, that

path for key file of the component is not rooted in one of the standard directories (like ProgramFilesFolder)

... I'm confused, because this path is rooted in ProgramFiles:<Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="$(var.PlatformProgramFilesFolder)"> <Directory Id="ProductVendor" Name="$(var.BaseProductVendorDirectory)"> <Directory Id="BaseProductDirectory" Name="$(var.BaseProductName)"> <Directory Id="ConfiguratorDir" Name="Configurator" /> </Directory> </Directory> </Directory> </Directory>

最满意答案

您应该能够在具有根目录的合并模块中使用自动生成的GUID。 但是,在修复了错误http://wixtoolset.org/issues/3810/之前,WIX 3.6中引入的更改可能会使这变得不可能。

另见http://wixtoolset.org/issues/2353/ 。

还有http://sourceforge.net/p/wix/mailman/message/29956690/ (单击查看整个线程链接以查看完整讨论)。

You should be able to use automatically generated GUIDs in merge modules with rooted directories. But changes introduced in WIX 3.6 probably makes this impossible until bug http://wixtoolset.org/issues/3810/ is fixed.

See also http://wixtoolset.org/issues/2353/.

And also http://sourceforge.net/p/wix/mailman/message/29956690/ (click the View entire thread link to see the full discussion).

更多推荐

本文发布于:2023-07-19 15:42:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1182564.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:属性   情况下   Component   MergeModule   Guid

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!