* bug#68160: 29.1; Windows installer: add Emacs bin directory to PATH @ 2023-12-30 23:59 Michael Hoffman 2023-12-31 7:29 ` Eli Zaretskii 0 siblings, 1 reply; 4+ messages in thread From: Michael Hoffman @ 2023-12-30 23:59 UTC (permalink / raw) To: 68160 Could the Windows installer add $INSTDIR\emacs-${VERSION_BRANCH}\bin to PATH? I've started installing Emacs on Windows via WinGet, which is very nice, and so much works out of the box, but Emacs commands are not added to PATH like they are with Chocolatey. Currently, WinGet does not support adding to PATH for packages with an installer, like Emacs. If not, would it be possible to add an option to the installer to do this? A WinGet package could include that as a custom installer option <https://github.com/microsoft/winget-pkgs/blob/master/doc/manifest/schema/1.5.0/installer.md>. In GNU Emacs 29.1 (build 2, x86_64-w64-mingw32) of 2023-08-02 built on AVALON Windowing system distributor 'Microsoft Corp.', version 10.0.19045 System Description: Microsoft Windows 10 Home (v10.0.2009.19045.3803) Configured using: 'configure --with-modules --without-dbus --with-native-compilation=aot --without-compress-install --with-tree-sitter CFLAGS=-O2' Configured features: ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XPM ZLIB (NATIVE_COMP present but libgccjit not available) Important settings: value of $LANG: en_US locale-coding-system: utf-8-unix Major mode: Special ^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#68160: 29.1; Windows installer: add Emacs bin directory to PATH 2023-12-30 23:59 bug#68160: 29.1; Windows installer: add Emacs bin directory to PATH Michael Hoffman @ 2023-12-31 7:29 ` Eli Zaretskii 2024-01-11 20:58 ` Stefan Kangas 0 siblings, 1 reply; 4+ messages in thread From: Eli Zaretskii @ 2023-12-31 7:29 UTC (permalink / raw) To: Michael Hoffman; +Cc: 68160 > Date: Sat, 30 Dec 2023 23:59:55 +0000 > From: "Michael Hoffman" <emacs-hoffman@snkmail.com> > > Could the Windows installer add $INSTDIR\emacs-${VERSION_BRANCH}\bin to > PATH? > > I've started installing Emacs on Windows via WinGet, which is very nice, > and so much works out of the box, but Emacs commands are not added to > PATH like they are with Chocolatey. Currently, WinGet does not support > adding to PATH for packages with an installer, like Emacs. > > If not, would it be possible to add an option to the installer to do > this? A WinGet package could include that as a custom installer option > <https://github.com/microsoft/winget-pkgs/blob/master/doc/manifest/schema/1.5.0/installer.md>. This is up to the person who maintains the Windows install kit for Emacs, but IMO this should be an optional feature. On many Windows systems, changing the environment variables is a privileged operation, dictated by policy, and will be rejected. Moreover, modern Windows systems maintain two lists of Path values: one for the current user and another that is system-wide, and there are various limitations about changing each one. When I install software via an installer, I generally don't want it to modify my PATH, because those installers have no idea how I manage my PATH. For starters, should the Emacs's bin directory be prepended or appended to the existing PATH value? That is not a trivial question to answer, since the Emacs installer comes with DLLs and executables other than Emacs, and those might interfere with other software installed on the system. There be dragons! OTOH, manually adding the bin directory to your PATH, if you have that privilege, is easy enough. ^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#68160: 29.1; Windows installer: add Emacs bin directory to PATH 2023-12-31 7:29 ` Eli Zaretskii @ 2024-01-11 20:58 ` Stefan Kangas 2024-01-12 5:53 ` Corwin Brust 0 siblings, 1 reply; 4+ messages in thread From: Stefan Kangas @ 2024-01-11 20:58 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Michael Hoffman, Corwin Brust, 68160 Eli Zaretskii <eliz@gnu.org> writes: >> Date: Sat, 30 Dec 2023 23:59:55 +0000 >> From: "Michael Hoffman" <emacs-hoffman@snkmail.com> >> >> Could the Windows installer add $INSTDIR\emacs-${VERSION_BRANCH}\bin to >> PATH? >> >> I've started installing Emacs on Windows via WinGet, which is very nice, >> and so much works out of the box, but Emacs commands are not added to >> PATH like they are with Chocolatey. Currently, WinGet does not support >> adding to PATH for packages with an installer, like Emacs. >> >> If not, would it be possible to add an option to the installer to do >> this? A WinGet package could include that as a custom installer option >> <https://github.com/microsoft/winget-pkgs/blob/master/doc/manifest/schema/1.5.0/installer.md>. > > This is up to the person who maintains the Windows install kit for > Emacs, but IMO this should be an optional feature. On many Windows > systems, changing the environment variables is a privileged operation, > dictated by policy, and will be rejected. Moreover, modern Windows > systems maintain two lists of Path values: one for the current user > and another that is system-wide, and there are various limitations > about changing each one. > > When I install software via an installer, I generally don't want it to > modify my PATH, because those installers have no idea how I manage my > PATH. For starters, should the Emacs's bin directory be prepended or > appended to the existing PATH value? That is not a trivial question > to answer, since the Emacs installer comes with DLLs and executables > other than Emacs, and those might interfere with other software > installed on the system. > > There be dragons! > > OTOH, manually adding the bin directory to your PATH, if you have that > privilege, is easy enough. Corwin, any comments here? ^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#68160: 29.1; Windows installer: add Emacs bin directory to PATH 2024-01-11 20:58 ` Stefan Kangas @ 2024-01-12 5:53 ` Corwin Brust 0 siblings, 0 replies; 4+ messages in thread From: Corwin Brust @ 2024-01-12 5:53 UTC (permalink / raw) To: Stefan Kangas; +Cc: Michael Hoffman, Eli Zaretskii, 68160 On Thu, Jan 11, 2024 at 2:58 PM Stefan Kangas <stefankangas@gmail.com> wrote: > > Eli Zaretskii <eliz@gnu.org> writes: > > >> Date: Sat, 30 Dec 2023 23:59:55 +0000 > >> From: "Michael Hoffman" <emacs-hoffman@snkmail.com> > >> > >> Could the Windows installer add $INSTDIR\emacs-${VERSION_BRANCH}\bin to > >> PATH? > >> > > > > There be dragons! > > > > OTOH, manually adding the bin directory to your PATH, if you have that > > privilege, is easy enough. > > Corwin, any comments here? > I tend to agree with Eli. That said, adding a page with some Modify my path options (defaulting to doing nothing) sound like a nice way to become closer friends with nt/admin/dist-build/emacs.nsi, so I will try to provide a patch to consider. If we don't end up merging anything I won't be offended; however, I'd be fine to see this included: it doesn't seem actively harmful, although I haven't started thinking about what new uninstaller options this might imply yet. Here's is a sketch of my first thought as to what a new page ("section", in NewSoft Installer semantics) might look like: == Modify Path? (New section, follows displaying the license) By default setup will not modify your Windows system PATH. We recommend doing so manually to ensure you fully understand and control the changes made to your operating environment. You may do so manually using the "Edit the system environment variables" control provided by Windows 10 and later. To leave PATH unchanged press NEXT. If you prefer the setup process to automatically update the system PATH while installing Emacs, first choose from the options below and then press next. ✅ Add Emacs' bin folder to my PATH (checkbox, starts unchecked) [ The above is defaults to unchecked, if it is checked the other options are enabled ] Changes to make to PATH: 🔘 Add to the end of my current path (radio, starts checked) 🔘 Add at the start to my current path (radio, starts unchecked) ✅ Remove other entries in the form \emacs*\bin from my PATH (checkbox, starts unchecked) Modify PATH for 🔘 The current system user (radio, starts checked) 🔘 All users (default profile) [radio, starts unchecked [BACK] [NEXT] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-01-12 5:53 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-12-30 23:59 bug#68160: 29.1; Windows installer: add Emacs bin directory to PATH Michael Hoffman 2023-12-31 7:29 ` Eli Zaretskii 2024-01-11 20:58 ` Stefan Kangas 2024-01-12 5:53 ` Corwin Brust
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).