如何使用 wix bootstraper 更改 exe 文件的详细信息?
How change details of an exe file using wix bootstraper?
我有一个 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 功能使这些值不同吗?
从 Wix 版本 3.10.2 开始,您不能为 exe 文件描述资源的 ProductName
和 FileDescription
字段设置不同的值。
查看 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;
}
请注意 ProductName
和 FileDescription
设置为相同的值。
如果这很重要,您可以通过 WiX 问题跟踪数据库请求新功能:https://github.com/wixtoolset/issues/issues。
我有一个 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 功能使这些值不同吗?
从 Wix 版本 3.10.2 开始,您不能为 exe 文件描述资源的 ProductName
和 FileDescription
字段设置不同的值。
查看 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;
}
请注意 ProductName
和 FileDescription
设置为相同的值。
如果这很重要,您可以通过 WiX 问题跟踪数据库请求新功能:https://github.com/wixtoolset/issues/issues。