name: wix-toolset-config description: 为Windows MSI安装程序配置WiX工具集 allowed-tools: Read, Write, Edit, Bash, Glob, Grep tags: [windows, wix, msi, installer, packaging]
wix-toolset-config
配置WiX工具集,以创建具有正确组件结构和功能的Windows MSI安装程序。
能力
- 生成WiX源文件(.wxs)
- 配置产品和包信息
- 设置组件和功能
- 配置注册表项
- 设置服务
- 处理升级
- 配置自定义操作
输入模式
{
"type": "object",
"properties": {
"projectPath": { "type": "string" },
"productName": { "type": "string" },
"version": { "type": "string" },
"manufacturer": { "type": "string" },
"upgradeCode": { "type": "string" }
},
"required": ["projectPath", "productName", "version"]
}
WiX示例
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*"
Name="我的应用程序"
Version="1.0.0.0"
Manufacturer="我的公司"
Language="1033"
UpgradeCode="PUT-GUID-HERE">
<Package InstallerVersion="200"
Compressed="yes"
InstallScope="perMachine"/>
<MajorUpgrade DowngradeErrorMessage="已安装更新版本。"/>
<MediaTemplate EmbedCab="yes"/>
<Feature Id="ProductFeature" Title="我的应用程序" Level="1">
<ComponentGroupRef Id="ProductComponents"/>
</Feature>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="MyApplication"/>
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="MainExecutable">
<File Source="$(var.SourceDir)\MyApp.exe"/>
</Component>
</ComponentGroup>
</Fragment>
</Wix>
相关技能
nsis-installer-generatormsix-package-generator