wix - 如何使用 wix 创建 msi 安装程序?
问题描述
我想使用 wix 创建一个 msi 安装文件。
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="SetupProject1" Language="1033" Version="1.0.0.0" Manufacturer="winitech" UpgradeCode="5a410445-8d05-44f3-aa33-3662cf67060a">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate />
<Feature Id="ProductFeature" Title="SetupProject1" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="SetupProject1" />
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
<!-- <Component Id="ProductComponent"> -->
<!-- TODO: Insert files, registry keys, and other resources here. -->
<!-- </Component> -->
</ComponentGroup>
</Fragment>
</Wix>
在名为symbols 的子文件夹中还有一个文件。
我想我需要将它添加到 componentGroup 但我不知道如何。
解决方案
快速“教程”:一些指向使用中的 WiX 示例的指针:
- WiX 快速入门链接合集
- 使用 Visual Studio 进行 WiX 演示
- https://www.firegiant.com/wix/tutorial/(Firegiant是WiX的商业分支)
- 这里有几个示例:https ://github.com/glytzhkof/all - 也许尝试“ VBScriptWriteToLog ”
一些观察:不包括所有构建文件:
- 不要包含用于调试 ( Skeet )的
.pdb
文件或其他文件。 - 不要分发调试版本,以发布模式构建并使用这些文件(除非您想在内部测试调试版本)。
- XML 文件通常应与XmlFile 和 XmlConfig 元素一起安装。
推荐阅读
- c# - HttpClient在某些情况下修改BaseAddress
- c# - ASP.Net Core 3.1 的 Autofac 配置不起作用
- python - 如何将列的实际行与另一列熊猫的前一行相加?
- python - python中可靠的服务器客户端通信
- r - 如何捕获R中非标准函数的输出?
- c++ - 可变参数模板类未完全展开
- mysql - MySQL通过“on duplicate key update”插入新记录时将旧值增加新值
- php - Laravel 8 依赖注入错误:目标类...不存在
- firebase - Firestore 安全规则。允许阅读完整的集合(文档和子集合)
- node.js - 无法使用来自 DynamoDB 的项目的属性作为变量来使用 NodeJs 在同一个表上创建另一个项目以用于 AWS Lambda 函数