Subject: Re: bug#65203: v. 29.1.1 | Application GNU Emacs not listed by Windows as installed

From: Corwin Brust <[email-masked]>
Date: Mon, 21 Aug 2023 14:50:48 -0500

Hi Ricky,

On Thu, Aug 10, 2023 at 8:35 AM Eli Zaretskii <[email-masked]> wrote:
>
> tags 65203 notabug wontfix
> thanks
>
> > From: Ricky Tigg <[email-masked]>
> > Date: Thu, 10 Aug 2023 14:32:47 +0300
> >
> > Hello. Application GNU Emacs not listed by Windows 11 as installed in the UI of the Applications
> > section. Regards.
>

The emacs sources contain an NSIS script which can be used to create
an executable self-installer.

  https://git.savannah.gnu.org/cgit/emacs.git/tree/admin/nt/dist-build/emacs.nsi

Does installing Emacs using an installer created using that script solve this?

If not, do you know what else may be necessary for the installer to do
to make Windows 11 list Emacs under Applications as you expect?

I don't have access to a windows 11 device to test/experiment so it
might be helpful if you can share screenshots.  For example, it would
be helpful to see how another GNU/Free Software application appears,
given you know of one that does appear as you would like the installed
Emacs to appear.

Here is more background on creating NSIS installer, in case you have
not tried that:

I use MSYS/Mingw64 but other GNU user-space implementations for
Windows (e.g. cygwin) might work.

You will need NSIS, obviously: https://nsis.sourceforge.io/Main_Page

I assume you have nsis.exe on your path, that you have already built
emacs then executed the "install" make target with PREFIX set to
"/c/build/emacs", that you have a copy of Emacs' sources in
"/c/build/src", and finally that you are building Emacs 30.0.50 (so,
from the development branch in git, however git is of limited
relevance to using the nsi script because the installer uses a
compiled and "installed" Emacs as input).

Then, open MingW64 bash:

cd /c/build
cp src/admin/nt/dist-build/emacs.nsi .
makensis -v4 \
  -DEMACS_VERSION=30.0.50 \
  -DVERSION_BRANCH=30.0.50 \
  -DOUT_VERSION=30.0.50 \
  emacs.nsi

This creates /c/build/emacs-30.0.50-installer.exe

Please try running such an installer and report back whether that has helped.

>
> Alternatively, you could do this yourself.  AFAIU, the description
> here will help you do that:
>
>   https://superuser.com/questions/1164677/how-to-add-a-program-to-the-windows-10-all-apps-start-menu-section-when-window
>
> There's no bug in Emacs here.

If there is something to be done to the MSIS installer that improves
the situation I would be happy to see if I can do it.  I suspect that
there is not; probably, this should "just work".