emacs-devel
[Top][All Lists]
Advanced

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

Re: Acquiring dependencies for Windows builds, was: Native compilation o


From: Eli Zaretskii
Subject: Re: Acquiring dependencies for Windows builds, was: Native compilation on Windows
Date: Sun, 27 Feb 2022 13:07:32 +0200

> From: "H. Dieter Wilhelm" <dieter@duenenhof-wilhelm.de>
> Cc: arash@gnu.org,  corwin@bru.st,  phillip.lord@russet.org.uk,
>   emacs-devel@gnu.org
> Date: Sun, 27 Feb 2022 11:49:29 +0100
> 
> It's drawback is that such an iterative approach is painful to do by
> hand.  I'd like to do this in a script and call below MinGW64 command
> from within Emacs
> 
>   objdump.exe -p *.exe *.dll| fgrep DLL
> 
> My idea is to do something like the following:
> 
>   (let ((Objdump-buffer (get-buffer-create "*objdump*"))
>         (Bin-folder "~/emacs-build/build/emacs-28.0.91/bin/")
>         (Objdump "d:/appl/MSYS2/mingw64/bin/objdump.exe"))
>     (setq default-directory Bin-folder)
>     (with-current-buffer Objdump-buffer
>       ;;(goto-char (point-min))
>       (erase-buffer)
>       (shell-command (concat Objdump " -p *.exe *.dll") Objdump-buffer)
>       (keep-lines "   DLL Name:")
>       ;; And then filtering steps
>       ;; Iteratively copying files into the Bin-folder..

First, no need to hard-code the location of objdump.exe:
executable-find should be able to find it.

Second, you change the default-directory in the wrong buffer, I think.

More importantly, I don't see where you have the list of all the DLLs
that Emacs loads.  You need to start from that list.

> Which brings output into the Objdump-buffer but I'm not sure if above
> approach might miss the - possibly - necessary MinGW64 environment
> information, don't know if it makes a difference when objdump.exe is
> called from the MinGW64 shell or with shell-command .

I don't think I follow your fears here.  What exactly did you think
could go wrong?  What do you mean by "necessary MinGW64 environment
information"?

> How would you bring the output of objdump into Emacs?

shell-command accepts an optional argument to that effect.

> It seems to me that all MSYS DLLs on which Emacs depends have a name
> component "lib", whereas the Windows libraries have no such substring.
> (So I can easily filter them out.)

There are exceptions: zlib1.dll.  For now, it's the only exception
AFAIK, but watch out for others.



reply via email to

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