Subject: bug#75013: Windows binary installer ignores user options for Start menu shortcuts

From: Corwin Brust <[email-masked]>
Date: Sat, 21 Dec 2024 17:05:53 -0600

tags: patch
thanks

>
> I'll look into fixing this for the 30.1 installer, also, replying back
> in here if/when I have an "_3" that seems to warrant others' testing
> effort.
>

I'm attaching a (messy, quick) patch which appears to wrap fixing this
issue up with fixing those others I've just been asking others to help
me close (by testing out patched installers).

I will link devel (and OP) rather than here with the (transient,
available for some days at least) link to the new version of the
installer I've made applying the attached patch (under other cover).

I'll report back in (to this bug) with a "stand-alone" patch showing
just code needed to resolve this issue (probably for academic
purposes, given this consolidated patch works).  It should apply to
virtually any branch (or release/pre-release source tarball).

FTR, it was easy enough to swap reorder things to ensure that the
shortcuts got created properly (according to user options, and not
prior to asking for input/confirmation of those preferences, as
before); however, I had to go to lengths to ensure the uninstaller
removes whatever shortcuts it creates.  The resulting (seemingly
reliable) result is that we now delete empty parent folders (up to the
start menu application's folder root) when deleting whatever shortcuts
during uninstallation which the given installer had made.  I can (and
probably should) give the same treatment to the applications folder,
removing empty parents of the User's selected install folder, but I
think we have enough to test for just now.  (The same approach will
work; it won't be difficult to add.  But let's confirm the recursive
delete method works reliably for others).

For anyone seeing this and interested in a (slightly) more durable
link from which one can follow (by seeing incremental/experimental
builds outside of links shared to devel) along, seeing my current
version of the attached patch and related binaries using the 30.0.93
(pre-release 3 for Emacs 30) tarball a starting-point, here's an index
page:

https://alpha.gnu.org/gnu/emacs/pretest/windows/emacs-30/?C=M;O=D

Note, when browsing the above link:
The "latest" and otherwise (not 30.0.93_N_or_bug) releases are the
latest snapshots taken from the emacs-30 branch (so, by now, more
recent than the release tarball mentioned above, and without
this/these patches, for now).  Such builds are named based on the git
revision and include the sources used in the given folders.  Builds
related to installer fixes based on Emacs 30/pretest #3 are within my
"Emacs 30 root folder", index to which is linked above.