fix(app,packaging): keep libmpv and the taskbar icon across Windows upgrades

An MSI upgrade left the app without libmpv-2.dll until it was installed a
second time (B62). Costing runs before RemoveExistingProducts, saw the old
DLL at the same version and skipped the copy, and removing the old product
then deleted it. Both installer definitions now set REINSTALLMODE=amus;
every file is private to the install directory.

A taskbar pin lost its icon after a while (B63). The exe carried no icon
resource, and the Start Menu shortcut's icon lived in the per-ProductCode
installer cache that each upgrade deletes. build.rs now compiles the .ico
into proton-stream.exe, and the shortcut has no Icon of its own (and in the
WiX build is no longer advertised), so both show the exe's icon.
This commit is contained in:
nvrl committed 2026-10-06 03:04:07 +02:00
1 parent 67cf3044f1
commit 6239780978
9 files changed
+150 -6

No files matched your search

+17 -3
View File
@@ -78,6 +78,15 @@
<RemoveExistingProducts After="InstallInitialize" />
</InstallExecuteSequence>
<!-- Copy every file on an upgrade, whatever is on disk. Costing runs
before RemoveExistingProducts, so it sees the old libmpv-2.dll — the
same version, since mpv is pinned — and decides not to copy it. The
removal of the old product then deletes it, and the upgrade ends with
no DLL: "mpv missing" until a second install, which finds nothing on
disk and copies it. Every file here is private to INSTALLDIR, so
overwriting unconditionally downgrades nothing shared. -->
<Property Id="REINSTALLMODE" Value="amus" />
<Media Id="1" Cabinet="proton_stream.cab" EmbedCab="yes" />
<Icon Id="proton-stream.ico" SourceFile="$(var.IconFile)" />
@@ -98,14 +107,19 @@
and writes the advertised form anyway, with the feature name in
Shortcut/Target. What selects the non-advertised form is being
a child of the Component rather than of the File, plus an
explicit formatted Target. Keep it out of the <File>. -->
explicit formatted Target. Keep it out of the <File>.
No Icon either. A shortcut's Icon is copied to
C:\Windows\Installer\{ProductCode}, and every upgrade has a
new ProductCode and deletes the old folder — taking the icon
of every taskbar pin made from the shortcut with it. Without
one, the shortcut shows the exe's own icon resource. -->
<Shortcut Id="StartMenuShortcut"
Directory="ProgramMenuFolder"
Name="Proton Stream"
Description="Browse and stream a Proton Drive public link"
Target="[INSTALLDIR]proton-stream.exe"
WorkingDirectory="INSTALLDIR"
Icon="proton-stream.ico" />
WorkingDirectory="INSTALLDIR" />
</Component>
<!-- The CLI, and the PATH entry that makes it worth installing. Tied
+15 -2
View File
@@ -26,6 +26,15 @@
DowngradeErrorMessage="A newer version of Proton Stream is already installed." />
<MediaTemplate EmbedCab="yes" />
<!-- Copy every file on an upgrade, whatever is on disk. Costing runs
before RemoveExistingProducts, so it sees the old libmpv-2.dll — the
same version, since mpv is pinned — and decides not to copy it. The
removal of the old product then deletes it, and the upgrade ends with
no DLL: "mpv missing" until a second install, which finds nothing on
disk and copies it. Every file here is private to INSTALLFOLDER, so
overwriting unconditionally downgrades nothing shared. -->
<Property Id="REINSTALLMODE" Value="amus" />
<Icon Id="AppIcon" SourceFile="$(var.IconFile)" />
<Property Id="ARPPRODUCTICON" Value="AppIcon" />
<Property Id="ARPURLINFOABOUT" Value="https://github.com/narrrl/proton-stream" />
@@ -45,12 +54,16 @@
<ComponentGroup Id="AppComponents" Directory="INSTALLFOLDER">
<Component Guid="623c8cb8-b826-4d57-a054-e5be56f24c19">
<File Id="AppExe" Source="$(var.BinDir)\proton-stream.exe" KeyPath="yes" />
<!-- Not advertised, and no Icon: either one puts the shortcut's icon
in C:\Windows\Installer\{ProductCode}, which the next upgrade
deletes along with the icon of every taskbar pin made from the
shortcut. This way it shows the exe's own icon resource. -->
<Shortcut Id="StartMenuShortcut"
Directory="ProgramMenuFolder"
Name="Proton Stream"
Description="Browse and stream a Proton Drive public link"
Icon="AppIcon"
Advertise="yes" />
Target="[#AppExe]"
WorkingDirectory="INSTALLFOLDER" />
</Component>
<!-- The CLI, and the PATH entry that makes it worth installing. Tied to