mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-24 10:08:00 -06:00
The MSI registered no file association. The only PrintCraft entry a
user could pick in "Choose an app on your PC" was the advertised Start
Menu shortcut, which Windows can't run as a file handler ("This app
can't run on your PC").
The MSI now uses Windows' Default Programs registration: a
PrintCraft.Document ProgID (open command, icon), .pdf OpenWithProgids,
Applications\printcraft.exe (friendly name, supported types), and
Capabilities\FileAssociations listed under RegisteredApplications.
PrintCraft appears under "Open with" and in Settings > Default apps.
It never takes over an existing default: .pdf's own default value is
left alone, and the user chooses.
Checked locally with WiX 5.0.2: the MSI builds, passes ICE validation
(only the existing ICE61 note on same-version upgrades), and its
Registry table holds exactly these values.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
82 lines
5.2 KiB
XML
82 lines
5.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
PrintCraft MSI (WiX Toolset v5: `dotnet tool install -g wix`). Built by package.ps1:
|
|
|
|
wix build printcraft.wxs -arch x64 -d Version=1.2.3 -d BinDir=... -d IconPath=... -o out.msi
|
|
|
|
Per-machine install into Program Files, a Start Menu shortcut, an App Paths entry, and PrintCraft
|
|
registered as a PDF handler (offered under "Open with" and in Default apps, never forced as the
|
|
default). Files opened with PrintCraft arrive on its command line.
|
|
-->
|
|
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
|
|
<Package
|
|
Name="PrintCraft"
|
|
Manufacturer="Learning Machines LLC"
|
|
Version="$(var.Version)"
|
|
UpgradeCode="EA00C367-7270-4C50-9D8B-A7A5C88AD27F"
|
|
Scope="perMachine"
|
|
Compressed="yes"
|
|
Language="1033">
|
|
<SummaryInformation Description="PrintCraft PDF workbench" 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 PrintCraft is already installed." />
|
|
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
|
|
|
|
<!-- Windows Installer requires an Icon id ending in .ico or .exe, or advertised shortcuts and
|
|
Add/Remove Programs show a blank icon (#57). -->
|
|
<Icon Id="PrintcraftIcon.ico" SourceFile="$(var.IconPath)" />
|
|
<Property Id="ARPPRODUCTICON" Value="PrintcraftIcon.ico" />
|
|
<Property Id="ARPURLINFOABOUT" Value="https://getartcraft.com/apps/printcraft" />
|
|
<Property Id="ARPURLUPDATEINFO" Value="https://getartcraft.com/apps/printcraft" />
|
|
<Property Id="ARPHELPLINK" Value="https://discord.gg/artcraft" />
|
|
|
|
<StandardDirectory Id="ProgramFiles6432Folder">
|
|
<Directory Id="INSTALLFOLDER" Name="PrintCraft" />
|
|
</StandardDirectory>
|
|
<StandardDirectory Id="ProgramMenuFolder" />
|
|
|
|
<Feature Id="Main" Title="PrintCraft" Level="1">
|
|
<ComponentGroupRef Id="PrintcraftFiles" />
|
|
</Feature>
|
|
</Package>
|
|
|
|
<Fragment>
|
|
<ComponentGroup Id="PrintcraftFiles" Directory="INSTALLFOLDER">
|
|
<Component Id="PrintcraftApp" Guid="E724C1C6-091F-4E21-A685-80D089FDBE21">
|
|
<File Id="PrintcraftExe" Source="$(var.BinDir)\printcraft.exe" KeyPath="yes">
|
|
<Shortcut Id="StartMenuShortcut" Directory="ProgramMenuFolder" Name="PrintCraft"
|
|
Description="PrintCraft PDF workbench" WorkingDirectory="INSTALLFOLDER" Advertise="yes"
|
|
Icon="PrintcraftIcon.ico" IconIndex="0" />
|
|
</File>
|
|
|
|
<RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\App Paths\printcraft.exe" Value="[#PrintcraftExe]" Type="string" />
|
|
|
|
<!-- PDF files (#107): PrintCraft is offered under "Open with" and in Settings ▸ Default
|
|
apps, through Windows' Default Programs registration (a ProgID, OpenWithProgids,
|
|
Capabilities and RegisteredApplications). It never takes over an existing default:
|
|
.pdf's own default value is left alone, and the user chooses. Without this, the only
|
|
PrintCraft entry to pick was the advertised Start Menu shortcut, which Windows can't
|
|
run as a file handler ("This app can't run on your PC"). -->
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\PrintCraft.Document" Value="PDF Document" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\PrintCraft.Document\DefaultIcon" Value="[#PrintcraftExe],0" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\PrintCraft.Document\shell\open\command" Value=""[#PrintcraftExe]" "%1"" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\.pdf\OpenWithProgids" Name="PrintCraft.Document" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\printcraft.exe" Name="FriendlyAppName" Value="PrintCraft" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\printcraft.exe\SupportedTypes" Name=".pdf" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\printcraft.exe\shell\open\command" Value=""[#PrintcraftExe]" "%1"" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\PrintCraft\Capabilities" Name="ApplicationName" Value="PrintCraft" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\PrintCraft\Capabilities" Name="ApplicationDescription" Value="Open-source PDF workbench" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\PrintCraft\Capabilities" Name="ApplicationIcon" Value="[#PrintcraftExe],0" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\PrintCraft\Capabilities\FileAssociations" Name=".pdf" Value="PrintCraft.Document" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\RegisteredApplications" Name="PrintCraft" Value="Software\PrintCraft\Capabilities" Type="string" />
|
|
</Component>
|
|
|
|
<Component Id="PrintcraftCli">
|
|
<File Id="PrintcraftCliExe" Source="$(var.BinDir)\printcraft-cli.exe" KeyPath="yes" />
|
|
</Component>
|
|
</ComponentGroup>
|
|
</Fragment>
|
|
</Wix>
|