gpt4 book ai didi

wix - 我可以将自动生成的 GUIDS 与合并模块一起使用吗?

转载 作者:行者123 更新时间:2023-12-04 21:47:21 30 4
gpt4 key购买 nike

我在 <Product> 中使用自动引导但无法弄清楚如何将它们与 <Module> 一起使用.我只得到这个错误:

The component X has a key file with path 'TARGETDIR\company...'. Since this path is not rooted in one of the standard directories (like ProgramFiles Folder), the component does not meet the criteria for having an automatically generated guid.

以上,company是映射到 !(loc.ProductManufacturerFolderName) 的值.

唯一的问题是事实并非如此。我的目录就像我的产品一样 Root 于 ProgramFiles,并且我的产品运行良好:

<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFiles64Folder">
<Directory Id="MODULEINSTALLLOCATION" Name="!(loc.ProductManufacturerFolderName)">
<Directory Id="Data" Name="Data">

我所有的组件声明大致如下所示:

<Component Id="DocumentationParty_Business_TestCases_v1xlsx.component" Guid="{YOURGUID-1234-1234-84B3-C595A63428AD}" MultiInstance="yes">
<File Source="../../Development/Integration/SSIS/Documentation/Party_Business_Test Cases_v1.xlsx" KeyPath="yes" Id="DocumentationParty_Business_TestCases_v1xlsx.file" />
</Component>

破解很简单,你只需要将 GUID 更改为 *以及上述错误结果。这是坏的:

<Component Id="DocumentationParty_Business_TestCases_v1xlsx.component" Guid="*" MultiInstance="yes">
<File Source="../../Development/ClaimsIntegration/SSIS/Documentation/Party_Business_Test Cases_v1.xlsx" KeyPath="yes" Id="DocumentationParty_Business_TestCases_v1xlsx.file" />
</Component>

我为要安装组件的每个目录都有一个 .wxs 文件。我所有的组件持有 .wxs 文件都具有以下结构:

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<ComponentGroup Id="DatabasePolicy_Files">
<ComponentRef Id="DatabasePolicyCreateDatabasecmdtemplate.component" />
</ComponentGroup>
<DirectoryRef Id="DataPolicy">
<Component Id="DatabasePolicyCreateDatabasecmdtemplate.component" Guid="*" MultiInstance="yes">
<File Source="../../Development/Database/Policy/CreateDatabase.cmd.template" KeyPath="yes" Id="DatabasePolicyCreateDatabasecmdtemplate.file" />
</Component>
</DirectoryRef>
</Fragment>
</Wix>

每个<ComponentGroup>通过 <ComponentGroupRef> 包含在我的主 .wxs 文件中.这适用于我所有的 MSI 项目,并且只有在我开始使用合并模块后才会中断。此外,我已经尝试注释掉所有组件,除了符合上述定义的组件,它仍然会因相同的错误而中断。

问题是什么?

最佳答案

我自己也遇到过类似的问题,根据您的错误消息,它可能是一样的。尝试添加一个 ComponentGuidGenerationSeed,这应该可以解决您的问题。 ComponentGuidGenerationSeed 也作用于所有子文件夹,因此顶层的一个就足够了。

例子:

<Directory Id="DOCUMENTATIONFOLDER" Name="Documentation" ComponentGuidGenerationSeed="a9f690d3-22b3-488f-bdac-bb665c25933c"/>

http://wixtoolset.org/documentation/manual/v3/xsd/wix/directory.html

The Component Guid Generation Seed is a guid that must be used when a Component with the generate guid directive ("*") is not rooted in a standard Windows Installer directory (for example, ProgramFilesFolder or CommonFilesFolder).

关于wix - 我可以将自动生成的 GUIDS 与合并模块一起使用吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34424365/

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