]> code.delx.au - gnu-emacs/blobdiff - nt/INSTALL
Avoid run-time dependency on libwinpthread DLL on MS-Windows
[gnu-emacs] / nt / INSTALL
index 58fe94772512a77e29a07cefb109087bea33026d..99a2f3988f91ca744fa59ebe5f6273374fa1c4eb 100644 (file)
@@ -1,7 +1,7 @@
                    Building and Installing Emacs on MS-Windows
                           using the MSYS and MinGW tools
 
-  Copyright (C) 2013-2015 Free Software Foundation, Inc.
+  Copyright (C) 2013-2016 Free Software Foundation, Inc.
   See the end of the file for license conditions.
 
 The MSYS/MinGW build described here is supported on versions of
@@ -12,6 +12,9 @@ build will run on Windows 9X and newer systems).
   Do not use this recipe with Cygwin.  For building on Cygwin, use the
   normal installation instructions, ../INSTALL.
 
+  For building Emacs using the MinGW64/MSYS2 toolchain, see the
+  instructions in the file INSTALL.W64 in this directory.
+
 * For the brave (a.k.a. "impatient"):
 
   For those who have a working MSYS/MinGW development environment and
@@ -75,6 +78,48 @@ build will run on Windows 9X and newer systems).
   If these short instructions somehow fail, read the rest of this
   file.
 
+* Installing Git for Windows
+
+  Skip this section if you already have Git installed and configured,
+  or if you are building from the release tarball, not from the
+  development repository.
+
+  Git for Windows is available from this download page:
+
+    https://github.com/git-for-windows/git/releases
+
+  That page offers both 32-bit and 64-bit installations; pick the one
+  suitable for your OS.  In general, we recommend to install a 64-bit
+  Git if you have a 64-bit Windows system; the 32-bit Git will run on
+  64-bit Windows just fine, but might run into memory problems where
+  the 64-bit Git won't.
+
+  During Git installation, be sure to select the "Checkout as-is,
+  commit as-is" option from the "Configure line ending conversions"
+  dialog.  Otherwise, Git will convert text files to DOS-style CRLF
+  end-of-line (EOL) format, which will cause subtle problems when
+  building Emacs, because MSYS tools (see below) used to build Emacs
+  use binary file I/O that preserves the CR characters that get in the
+  way of some text-processing tools, like 'makeinfo' and the commands
+  invoked by the autogen.sh script.
+
+  If you already have Git installed and configured with some other EOL
+  conversion option, you will need to reconfigure it, removing the
+  following variables from all of your .gitconfig files:
+
+    core.eol
+    core.safecrlf
+    core.autocrlf
+
+  If you cloned the Emacs directory before changing these config
+  variables, you will have to delete the repository and re-clone it
+  after the change.
+
+  The instructions for cloning the Emacs repository can be found on
+  the Emacs's Savannah project page:
+
+    https://savannah.gnu.org/projects/emacs
+
 * Installing MinGW and MSYS
 
   Make sure you carefully read the following two sections in their
@@ -108,12 +153,37 @@ build will run on Windows 9X and newer systems).
    . msys-base
    . mingw-developer-toolkit
 
+  When the installation ends, perform the post-installation steps
+  described on this page of the MinGW site:
+
+    http://www.mingw.org/wiki/Getting_Started
+
+  in the "After Installing You Should ..." section.  These steps are
+  important for making your installation complete, and in particular
+  will produce a desktop shortcut for running the MSYS Bash shell,
+  from which you will configure and build Emacs.  Once you've made the
+  shortcut, double-click on it to open the MSYS Bash shell window,
+  where you will proceed with the rest of these instructions.
+
+  In addition, we suggest to modify your system-wide Path variable to
+  include the 'bin' subdirectory of your top-level MinGW installation
+  directory, the one you specified to mingw-get ("C:\MinGW" by
+  default).  This will allow you to invoke the MinGW development
+  tools, like GCC, from the Windows cmd.exe shell windows or from
+  other Windows programs (including Emacs, after you build and install
+  it).
+
   (We recommend that you refrain from installing the MSYS Texinfo
   package, which is part of msys-base, because it might produce mixed
   EOL format when installing Info files.  Instead, install the MinGW
   port of Texinfo, see the ezwinports URL below.  To uninstall the
   MSYS Texinfo, after installing it as part of msys-base, invoke the
-  command "mingw-get remove msys-texinfo".)
+  command "mingw-get remove msys-texinfo", or mark "msys-texinfo" for
+  removal in the mingw-get GUI, then select Installation->Apply Changes.)
+
+  (Similarly, we recommend to refrain from installing the MinGW
+  Automake and Autoconf packages; instead, install their MSYS builds
+  available from the ezwinports site, see below.)
 
   At this point, you should be ready to configure and build Emacs in
   its basic configuration.  Skip to the "Generating the configure
@@ -122,7 +192,7 @@ build will run on Windows 9X and newer systems).
   optional libraries near the end of this document, before you start
   the build.  Also, consider installing additional MinGW packages that
   are required/recommended, especially if you are building from the
-  repository, as described in the next section.
+  development repository, as described in the next section.
 
 ** Installing MinGW and MSYS manually
 
@@ -166,7 +236,7 @@ build will run on Windows 9X and newer systems).
   been warned!
 
   Additional MinGW packages are required/recommended, especially if
-  you are building from the repository:
+  you are building from the development repository:
 
    . Texinfo (needed to produce the Info manuals when building from
      the repository, and for "make install")
@@ -176,7 +246,7 @@ build will run on Windows 9X and newer systems).
    . pkg-config (invoked by the configure script to look for optional
      packages)
 
-     Available from http://www.gtk.org/download/win32.php
+     Available from http://sourceforge.net/projects/ezwinports/files/.
 
    . gzip (needed to compress files during "make install")
 
@@ -318,7 +388,12 @@ build will run on Windows 9X and newer systems).
      Checking for automake (need at least version 1.11)...
      ok
      Your system has the required tools, running autoreconf...
-     You can now run `./configure'.
+     Installing git hooks...
+     You can now run './configure'.
+
+  If the script fails because it cannot find Git, you will need to
+  arrange for the MSYS Bash's PATH to include the Git's 'bin'
+  subdirectory, where there's the git.exe executable.
 
 * Configuring Emacs for MinGW:
 
@@ -398,7 +473,7 @@ build will run on Windows 9X and newer systems).
   successful, will eventually produce a summary of the configuration
   similar to this:
 
-     Configured for `i686-pc-mingw32'.
+     Configured for 'i686-pc-mingw32'.
 
        Where should the build process find the source code?    /path/to/emacs/sources
        What compiler should emacs be built with?               gcc  -std=gnu99 -O0 -g3
@@ -556,14 +631,13 @@ build will run on Windows 9X and newer systems).
   is in the PATH or otherwise accessible and that the binaries are
   compatible (for example, that they were built with the same compiler).
 
+  To support XPM images (required for color tool-bar icons), you will
+  need the libXpm library.  It is available from the ezwinports site,
+  http://sourceforge.net/projects/ezwinports/files/.
+
   For PNG images, we recommend to use versions 1.4.x and later of
   libpng, because previous versions had security issues.  You can find
-  precompiled libraries and headers on the GTK download page for
-  Windows (http://www.gtk.org/download/win32.php for 32-bit builds and
-  http://www.gtk.org/download/win64.php for 64-bit builds).  The
-  ezwinports site, http://sourceforge.net/projects/ezwinports/files/
-  also offers PNG (as well as other image libraries), which are
-  usually newer.
+  precompiled libraries and headers on the ezwinports site.
 
   Versions 1.4.0 and later of libpng are binary incompatible with
   earlier versions, so Emacs will only look for libpng libraries which
@@ -600,70 +674,32 @@ build will run on Windows 9X and newer systems).
   libtiffN.dll or libtiff-N.dll or libtiff.dll.  These can be found on
   the ezwinports site.
 
-  Pre-built versions of librsvg and its dependencies can be found in
-  one of these places:
-
-  1. http://sourceforge.net/projects/ezwinports/files/
-
-     This site includes a minimal (as much as possible for librsvg)
-     build of the library and its dependencies; it is also more
-     up-to-date with the latest upstream versions.  However, it
-     currently only offers 32-bit builds.  For building Emacs, you
-     need to download from this site all of the following *-bin.zip
-     archives:
-
-       librsvg, gdk-pixbuf, cairo, glib
-
-     The 'bin' archives on this site include both header files and the
-     libraries needed for building with librsvg and for running Emacs.
-     The librsvg archive includes all the shared libraries needed to
-     run Emacs with SVG support; the other 3 packages are required
-     because the compiler needs to see their header files when
-     building Emacs.
-
-  2. GTK project download site for Windows (see above for 2 URLs,
-     either for 32-bit builds or 64-bit builds)
-
-     This is the official Windows download site of the GTK project.
-     Its builds of librsvg are fatter, but are currently the only
-     alternative for 64-bit builds.  The easiest way to obtain the
-     dependencies required for building from this site is to download
-     a pre-bundled GTK+ development environment for Windows.  If you
-     would nevertheless like to download only the packages that are
-     strictly required, then, as of the time of this writing, here's
-     the list of GTK+ packages you will need:
-
-        librsvg, pango, freetype-2.4.11, freetype-2.4.2, croco, cairo,
-        glib, gdk-pixbuf, fontconfig, libpng-1.4.x, libpng-1.5.x,
-        libffi, libxml2, zlib
-
-     The GTK download page provides 2 separate archives for each
-     package: a 'bin' (binary) archive with programs and DLLs, and a
-     'dev' (development) archive with header files, import libraries,
-     and pkg-config files; download and install both archives for each
-     package you need.  (Sources of each package are available in a
-     separate, 3rd archive.)
-
-     As you see, some libraries for using this site's librsvg are
-     needed in more than one version -- this is because librsvg and
-     some of its dependencies were linked against different versions
-     of those libraries, and will look only for those DLLs when you
-     invoke SVG function.  So there's a bit of "DLL hell" involved
-     here, but at least in theory this should work, as each library
-     will dynamically link only against its dependencies, even if
-     another version of the same library is already loaded.  In
-     particular, at least 2 different versions of libpng will have to
-     be installed on your machine.  When you install these libpng
-     versions, be sure to keep the header files and the pkg-config
-     files in sync, i.e. install both the 'bin' and 'dev' archives of
-     the same libpng version together.
+  Pre-built versions of librsvg and its dependencies can be found
+  here:
+
+    http://sourceforge.net/projects/ezwinports/files/
+
+    This site includes a minimal (as much as possible for librsvg)
+    build of the library and its dependencies; it is also more
+    up-to-date with the latest upstream versions.  However, it
+    currently only offers 32-bit builds.  For building Emacs, you need
+    to download from this site all of the following *-bin.zip
+    archives:
+
+      librsvg, gdk-pixbuf, cairo, glib
+
+    The 'bin' archives on this site include both header files and the
+    libraries needed for building with librsvg and for running Emacs.
+    The librsvg archive includes all the shared libraries needed to
+    run Emacs with SVG support; the other 3 packages are required
+    because the compiler needs to see their header files when building
+    Emacs.
 
   To use librsvg at runtime, ensure that librsvg and its dependencies
   are on your PATH, or in the same directory as the emacs.exe binary.
   If you are downloading from the ezwinports site, you only need to
   install a single archive, librsvg-X.Y.Z-w32-bin.zip, which includes
-  all the dependency DLLs.  For the GTK project site, download the
-  'bin' archives for each of the libraries mentioned above.
+  all the dependency DLLs.
 
   If you think you've got all the dependencies and SVG support is
   still not working, check your PATH for other libraries that shadow