Merge from emacs-24; up to 2014-06-02T11:35:40Z!michael.albinus@gmx.de
[bpt/emacs.git] / msdos / INSTALL
CommitLineData
cafb9504
EZ
1GNU Emacs Installation Guide for the DJGPP (a.k.a. MS-DOS) port
2
ba318903 3Copyright (C) 1992, 1994, 1996-1997, 2000-2014 Free Software Foundation,
ab422c4d 4Inc.
cafb9504
EZ
5See the end of the file for license conditions.
6
bf6b4923
EZ
7The DJGPP port of GNU Emacs builds and runs on all versions of
8MS-Windows from version 3.X on, including Windows XP, Vista, and
9Windows 7 (however, see below for issues with Windows Vista and 7).
10Building on plain MS-DOS is supported only if long file names are
11supported (e.g., with a specialized driver such as doslfn).
cafb9504
EZ
12
13To build and install the DJGPP port, you need to have the DJGPP ports
bf6b4923 14of GCC (the GNU C compiler), GNU Make, rm, mv, cp, and sed. See the
cafb9504 15remarks in CONFIG.BAT for more information about locations and
bf6b4923
EZ
16versions. The Emacs FAQ (see info/efaq.info) includes pointers to
17Internet sites where you can find the necessary utilities; search for
18"MS-DOS". The configuration step (see below) will test for these
19utilities and will refuse to continue if any of them isn't found.
cafb9504 20
71a69201
EZ
21Bootstrapping Emacs or recompiling Lisp files in the `lisp'
22subdirectory using the various targets in the lisp/Makefile file
23requires additional utilities: `find' (from Findutils), GNU `echo' and
e4138181
EZ
24`test' (from Sh-utils or Coreutils), `ls' and `chmod' (from Fileutils
25or Coreutils), `grep' (from Grep), and a port of Bash. However, you
26should not normally need to run lisp/Makefile, as all the Lisp files
27are distributed in byte-compiled form as well. As for bootstrapping
28itself, you will only need that if you check-out development sources
29from the Emacs source repository.
cafb9504 30
bf6b4923
EZ
31Building the DJGPP version of Emacs is currently supported only on
32systems which support long file names (e.g. Windows 9X or Windows XP).
33You need to unpack Emacs distribution in a way that doesn't truncate
34the original long filenames to the DOS 8.3 namespace; the easiest way
35to do this is to use djtar program which comes with DJGPP, since it
36will behave consistently with the rest of DJGPP tools. Do _not_
37disable the DJGPP long-file-name support (a.k.a. "LFN") while building
38Emacs.
cafb9504
EZ
39
40(By the time you read this, you have already unpacked the Emacs
41distribution, but if the explanations above imply that you should have
42done it differently, it's safer to delete the directory tree created
43by the unpacking program and unpack Emacs again, than to risk running
573794ef 44into strange problems during the build process.)
cafb9504 45
cafb9504
EZ
46To unpack Emacs with djtar, type this command:
47
48 djtar -x emacs.tgz
49
50(This assumes that the Emacs distribution is called `emacs.tgz' on
51your system.)
52
573794ef
EZ
53When unpacking Emacs is done, a directory called `emacs-XX.YY' will be
54created, where XX.YY is the Emacs version.
55
cafb9504
EZ
56If you want to print international characters, install the intlfonts
57distribution. For this, create a directory called `fonts' under the
573794ef
EZ
58`emacs-XX.YY' top-level directory created by unpacking emacs.tgz,
59chdir into the directory `emacs-XX.YY/fonts', and type this:
cafb9504
EZ
60
61 djtar -x intlfonts.tgz
62
573794ef
EZ
63To build and install Emacs, chdir to the `emacs-XX.YY' directory and
64type these commands:
cafb9504
EZ
65
66 config msdos
67 make install
68
69Running "config msdos" checks for several programs that are required
70to configure and build Emacs; if one of those programs is not found,
71CONFIG.BAT stops and prints an error message. If you have DJGPP
72version 2.0 or 2.01, it will complain about a program called
73DJECHO.EXE. These old versions of DJGPP shipped that program under
74the name ECHO.EXE, so you can simply copy ECHO.EXE to DJECHO.EXE and
75rerun CONFIG.BAT. If you have neither ECHO.EXE nor DJECHO.EXE, you
76should be able to find them in your djdevNNN.zip archive (where NNN is
77the DJGPP version number).
78
e4138181
EZ
79On Windows NT and Windows 2000/XP/Vista/7, running "config msdos"
80might print an error message like "VDM has been already loaded". This
81is because those systems have a program called `redir.exe' which is
cafb9504
EZ
82incompatible with a program by the same name supplied with DJGPP,
83which is used by config.bat. To resolve this, move the DJGPP's `bin'
84subdirectory to the front of your PATH environment variable.
85
e4138181 86Windows Vista/7 has several bugs in its DPMI server related to memory
bd448b7a
EZ
87allocation: it fails DPMI resize memory block function, and it
88arbitrarily limits the default amount of DPMI memory to 32MB. To work
89around these bugs, first configure Emacs to use the `malloc' function
90from the DJGPP library. To this end, run CONFIG.BAT with the
91"--with-system-malloc" option:
92
93 config --with-system-malloc msdos
94 make install
95
e4138181
EZ
96In addition, for Windows Vista you'll need to install Service Pack 1
97(SP1) or later and enlarge its DPMI memory limit by setting the value
bd448b7a
EZ
98of this Registry key:
99
100 HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Wow\DpmiLimit
101
102Create this key if it does not exist. The value is a DWORD; setting
103it to 536870912 should let Emacs use up to 512MB of memory.
104
d7d1c408
EZ
105If you have other problems, either building Emacs or running the
106produced binary, look in the file etc/PROBLEMS for some known problems
107related to the DJGPP port (search for "MS-DOS").
108
cafb9504
EZ
109To install the international fonts, chdir to the intlfonts-X.Y
110directory created when you unpacked the intlfonts distribution (X.Y is
111the version number of the fonts' distribution), and type the following
112command:
113
114 make bdf INSTALLDIR=..
115
116After Make finishes, you may remove the directory intlfonts-X.Y; the
117fonts are installed into the fonts/bdf subdirectory of the top-level
118Emacs directory, and that is where Emacs will look for them by
119default.
120
121Building Emacs creates executable files in the src and lib-src
122directories. Installing the DJGPP port of Emacs moves these
123executables to a sibling directory called bin. For example, if you
124build in directory C:/emacs, installing moves the executables from
125C:/emacs/src and C:/emacs/lib-src to the directory C:/emacs/bin, so
126you can then delete the subdirectories C:/emacs/src and
127C:/emacs/lib-src if you wish. The only subdirectories you need to
128keep are bin, lisp, etc and info. (If you installed intlfonts, keep
129the fonts directory and all its subdirectories as well.) The bin
130subdirectory should be added to your PATH. The msdos subdirectory
131includes a PIF and an icon file for Emacs which you might find useful
132if you run Emacs under MS Windows.
133
134Emacs on MSDOS finds the lisp, etc and info directories by looking in
135../lisp, ../etc and ../info, starting from the directory where the
136Emacs executable was run from. You can override this by setting the
137environment variables EMACSDATA (for the location of `etc' directory),
138EMACSLOADPATH (for the location of `lisp' directory) and INFOPATH (for
139the location of the `info' directory).
140
141Emacs features which require asynchronous subprocesses that depend on
142multitasking do not work in the DJGPP port. Synchronous subprocesses
e4138181
EZ
143do work, so features such as compilation, grep, and Ispell run
144synchronously, unlike on other platforms.
cafb9504
EZ
145
146Version 2.0 of djgpp has two bugs that affect Emacs. We've included
147corrected versions of two files from djgpp in the msdos subdirectory:
148is_exec.c and sigaction.c. To work around the bugs, compile these
149files and link them into temacs. Djgpp versions 2.01 and later have
150these bugs fixed, so upgrade if you can before building Emacs.
151
152\f
153This file is part of GNU Emacs.
154
155GNU Emacs is free software: you can redistribute it and/or modify
156it under the terms of the GNU General Public License as published by
157the Free Software Foundation, either version 3 of the License, or
158(at your option) any later version.
159
160GNU Emacs is distributed in the hope that it will be useful,
161but WITHOUT ANY WARRANTY; without even the implied warranty of
162MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
163GNU General Public License for more details.
164
165You should have received a copy of the GNU General Public License
166along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.