aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Burns2015-12-31 19:00:16 +0200
committerEli Zaretskii2015-12-31 19:00:16 +0200
commit410bb697ade71cb10d7f1932cc3712d24d4f34cb (patch)
tree10c97dec3ecaf841c88ea005fd7d2ba4ae583c0c
parent8f5b524d04d393fb7f84aabd45250893d9805732 (diff)
downloademacs-410bb697ade71cb10d7f1932cc3712d24d4f34cb.tar.gz
emacs-410bb697ade71cb10d7f1932cc3712d24d4f34cb.zip
Add nt/INSTALL.W64 build instructions
* nt/INSTALL.W64: New file. * nt/INSTALL: Point to INSTALL.W64 for 64-bit build instructions.
-rw-r--r--nt/INSTALL3
-rw-r--r--nt/INSTALL.W64224
2 files changed, 227 insertions, 0 deletions
diff --git a/nt/INSTALL b/nt/INSTALL
index e1d9e0633c7..1be6d99c02e 100644
--- a/nt/INSTALL
+++ b/nt/INSTALL
@@ -12,6 +12,9 @@ build will run on Windows 9X and newer systems).
12 Do not use this recipe with Cygwin. For building on Cygwin, use the 12 Do not use this recipe with Cygwin. For building on Cygwin, use the
13 normal installation instructions, ../INSTALL. 13 normal installation instructions, ../INSTALL.
14 14
15 For building Emacs using the MinGW64/MSYS2 toolchain, see the
16 instructions in the file INSTALL.W64 in this directory.
17
15* For the brave (a.k.a. "impatient"): 18* For the brave (a.k.a. "impatient"):
16 19
17 For those who have a working MSYS/MinGW development environment and 20 For those who have a working MSYS/MinGW development environment and
diff --git a/nt/INSTALL.W64 b/nt/INSTALL.W64
new file mode 100644
index 00000000000..95fbfe014d3
--- /dev/null
+++ b/nt/INSTALL.W64
@@ -0,0 +1,224 @@
1 Building and Installing Emacs on 64-bit MS-Windows
2 using MSYS2 and MinGW-w64
3
4 Copyright (c) 2015 Free Software Foundation, Inc.
5 See the end of the file for license conditions.
6
7This document describes how to compile a 64-bit GNU Emacs using MSYS2
8and MinGW-w64. For instructions for building a 32-bit Emacs using
9MSYS and MinGW, see the file INSTALL in this directory.
10
11Do not use this recipe with Cygwin. For building on Cygwin, use the normal
12installation instructions in ../INSTALL.
13
14* Requirements
15
16The total space required is 3GB: 1.8GB for MSYS2 / MinGW-w64 and 1.2GB for
17Emacs with the full repository, or less if you're using a release tarball.
18
19* Set up the MinGW-w64 / MSYS2 build environment
20
21MinGW-w64 provides a complete runtime for projects built with GCC for 64-bit
22Windows -- it's located at http://mingw-w64.org/.
23
24MSYS2 is a Cygwin-derived software distribution for Windows which provides
25build tools for MinGW-w64 -- see http://msys2.github.io/.
26
27** Download and install MinGW-w64 and MSYS2
28
29You can download the x86_64 version of MSYS2 (i.e. msys2-x86_64-<date>.exe)
30from
31
32 https://sourceforge.net/projects/msys2/files/Base/x86_64
33
34Run this file to install MSYS2 in your preferred directory, e.g. the default
35C:\msys64 -- this will install MinGW-w64 also. Note that directory names
36containing spaces may cause problems.
37
38Then you'll need to add the following directories to your Windows PATH
39environment variable:
40
41 c:\msys64\usr\bin;c:\msys64\mingw64\bin
42
43you can do this through Control Panel / System and Security / System /
44Advanced system settings / Environment Variables / Edit path.
45
46Adding these directories to your PATH tells Emacs where to find the DLLs it
47needs to run, and some optional commands like grep and find. These commands
48will also be available at the Windows console.
49
50** Download and install the necessary packages
51
52Run msys2_shell.bat in your MSYS2 directory and you will see a BASH window
53opened.
54
55In the BASH prompt, use the following command to install the necessary
56packages (you can copy and paste it into the shell with Shift + Insert):
57
58 pacman -S base-devel \
59 mingw-w64-x86_64-toolchain \
60 mingw-w64-x86_64-xpm-nox \
61 mingw-w64-x86_64-libtiff \
62 mingw-w64-x86_64-giflib \
63 mingw-w64-x86_64-libpng \
64 mingw-w64-x86_64-libjpeg-turbo \
65 mingw-w64-x86_64-librsvg \
66 mingw-w64-x86_64-libxml2 \
67 mingw-w64-x86_64-gnutls
68
69The packages include the base developer tools (autoconf, automake, grep, make,
70etc.), the compiler toolchain (gcc, gdb, etc.), several image libraries, an
71XML library, and the GnuTLS (transport layer security) library. Only the
72first three packages are required (base-devel, toolchain, xpm-nox); the rest
73are optional.
74
75You now have a complete build environment for Emacs.
76
77* Install Git (optional) and disable autocrlf
78
79If you're going to be building the development version of Emacs from the Git
80repository, and you don't already have Git on your system, you can install it
81in your MSYS2 environment with:
82
83 pacman -S git
84
85The autocrlf feature of Git may interfere with the configure file, so it is
86best to disable this feature by running the command:
87
88 git config core.autocrlf false
89
90* Get the Emacs source code
91
92Now you can either get an existing release version of the Emacs source code
93from the GNU ftp site, or get the more current version and history from the
94Git repository.
95
96You can always find the most recent information on these sources from the GNU
97Savannah Emacs site, https://savannah.gnu.org/projects/emacs.
98
99** From the FTP site
100
101The Emacs ftp site is located at http://ftp.gnu.org/gnu/emacs/ - download the
102version you want to build and put the file into a location like C:\emacs\,
103then uncompress it with tar. This will put the Emacs source into a folder like
104C:\emacs\emacs-24.5:
105
106 cd /c/emacs
107 tar xJf emacs-24.5.tar.xz
108
109** From the Git repository
110
111To download the Git repository, do something like the following -- this will
112put the Emacs source into C:\emacs\emacs-25:
113
114 mkdir /c/emacs
115 cd /c/emacs
116 git clone git://git.sv.gnu.org/emacs.git emacs-25
117
118(We recommend using the command shown on Savannah Emacs project page.)
119
120* Build Emacs
121
122Now you're ready to build and install Emacs with autogen, configure, make,
123and make install.
124
125First we need to switch to the MinGW-w64 environment. Exit the MSYS2 BASH
126console and run mingw64_shell.bat in the C:\msys64 folder, then cd back to
127your Emacs source directory, e.g.:
128
129 cd /c/emacs/emacs-25
130
131** Run autogen
132
133If you are building the development sources, run autogen to generate the
134configure script (note: this step is not necessary if you are using a
135release source tarball, as the configure file is included):
136
137 ./autogen.sh
138
139** Run configure
140
141Now you can run configure, which will build the various Makefiles -- note
142that the example given here is just a simple one - for more information
143on the options available please see the INSTALL file in this directory.
144
145The '--prefix' option specifies a location for the resulting binary files,
146which 'make install' will use - in this example we set it to C:\emacs\emacs-25.
147If a prefix is not specified the files will be put in the standard Unix
148directories located in your C:\msys64 directory, but this is not recommended.
149
150Note also that we need to disable Imagemagick because Emacs does not yet
151support it on Windows.
152
153 PKG_CONFIG_PATH=/mingw64/lib/pkgconfig \
154 ./configure --prefix=/c/emacs/emacs-25 --without-imagemagick
155
156** Run make
157
158This will compile Emacs and build the executables, putting them in the src
159directory:
160
161 make
162
163To speed up the process, you can try running
164
165 make -jN
166
167where N is the number of cores in your system -- if your MSYS2 make supports
168parallel execution it will run significantly faster.
169
170** Run make install
171
172Now you can run "make install", which will copy the executable and
173other files to the location specified in the configure step. This will
174create the bin, libexec, share, and var directories:
175
176 make install
177
178You can also say
179
180 make install prefix=/c/somewhere
181
182to install them somewhere else.
183
184* Test Emacs
185
186To test it out, run
187
188 ./bin/runemacs.exe -Q
189
190and if all went well, you will have a new 64-bit version of Emacs.
191
192* Make a shortcut
193
194To make a shortcut to run the new Emacs, right click on the location where you
195want to put it, e.g. the Desktop, select New / Shortcut, then select
196runemacs.exe in the bin folder of the new Emacs, and give it a name.
197
198You can set any command line options by right clicking on the resulting
199shortcut, select Properties, then add any options to the Target command,
200e.g. --debug-init.
201
202* Credits
203
204Thanks to Chris Zheng for the original build outline as used by the
205emacsbinw64 project, located at:
206
207 https://sourceforge.net/p/emacsbinw64/wiki/Build%20guideline%20for%20MSYS2-MinGW-w64%20system/
208
209* License
210
211This file is part of GNU Emacs.
212
213GNU Emacs is free software: you can redistribute it and/or modify
214it under the terms of the GNU General Public License as published by
215the Free Software Foundation, either version 3 of the License, or
216(at your option) any later version.
217
218GNU Emacs is distributed in the hope that it will be useful,
219but WITHOUT ANY WARRANTY; without even the implied warranty of
220MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
221GNU General Public License for more details.
222
223You should have received a copy of the GNU General Public License
224along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.