Files
wordcraft/packaging/windows/wordcraft.wxs
T
Valentin KleinandClaude Opus 5.5 7040751a54 Windows installer: show a finish page after installing (#198) (#257)
The MSI had no UI, so Windows Installer showed only its basic progress box and closed
without saying the install had worked. It now uses WiX's standard WixUI_Minimal dialogs:
a welcome page with the license (MIT or Apache-2.0, built at packaging time from
LICENSE-MIT and LICENSE-APACHE), progress, and a finish page with an optional
"Launch WordCraft" checkbox. The release and Windows ARM64 workflows install the WiX
UI and Util extensions the build now needs. UpgradeCode and component GUIDs are unchanged.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:23:03 -04:00

85 lines
4.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
WordCraft MSI (WiX Toolset v5: `dotnet tool install -g wix`, plus its UI and Util extensions:
`wix extension add -g WixToolset.UI.wixext/5.0.2` and the same for WixToolset.Util.wixext).
Built by package.ps1:
wix build wordcraft.wxs -arch x64 -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext
-d Version=1.2.3 -d BinDir=... -d IconPath=... -d LicenseRtf=... -o out.msi
Per-machine install into Program Files with a Start Menu shortcut. The installer shows the
standard WiX dialogs: welcome + license, progress, and a finish page.
UpgradeCode and the component GUIDs below belong to WordCraft alone. Never copy them from (or
into) a sibling Craft app: Windows Installer treats every package sharing an UpgradeCode as one
product, so a shared code makes one app's installer refuse to install ("a newer version is
already installed") or silently uninstall the other. packaging-lint.yml checks this.
-->
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">
<Package
Name="WordCraft"
Manufacturer="Learning Machines LLC"
Version="$(var.Version)"
UpgradeCode="075497F9-E861-45D0-9C7F-A74F8C34E6BA"
Scope="perMachine"
Compressed="yes"
Language="1033">
<SummaryInformation Description="WordCraft word processor" Manufacturer="Learning Machines LLC" />
<!-- Same-version upgrades let successive pre-releases of one X.Y.Z replace each other
(MSI versions are numeric, so 1.2.3-rc.1 and 1.2.3-rc.2 are both 1.2.3). -->
<MajorUpgrade AllowSameVersionUpgrades="yes"
DowngradeErrorMessage="A newer version of WordCraft is already installed." />
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
<Icon Id="WordcraftIcon.ico" SourceFile="$(var.IconPath)" />
<Property Id="ARPPRODUCTICON" Value="WordcraftIcon.ico" />
<Property Id="ARPURLINFOABOUT" Value="https://getartcraft.com/apps/wordcraft" />
<Property Id="ARPURLUPDATEINFO" Value="https://getartcraft.com/apps/wordcraft" />
<Property Id="ARPHELPLINK" Value="https://discord.gg/artcraft" />
<!-- Installer UI (#198): WixUI_Minimal is welcome + license, progress, then a finish page so
people can see the install worked. Its dialogs and bitmaps are WiX's own
(WixToolset.UI.wixext); package.ps1 builds the license RTF from LICENSE-MIT and
LICENSE-APACHE. The finish page offers to launch WordCraft (ticked by default) through
WixShellExec (WixToolset.Util.wixext); silent installs (/qn) never show it. -->
<WixVariable Id="WixUILicenseRtf" Value="$(var.LicenseRtf)" />
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch WordCraft" />
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1" />
<Property Id="WixShellExecTarget" Value="[#WordcraftExe]" />
<CustomAction Id="LaunchWordcraft" BinaryRef="Wix4UtilCA_$(sys.BUILDARCHSHORT)" DllEntry="WixShellExec"
Impersonate="yes" Return="ignore" />
<UI>
<ui:WixUI Id="WixUI_Minimal" />
<Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="LaunchWordcraft"
Condition="WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 AND NOT Installed" />
</UI>
<StandardDirectory Id="ProgramFiles6432Folder">
<Directory Id="INSTALLFOLDER" Name="WordCraft" />
</StandardDirectory>
<StandardDirectory Id="ProgramMenuFolder" />
<Feature Id="Main" Title="WordCraft" Level="1">
<ComponentGroupRef Id="WordcraftFiles" />
</Feature>
</Package>
<Fragment>
<ComponentGroup Id="WordcraftFiles" Directory="INSTALLFOLDER">
<Component Id="WordcraftApp" Guid="855DCEC6-9285-444F-9382-9654B83B34F6">
<File Id="WordcraftExe" Source="$(var.BinDir)\wordcraft.exe" KeyPath="yes">
<Shortcut Id="StartMenuShortcut" Directory="ProgramMenuFolder" Name="WordCraft"
Description="WordCraft word processor" WorkingDirectory="INSTALLFOLDER" Advertise="yes"
Icon="WordcraftIcon.ico" IconIndex="0" />
</File>
<RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\App Paths\wordcraft.exe" Value="[#WordcraftExe]" Type="string" />
</Component>
<Component Id="WordcraftCli">
<File Id="WordcraftCliExe" Source="$(var.BinDir)\wordcraft-cli.exe" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>