Subject: bug#77495: [PATCH] Include additional version metadata during Windows install

From: Sean Bright <[email-masked]>
Date: Thu, 03 Apr 2025 16:02:57 +0000

On 4/3/2025 11:11 AM, Sean Bright wrote:
> This prevents winget from reinstalling the same version during every
> invocation of 'winget update' but it also improves the appearance of
> GNU Emacs in the 'Add or Remove Programs' interface.

Updated patch attached that also adds a DisplayIcon property so a
branded icon is displayed in the 'Add or Remove Programs'
interface[1] as well.

Kind regards,
Sean

1. https://seanbright.com/emacs-win-metadata-2.png

From e9f91f4d037f2b244503ee91e028dacb8c7c84cf Mon Sep 17 00:00:00 2001
From: Sean Bright <[email-masked]>
Date: Wed, 2 Apr 2025 13:52:06 -0400
Subject: [PATCH] Include additional version metadata during Windows install

* admin/nt/dist-build/emacs.nsi: Add DisplayIcon, DisplayVersion, and
  Publisher values to the Uninstall registry key.

Copyright-paperwork-exempt: yes
---
 admin/nt/dist-build/emacs.nsi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/admin/nt/dist-build/emacs.nsi b/admin/nt/dist-build/emacs.nsi
index 4a5de4f85f9..9239eb07ec7 100644
--- a/admin/nt/dist-build/emacs.nsi
+++ b/admin/nt/dist-build/emacs.nsi
@@ -72,6 +72,9 @@ Section
 
   # add registry key to enable uninstall from control panel
   WriteRegStr HKLM "${UNINST_KEY}" "DisplayName" "GNU Emacs ${VERSION_BRANCH}"
+  WriteRegStr HKLM "${UNINST_KEY}" "DisplayIcon" "$\"$UninstallerPath$\""
+  WriteRegStr HKLM "${UNINST_KEY}" "DisplayVersion" "${VERSION_BRANCH}"
+  WriteRegStr HKLM "${UNINST_KEY}" "Publisher" "Free Software Foundation, Inc."
   WriteRegStr HKLM "${UNINST_KEY}" "UninstallString" "$\"$UninstallerPath$\""
 
   ;Create shortcuts
-- 
2.43.0