gpt4 book ai didi

wix - 如何使用 wix bootstraper 更改 exe 文件的详细信息?

转载 作者:行者123 更新时间:2023-12-05 02:20:53 25 4
gpt4 key购买 nike

我有一个 Visual Studio 包文件:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle
Name="Some Name"
Version="3.2.2"
Manufacturer="Some Company"
Copyright="Copyright: Some Company, Inc">
...
</Bundle>
</Wix>

构建后的exe详细信息菜单包含两个参数(文件描述和产品名称)并且这些参数具有相同的值。有一种方法可以仅使用 WIX 功能使这些值不同吗?

enter image description here

最佳答案

从 Wix 版本 3.10.2 开始,您不能为 exe 文件描述资源的 ProductNameFileDescription 字段设置不同的值。

查看 WIX 源代码,特别是 WIX310-Debug.zip 中的文件 src\tools\wix\Binder.cs,可从 here 下载, 显示了以下用于设置 exe 文件资源的代码片段:

        Microsoft.Deployment.Resources.VersionStringTable strings = version[1033];
strings["LegalCopyright"] = bundleInfo.Copyright;
strings["OriginalFilename"] = Path.GetFileName(outputPath);
strings["FileVersion"] = bundleInfo.Version; // string versions do not have to be four parts.
strings["ProductVersion"] = bundleInfo.Version; // string versions do not have to be four parts.

if (!String.IsNullOrEmpty(bundleInfo.Name))
{
strings["ProductName"] = bundleInfo.Name;
strings["FileDescription"] = bundleInfo.Name;
}

请注意,ProductNameFileDescription 设置为相同的值。

如果这很重要,您可以通过 WiX 问题跟踪数据库请求新功能:https://github.com/wixtoolset/issues/issues .

关于wix - 如何使用 wix bootstraper 更改 exe 文件的详细信息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37858392/

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