Following communication from FSF, relaxng.rnc can be treated as part
[bpt/emacs.git] / msdos / INSTALL
CommitLineData
cafb9504
EZ
1GNU Emacs Installation Guide for the DJGPP (a.k.a. MS-DOS) port
2
3Copyright (C) 1992, 1994, 1996, 1997, 2000, 2001, 2002, 2003, 2004,
42005, 2006, 2007, 2008 Free Software Foundation, Inc.
5See the end of the file for license conditions.
6
7The DJGPP port of GNU Emacs builds and runs on plain DOS and also on
8all versions of MS-Windows from version 3.X on, including Windows XP
9and Vista.
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
19Recompiling Lisp files in the `lisp' subdirectory using the various
20targets in the lisp/Makefile file requires additional utilities:
21`find' (from Findutils), GNU `echo' and `test' (from Sh-utils), and a
22port of Bash. However, you should not normally need to run
23lisp/Makefile, as all the Lisp files are distributed in byte-compiled
24form as well.
25
26If you are building the DJGPP version of Emacs on an DOS-like system
27which supports long file names (e.g. Windows 9X or Windows XP), you
28need to make sure that long file names are handled consistently both
29when you unpack the distribution and compile it. If you intend to
30compile with DJGPP v2.0 or later, and long file names support is
31enabled (LFN=y in the environment), you need to unpack Emacs
32distribution in a way that doesn't truncate the original long
33filenames to the DOS 8.3 namespace; the easiest way to do this is to
34use djtar program which comes with DJGPP, since it will note the LFN
35setting and behave accordingly. You can build Emacs with LFN=n, if
36some of your tools don't support long file names: just ensure that LFN
37is set to `n' during both unpacking and compiling.
38
39(By the time you read this, you have already unpacked the Emacs
40distribution, but if the explanations above imply that you should have
41done it differently, it's safer to delete the directory tree created
42by the unpacking program and unpack Emacs again, than to risk running
43into problems during the build process.)
44
45It is important to understand that the runtime support of long file
46names by the Emacs binary is NOT affected by the LFN setting during
47compilation; Emacs compiled with DJGPP v2.0 or later will always
48support long file names on Windows no matter what was the setting
49of LFN at compile time. However, if you compiled with LFN disabled
50and want to enable LFN support after Emacs was already built, you need
51to make sure that the support files in the lisp, etc and info
52directories are called by their original long names as found in the
53distribution. You can do this either by renaming the files manually,
54or by extracting them from the original distribution archive with
55djtar after you set LFN=y in the environment.
56
57To unpack Emacs with djtar, type this command:
58
59 djtar -x emacs.tgz
60
61(This assumes that the Emacs distribution is called `emacs.tgz' on
62your system.)
63
64If you want to print international characters, install the intlfonts
65distribution. For this, create a directory called `fonts' under the
66Emacs top-level directory (usually called `emacs-XX.YY') created by
67unpacking emacs.tgz, chdir into the directory emacs-XX.YY/fonts, and
68type this:
69
70 djtar -x intlfonts.tgz
71
72When unpacking Emacs is done, a directory called `emacs-XX.YY' will be
73created, where XX.YY is the Emacs version. To build and install
74Emacs, chdir to that directory and type these commands:
75
76 config msdos
77 make install
78
79Running "config msdos" checks for several programs that are required
80to configure and build Emacs; if one of those programs is not found,
81CONFIG.BAT stops and prints an error message. If you have DJGPP
82version 2.0 or 2.01, it will complain about a program called
83DJECHO.EXE. These old versions of DJGPP shipped that program under
84the name ECHO.EXE, so you can simply copy ECHO.EXE to DJECHO.EXE and
85rerun CONFIG.BAT. If you have neither ECHO.EXE nor DJECHO.EXE, you
86should be able to find them in your djdevNNN.zip archive (where NNN is
87the DJGPP version number).
88
89On Windows NT, Windows 2000/XP/Vista, running "config msdos" might
90print an error message like "VDM has been already loaded". This is
91because those systems have a program called `redir.exe' which is
92incompatible with a program by the same name supplied with DJGPP,
93which is used by config.bat. To resolve this, move the DJGPP's `bin'
94subdirectory to the front of your PATH environment variable.
95
96To install the international fonts, chdir to the intlfonts-X.Y
97directory created when you unpacked the intlfonts distribution (X.Y is
98the version number of the fonts' distribution), and type the following
99command:
100
101 make bdf INSTALLDIR=..
102
103After Make finishes, you may remove the directory intlfonts-X.Y; the
104fonts are installed into the fonts/bdf subdirectory of the top-level
105Emacs directory, and that is where Emacs will look for them by
106default.
107
108Building Emacs creates executable files in the src and lib-src
109directories. Installing the DJGPP port of Emacs moves these
110executables to a sibling directory called bin. For example, if you
111build in directory C:/emacs, installing moves the executables from
112C:/emacs/src and C:/emacs/lib-src to the directory C:/emacs/bin, so
113you can then delete the subdirectories C:/emacs/src and
114C:/emacs/lib-src if you wish. The only subdirectories you need to
115keep are bin, lisp, etc and info. (If you installed intlfonts, keep
116the fonts directory and all its subdirectories as well.) The bin
117subdirectory should be added to your PATH. The msdos subdirectory
118includes a PIF and an icon file for Emacs which you might find useful
119if you run Emacs under MS Windows.
120
121Emacs on MSDOS finds the lisp, etc and info directories by looking in
122../lisp, ../etc and ../info, starting from the directory where the
123Emacs executable was run from. You can override this by setting the
124environment variables EMACSDATA (for the location of `etc' directory),
125EMACSLOADPATH (for the location of `lisp' directory) and INFOPATH (for
126the location of the `info' directory).
127
128Emacs features which require asynchronous subprocesses that depend on
129multitasking do not work in the DJGPP port. Synchronous subprocesses
130do work, so features such as compilation and grep run synchronously,
131unlike opn other platforms.
132
133Version 2.0 of djgpp has two bugs that affect Emacs. We've included
134corrected versions of two files from djgpp in the msdos subdirectory:
135is_exec.c and sigaction.c. To work around the bugs, compile these
136files and link them into temacs. Djgpp versions 2.01 and later have
137these bugs fixed, so upgrade if you can before building Emacs.
138
139\f
140This file is part of GNU Emacs.
141
142GNU Emacs is free software: you can redistribute it and/or modify
143it under the terms of the GNU General Public License as published by
144the Free Software Foundation, either version 3 of the License, or
145(at your option) any later version.
146
147GNU Emacs is distributed in the hope that it will be useful,
148but WITHOUT ANY WARRANTY; without even the implied warranty of
149MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
150GNU General Public License for more details.
151
152You should have received a copy of the GNU General Public License
153along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.