mirror of
https://github.com/storytold/deckcraft.git
synced 2026-10-26 19:46:58 -06:00
* fix(windows): keep the shortcut icon after an update (#1114) The MSI's Start menu shortcut took its icon from the WiX <Icon>, which Windows Installer caches under %APPDATA%\Microsoft\Installer\{ProductCode}\. Every update is a major upgrade with a new ProductCode, so the old folder is deleted. A taskbar pin is a copy of the shortcut that the update never touches, so it kept pointing at the deleted file and lost its icon. Drop the Icon from the shortcut so it shows the icon embedded in deckcraft.exe, whose path survives updates. The <Icon> stays for ARPPRODUCTICON. A test keeps shortcuts from naming an MSI icon again. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * contributors: credit Sofia Alves Figueredo by real name Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * fix(windows): make the Start menu shortcut non-advertised (#1114) Addresses the review comment: without an MSI Icon, a non-advertised shortcut targets the installed exe directly and takes its embedded icon. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * fix(windows): package.ps1 rejects a deckcraft.exe with no embedded icon (#1114) The shortcuts now take the exe's own icon, and -SkipBuild packages an existing exe that may come from a build without DECKCRAFT_REQUIRE_WINRES=1. Count its icons with ExtractIconEx and stop before WiX when there are none. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
99 lines
5.6 KiB
XML
99 lines
5.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
DeckCraft MSI (WiX Toolset v5: `dotnet tool install -g wix`). Built by package.ps1:
|
|
|
|
wix build deckcraft.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, `.deckcraft` owned by
|
|
DeckCraft, and DeckCraft offered under "Open with" for .pptx/.potx/.ppsx (without taking over
|
|
the user's default app for them).
|
|
|
|
UpgradeCode is fixed for DeckCraft forever (playbook §6); never change it.
|
|
-->
|
|
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
|
|
<?ifndef HasCraftFontLicences ?>
|
|
<?define HasCraftFontLicences=0 ?>
|
|
<?endif ?>
|
|
<Package
|
|
Name="DeckCraft"
|
|
Manufacturer="Learning Machines LLC"
|
|
Version="$(var.Version)"
|
|
UpgradeCode="6F9C69E7-7825-40D2-BF26-C274DA676425"
|
|
Scope="perMachine"
|
|
Compressed="yes"
|
|
Language="1033">
|
|
<SummaryInformation Description="DeckCraft presentations and slide shows" 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 DeckCraft is already installed." />
|
|
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
|
|
|
|
<Icon Id="DeckcraftIcon.ico" SourceFile="$(var.IconPath)" />
|
|
<Property Id="ARPPRODUCTICON" Value="DeckcraftIcon.ico" />
|
|
<Property Id="ARPURLINFOABOUT" Value="https://getartcraft.com/apps/deckcraft" />
|
|
<Property Id="ARPURLUPDATEINFO" Value="https://getartcraft.com/apps/deckcraft" />
|
|
<Property Id="ARPHELPLINK" Value="https://discord.gg/artcraft" />
|
|
|
|
<StandardDirectory Id="ProgramFiles6432Folder">
|
|
<Directory Id="INSTALLFOLDER" Name="DeckCraft" />
|
|
</StandardDirectory>
|
|
<StandardDirectory Id="ProgramMenuFolder" />
|
|
|
|
<Feature Id="Main" Title="DeckCraft" Level="1">
|
|
<?if $(var.HasCraftFontLicences) = 1 ?>
|
|
<ComponentGroupRef Id="CraftFontLicences" />
|
|
<?endif ?>
|
|
<ComponentGroupRef Id="DeckcraftFiles" />
|
|
</Feature>
|
|
</Package>
|
|
|
|
<Fragment>
|
|
<?if $(var.HasCraftFontLicences) = 1 ?>
|
|
<ComponentGroup Id="CraftFontLicences" Directory="INSTALLFOLDER">
|
|
<Files Include="$(var.DocsDir)\**" />
|
|
</ComponentGroup>
|
|
<?endif ?>
|
|
<ComponentGroup Id="DeckcraftFiles" Directory="INSTALLFOLDER">
|
|
<Component Id="DeckcraftApp" Guid="D87EA444-41A4-4C19-922E-66D1A29461FF">
|
|
<File Id="DeckcraftNotice" Source="$(var.BinDir)\NOTICE" KeyPath="no" />
|
|
<File Id="DeckcraftExe" Source="$(var.BinDir)\deckcraft.exe" KeyPath="yes">
|
|
<!-- No Icon here, so the shortcut shows the icon embedded in deckcraft.exe (build.rs). An
|
|
MSI Icon is cached under %APPDATA%\Microsoft\Installer\{ProductCode}\, and every
|
|
update is a major upgrade with a new ProductCode that deletes the old folder. A
|
|
taskbar pin is a copy of this shortcut that the update never touches, so it kept
|
|
pointing at the deleted file and lost its icon (#1114). The exe's path survives
|
|
updates; the shortcut is not advertised, so it targets that path and its icon is the
|
|
exe's own. The Icon above stays for ARPPRODUCTICON (Apps and features). -->
|
|
<Shortcut Id="StartMenuShortcut" Directory="ProgramMenuFolder" Name="DeckCraft"
|
|
Description="DeckCraft presentations and slide shows" WorkingDirectory="INSTALLFOLDER" Advertise="no" />
|
|
</File>
|
|
|
|
<!-- .deckcraft: DeckCraft's own format. -->
|
|
<ProgId Id="DeckCraft.Presentation" Description="DeckCraft Presentation" Icon="DeckcraftExe" IconIndex="0">
|
|
<Extension Id="deckcraft" ContentType="application/x-deckcraft">
|
|
<Verb Id="open" Command="Open" TargetFile="DeckcraftExe" Argument=""%1"" />
|
|
</Extension>
|
|
</ProgId>
|
|
|
|
<!-- "Open with" for PowerPoint formats, without becoming the default. -->
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\deckcraft.exe" Name="FriendlyAppName" Value="DeckCraft" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\deckcraft.exe\shell\open\command" Value=""[#DeckcraftExe]" "%1"" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\deckcraft.exe\SupportedTypes" Name=".deckcraft" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\deckcraft.exe\SupportedTypes" Name=".pptx" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\deckcraft.exe\SupportedTypes" Name=".potx" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\deckcraft.exe\SupportedTypes" Name=".ppsx" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\.pptx\OpenWithProgids" Name="DeckCraft.Presentation" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\.potx\OpenWithProgids" Name="DeckCraft.Presentation" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\.ppsx\OpenWithProgids" Name="DeckCraft.Presentation" Value="" Type="string" />
|
|
|
|
<RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\App Paths\deckcraft.exe" Value="[#DeckcraftExe]" Type="string" />
|
|
</Component>
|
|
|
|
<Component Id="DeckcraftCli">
|
|
<File Id="DeckcraftCliExe" Source="$(var.BinDir)\deckcraft-cli.exe" KeyPath="yes" />
|
|
</Component>
|
|
</ComponentGroup>
|
|
</Fragment>
|
|
</Wix>
|