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