Swift Bundler uses WiX to create MSIs. You can customize the generated MSI by providing additional WXS configuration via the msi.wxs_extras field in your app's TOML configuration. These objects are appended to the generated project.wxs file (located at .build/bundler/apps/YourApp/project.wxs).
WXS to TOML Mapping
The msi.wxs_extras syntax mirrors WXS XML using TOML:
- Elements $\rightarrow$ TOML tables (dictionaries).
- XML Tag Name $\rightarrow$ The
tag field. - Raw Text Content $\rightarrow$ The
content field. - Child Elements $\rightarrow$ The
children field. - Attributes $\rightarrow$ Standalone fields in the table.
Example Conversion:
XML:
<Heart BPM="100">
<Ventricle Side="left" Health="90%"></Ventricle>
<Stent Age="5y">Bob's first stent</Stent>
</Heart>
TOML:
[apps.YourApp]
msi.wxs_extras = [
{
tag = "Heart",
BPM = "100",
children = [
{ tag = "Ventricle", Side = "left", Health = "90%" },
{ tag = "Stent", Age = "5y", content = "Bob's first stent" },
],
},
]