emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs binaries for Windows


From: Arash Esbati
Subject: Re: Emacs binaries for Windows
Date: Fri, 19 Aug 2016 19:24:23 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1

address@hidden (Phillip Lord) writes:

> Arash Esbati <address@hidden> writes:
>> I know this topic has been discussed in past and my apologies in advance
>> if I'm beating the dead horse again and a longish message.
>
> It's not a dead horse at all. It's an issue which, to my mind, needs
> solving.

Thanks for the thumbs-up Phil, glad I'm not the only person not happy
with the current state :-)

>> I wrote a simple script to determine the dependencies of the required
>> packages mentioned here:
>>
>>     http://git.savannah.gnu.org/cgit/emacs.git/tree/nt/INSTALL.W64#n60
>
>
> I'd be interested to see this script.

It is really a brain-dead one.  I started with this one to find out the
dependencies of the relevant package:

--8<---------------cut here---------------start------------->8---
#! /usr/bin/bash

# Run this script only in a msys2 shell and not in mingw64:
if [[ $MSYSTEM != "MSYS" ]] ; then
    echo "Run this script in a MSYS-shell -- I stop now!"
    exit 1
fi

# This list derives from the features we want Emacs to compile with.
PKG_REQ="mingw-w64-x86_64-giflib
mingw-w64-x86_64-gnutls
mingw-w64-x86_64-libjpeg-turbo
mingw-w64-x86_64-libpng
mingw-w64-x86_64-librsvg
mingw-w64-x86_64-libtiff
mingw-w64-x86_64-libxml2
mingw-w64-x86_64-xpm-nox"

# tmp file to store the dependencies:
if [ -f "./tmp-pkg-list" ] ; then
    rm ./tmp-pkg-list
fi

touch ./tmp-pkg-list

# Get a list of all dependencies needed for packages mentioned above.
# Run `pactree -lu' for each elment of $PKG_REQ
for x in $PKG_REQ ; do
    pactree -lu $x >> tmp-pkg-list
done

# Sort und uniq the list
cat tmp-pkg-list | sort -u -o tmp-pkg-list
cat tmp-pkg-list | sed 's/x86_64-//' > final-pkg-list
--8<---------------cut here---------------end--------------->8---

Then I found out that some package names differ from the name of
original directory on Github, e.g. `mingw-w64-x86_64-gcc-libs' is built
within the directory `mingw-w64-gcc'.  Long story short, if you clone

    https://github.com/Alexpux/MINGW-packages.git

and run

--8<---------------cut here---------------start------------->8---
#! /usr/bin/bash

PKGS="mingw-w64-bzip2
mingw-w64-cairo
mingw-w64-expat
mingw-w64-fontconfig
mingw-w64-freetype
mingw-w64-gdk-pixbuf2
mingw-w64-gcc
mingw-w64-gettext
mingw-w64-giflib
mingw-w64-glib2
mingw-w64-gmp
mingw-w64-gnutls
mingw-w64-graphite2
mingw-w64-harfbuzz
mingw-w64-jasper
mingw-w64-libcroco
mingw-w64-libffi
mingw-w64-libiconv
mingw-w64-libidn
mingw-w64-libjpeg-turbo
mingw-w64-libpng
mingw-w64-librsvg
mingw-w64-libsystre
mingw-w64-libtasn1
mingw-w64-libtiff
mingw-w64-libtre-git
mingw-w64-libxml2
mingw-w64-lzo2
mingw-w64-nettle
mingw-w64-p11-kit
mingw-w64-pango
mingw-w64-pcre
mingw-w64-pixman
mingw-w64-wineditline
mingw-w64-winpthreads-git
mingw-w64-xpm-nox
mingw-w64-xz
mingw-w64-zlib"

for pkg in $PKGS
do
    pushd ./MINGW-packages/$pkg
    makepkg-mingw --allsource --skipinteg -sLf && \
        mv $pkg-*.tar.gz ../../
    popd
done
--8<---------------cut here---------------end--------------->8---

you have all the sources and patches (239M total) ready.

>> This is actually what my script does.  Collecting all directories for
>> the packages above gives:
>>
>>     -> du -h emacs-25.1-rc1-libs.tar.xz
>>     464K    emacs-25.1-rc1-libs.tar.xz
>>
>> Does this approach comply with GPL?
>
> I don't know enough about msys2 to understand the difference in your
> approaches, but AFAICT, -libs.tar.xv contains all the source, so that
> you could build the libraries, then it does, yes.

No, "all the sources" are in the 239M package.  You could build the
libraries with those files.  My second thought was only to provide the
relevant Msys2/MinGW directives (PKGBUILD files) and patch files, all in
one archive which I called `emacs-25.1-rc1-libs.tar.xz'.  As an
example, I am attaching such a file for `expat'.

Attachment: mingw-w64-expat.tar.xz
Description: Binary data

> At the moment, Emacs ships with a single binary (libnox4) otherwise it
> looks terrible. But, I think that the basic windows download cannot do
> an HTTP call and display the results is unfortunate.
>
> Current builds are for 32 bit as well as 64 bit. Can that be replicated
> also?

The way I get it both arch's are built from the same directives
(PKGBUILD files).  Have a look at this page, section `Building
packages':

    https://sourceforge.net/p/msys2/wiki/Contributing%20to%20MSYS2/

Best, Arash

reply via email to

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