[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [feature/internal-msys] thoughts of a more function windows package

From: Richard Copley
Subject: Re: [feature/internal-msys] thoughts of a more function windows package
Date: Mon, 25 Jan 2021 20:01:56 +0000

On Mon, 25 Jan 2021 at 15:21, Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Phillip Lord <phillip.lord@russet.org.uk>
> > Eli Zaretskii <eliz@gnu.org> writes:

> > >> Would it be easier to have Emacs allow me to successfully update PATH
> > >> during run?
> > >
> > > Update how?
> >
> > Using some magic that doesn't exist at the current time. I mean a way
> > like did (by fiddling with setenv) that doesn't suffer the problems that
> > it causes.
> I don't think this magic can exist.  But if someone knows, let them
> speak up.

No magic is needed. Just change exec-path and the PATH environment
variable matching values, not forgetting to add Emacs' libexec dir to
exec-path. I have code in my init file to select different paths,
because different toolchains that I want to run in Emacs require
different incompatible paths. It doesn't cause any problems, and
everything behaves as you expect.

This works for me because I install emacs into the /mingw64/bin
directory of MSYS2 (which is what "make install" does by default, in
the MSYS2/MINGW64 shell), so emacs can never fail to find its required
DLLs at runtime, nor find the wrong ones. (The LoadLibrary function
always searches the exe's directory and the System32 directory.)
The installer should make sure all the necessary DLLs are in the same
directory as emacs.exe, too, for the same reason.

When running emacs from the /src directory, features that load DLLs at
runtime don't work properly unless the correct DLLs are found on the
path, but there's nothing mysterious, magical or unexpected about

By the way, the MSYS2 builds of Emacs no longer apply any significant
patches. There's just one, which is intended to disable ImageMagick,
and which is superfluous but harmless. I hope we don't do anything
that breaks the ability to build and install Emacs into an existing
MSYS2 tree using "./autogen.sh && ./configure && make && make
install", as their PKGBUILD script does.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]