[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Acquiring dependencies for Windows builds
From: |
H. Dieter Wilhelm |
Subject: |
Re: Acquiring dependencies for Windows builds |
Date: |
Tue, 08 Mar 2022 16:52:52 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (windows-nt) |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: "H. Dieter Wilhelm" <dieter@duenenhof-wilhelm.de>
>> Cc: arash@gnu.org, corwin@bru.st, emacs-devel@gnu.org,
>> phillip.lord@russet.org.uk
>> Date: Mon, 28 Feb 2022 22:51:57 +0100
>>
>> >> 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.
>>
>> Luckily zlib1.dll contains also "lib". :-)
>
> You are relying on luck too much: look in your Windows/system32
> directory, and you will see there quite a few system DLLs that match
> "lib". My suggestion is to have an explicit list of system DLLs that
> should be filtered out.
I understand, thanks. I'll grab all DLL filenames of the
Windows/system32 folder and filter them out. Or how would you build or
hard-code such a filter list?
>> In the following I'm using copy-file. But I'm wondering why the argument
>> OK-IF-ALREADY-EXISTS can't be used to skip a copy process if the file
>> exists?
>
> I'm not sure I understand,
Would it make sense to you to have the (additonal) capability for
copy-file to do nothing if the target file already exists?
At the moment I can 1) trigger an error, 2) overwrite an existing file
and 3) ask for confirmation either to overwrite or to have an error. So
3) is actually only an - annoying - way to have 1) or 2), there's no way
to leave an existing file alone without an error.
And here's another thing I stumbled over: An excerpt of copy-file's
documentation string:
OK-IF-ALREADY-EXISTS is an integer, request confirmation from the user
about overwriting; this is what happens in interactive use with M-x.
The interactive part in the documentation is unnecessary, I think, the
request happens for me in batch mode as well.
> but you should stop copying when you find
> the first existing DLL for each feature in dynamic-library-alist. We
> arrange the DLLs there in the descending order of
> versions/importance/quality, so the leftmost DLL that is found is
> always the best, and should not be overwritten by any existing DLLs
> for the same feature whose names are to the right of that. For
> example:
>
> '(tiff "libtiff-5.dll" "libtiff3.dll" "libtiff.dll")
Actually my code was copying all of above tiff DLLs to the bin
folder.
> If you find libtiff-5.dll, you should not overwrite it with
> libtiff3.dll, even if the latter exists.
I see, I'll just copy the available, leftmost DLLs.
> Also, I don't see that you ignore DLLs that don't match the version
> with which Emacs was compiled. E.g., this part of
> dynamic-library-alist:
>
> (if (>= libgif-version 50100)
> ;; Yes, giflib 5.0 uses 6 as the major version of the API,
> ;; and giflib 5.1 uses 7, thus "libgif-7.dll" and
> ;; "libgif-6.dll" below (giflib 4.x used 5 as the major API
> ;; version). giflib5.dll is from the lua-files project,
> ;; and gif.dll is from luapower.
> '(gif "libgif-7.dll")
> (if (>= libgif-version 50000)
> '(gif "libgif-6.dll" "giflib5.dll" "gif.dll")
> '(gif "libgif-5.dll" "giflib4.dll" "libungif4.dll" "libungif.dll")))
Please tell me where I can find above definition of
dynamic-library-alist? Mine (Emacs-27.2) just says:
dynamic-library-alist is a variable defined in ‘C source code’.
((harfbuzz "libharfbuzz-0.dll")
(gdiplus "gdiplus.dll")
(shlwapi "shlwapi.dll")
(xpm "libxpm.dll" "xpm4.dll" "libXpm-nox4.dll")
(png "libpng16.dll" "libpng16-16.dll")
(tiff "libtiff-5.dll" "libtiff3.dll" "libtiff.dll")
(jpeg "libjpeg-8.dll")
(gif "libgif-7.dll")
(svg "librsvg-2-2.dll")
(webp "libwebp-7.dll" "libwebp.dll")
(sqlite3 "libsqlite3-0.dll")
(gdk-pixbuf "libgdk_pixbuf-2.0-0.dll")
(glib "libglib-2.0-0.dll")
(gio "libgio-2.0-0.dll")
(gobject "libgobject-2.0-0.dll")
(gnutls "libgnutls-30.dll")
(libxml2 "libxml2-2.dll" "libxml2.dll")
(zlib "zlib1.dll" "libz-1.dll")
(lcms2 "liblcms2-2.dll")
(json "libjansson-4.dll")
(gccjit "libgccjit-0.dll"))
> means that Emacs compiled against giflib 5.1 and later should not try
> to use libgif-6.dll or libgif-5.dll, it should only use libgif-7.dll.
> We do this when a newer version is binary incompatible with an older
> one, so you cannot just choose whichever DLL you have, you must use
> the one that is binary-compatible with Emacs.
I'm struggling to understand that, I thought ./configure would sort out
what is necessary and available on my system?
Thank you for your interest
Dieter