Files
2026-11-03 16:29:44 -05:00

95 lines
3.8 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
MSI installer for Olm (WiX v4+ schema).
Built in CI by the sign-windows job in .github/workflows/cicd.yml:
wix build -arch x64 -d Version=X.Y.Z -d BuildDir=bin -o bin/olm_windows_installer.msi olm.wxs
Requires bin/olm_windows_amd64.exe and third_party/wintun/amd64/wintun.dll.
-->
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Package Name="olm"
Language="1033"
Version="$(var.Version)"
Manufacturer="Fossorial Inc."
UpgradeCode="7DEB211A-A3FB-433E-A4D8-868666329BAE"
Compressed="yes">
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes" />
<!--
Migration from the legacy Inno Setup installer (olm.iss, AppId {44A24E4C-B616-476F-ADE7-8D56B930959E}).
Both installers use C:\Program Files\olm, so the old install is silently uninstalled
(removes its files, Start menu entry, PATH entry and Add/Remove Programs entry)
right before this MSI lays down its own files in the same place.
-->
<Property Id="LEGACYINNOUNINSTALL">
<RegistrySearch Id="LegacyInnoUninstallString"
Root="HKLM"
Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{44A24E4C-B616-476F-ADE7-8D56B930959E}_is1"
Name="UninstallString"
Type="raw"
Bitness="always64" />
</Property>
<CustomAction Id="RemoveLegacyInnoInstall"
Directory="INSTALLFOLDER"
ExeCommand="[LEGACYINNOUNINSTALL] /VERYSILENT /SUPPRESSMSGBOXES /NORESTART"
Execute="deferred"
Impersonate="no"
Return="ignore" />
<InstallExecuteSequence>
<Custom Action="RemoveLegacyInnoInstall"
Before="InstallFiles"
Condition="LEGACYINNOUNINSTALL AND NOT REMOVE" />
</InstallExecuteSequence>
<StandardDirectory Id="ProgramFiles64Folder">
<Directory Id="INSTALLFOLDER" Name="olm">
<Component Id="Olm" Guid="374E18DB-E016-4731-9387-E9B034EE41D5">
<File Id="OlmExe"
Source="$(var.BuildDir)/olm_windows_amd64.exe"
Name="olm.exe"
KeyPath="yes" />
<Environment Id="OlmPath"
Name="PATH"
Value="[INSTALLFOLDER]"
Part="last"
Action="set"
System="yes" />
</Component>
<Component Id="WintunDll" Guid="7D453297-97CB-4900-927C-78CBE10EE125">
<File Id="WintunDll"
Source="third_party/wintun/amd64/wintun.dll"
Name="wintun.dll"
KeyPath="yes" />
</Component>
</Directory>
</StandardDirectory>
<StandardDirectory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="olm">
<Component Id="StartMenuShortcut" Guid="2FA6F944-EA75-4CA1-A44A-8CC07E4BB929">
<Shortcut Id="StartMenuShortcut"
Name="olm"
Description="Olm"
Target="[INSTALLFOLDER]olm.exe" />
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall" />
<RegistryValue Root="HKCU"
Key="Software\Fossorial\Olm"
Name="StartMenuShortcut"
Type="integer"
Value="1"
KeyPath="yes" />
</Component>
</Directory>
</StandardDirectory>
<Feature Id="ProductFeature" Title="olm" Level="1">
<ComponentRef Id="Olm" />
<ComponentRef Id="WintunDll" />
<ComponentRef Id="StartMenuShortcut" />
</Feature>
</Package>
</Wix>