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