2008-11-08 19:24:59 +00:00
|
|
|
|
GNU Emacs Installation Guide for the DJGPP (a.k.a. MS-DOS) port
|
|
|
|
|
|
2022-01-01 07:45:51 +00:00
|
|
|
|
Copyright (C) 1992, 1994, 1996-1997, 2000-2022 Free Software Foundation,
|
2013-01-01 09:11:05 +00:00
|
|
|
|
Inc.
|
2008-11-08 19:24:59 +00:00
|
|
|
|
See the end of the file for license conditions.
|
|
|
|
|
|
Fix the MSDOS build.
src/unexcoff.c [MSDOS]: Include libc/atexit.h.
(copy_text_and_data): Zero out the atexit chain pointer before
dumping Emacs.
src/termhooks.h (encode_terminal_code): Update prototype.
src/term.c (encode_terminal_code) [DOS_NT]: Make it externally
visible for all DOS_NT ports, not just WINDOWSNT.
(syms_of_term) [!MSDOS]: Don't define 'tty-menu-*' symbols on MSDOS.
src/sysdep.c (emacs_sigaction_init, init_signals): Don't use SIGCHLD
unless it is defined.
(emacs_pipe) [MSDOS]: Redirect to 'pipe'.
src/process.c (close_on_exec, accept4, process_socket): Move into
the "ifdef subprocesses" part.
(catch_child_signal): Condition by "ifdef subprocesses".
(syms_of_process) <Qinternal_default_process_sentinel>
<Qinternal_default_process_filter>: Condition by "ifdef subprocesses".
src/msdos.h: Add prototypes for new functions.
(EINPROGRESS): Define.
(O_CLOEXEC): Define to zero.
src/msdos.c (check_window_system): Remove unnecessary an
incompatible duplicate function.
(sys_opendir, readlinkat, faccessat, fstatat, unsetenv): New
functions in support of new functionality.
src/menu.c (single_menu_item): Add visual indication of submenu
also for menus on MSDOS frames.
(Fx_popup_menu) [!MSDOS]: Do not call tty_menu_show on MSDOS.
src/lisp.h (CHECK_PROCESS) [!subprocesses]: Do not define
when async subprocesses aren't supported.
src/font.h (FONT_WIDTH) [MSDOS]: MSDOS-specific definition.
src/emacs.c (close_output_streams): Zero out errno before calling
close_stream.
src/dired.c [MSDOS]: Include msdos.h.
src/conf_post.h (opendir) [MSDOS]: Redirect to sys_opendir.
(DATA_START) [MSDOS]: Define.
(SYSTEM_PURESIZE_EXTRA) [MSDOS]: Enlarge by 25K.
src/callproc.c (block_child_signal, unblock_child_signal) [MSDOS]:
Ifdef away for MSDOS.
(record_kill_process) [MSDOS]: Ifdef away the entire body for MSDOS.
(call_process_cleanup) [MSDOS]: Ifdef away portions not relevant
for MSDOS.
(call_process) [MSDOS]: Fix call sequence of dostounix_filename.
Use temporary file template that is compatible with mkostemp.
Move vfork-related portions under #ifndef MSDOS.
(syms_of_callproc): Unify templates of MSDOS and WINDOWSNT.
lisp/term/pc-win.el (x-list-fonts, x-get-selection-value): Provide
doc strings, as required by snarf-documentation.
msdos/sedlisp.inp:
msdos/sedlibmk.inp:
msdos/sedleim.inp:
msdos/sed3v2.inp:
msdos/sed2v2.inp:
msdos/sed1v2.inp: Update Sed scripts for Emacs 24.4.
msdos/inttypes.h: Add PRIdMAX.
msdos/INSTALL: Update for Emacs 24.4.
msdos/sedadmin.inp: New file.
2014-04-16 13:27:28 +00:00
|
|
|
|
The DJGPP port of GNU Emacs builds and runs on all versions of
|
|
|
|
|
MS-Windows from version 3.X on, including Windows XP, Vista, and
|
|
|
|
|
Windows 7 (however, see below for issues with Windows Vista and 7).
|
|
|
|
|
Building on plain MS-DOS is supported only if long file names are
|
|
|
|
|
supported (e.g., with a specialized driver such as doslfn).
|
2008-11-08 19:24:59 +00:00
|
|
|
|
|
|
|
|
|
To build and install the DJGPP port, you need to have the DJGPP ports
|
2014-08-09 16:12:33 +00:00
|
|
|
|
of GCC (the GNU C compiler), GNU Make, rm, mv, cp, and sed, and
|
2014-08-09 18:48:45 +00:00
|
|
|
|
version 2.02 or later of DJGPP itself. See the remarks in CONFIG.BAT
|
2014-08-09 16:12:33 +00:00
|
|
|
|
for more information about locations and versions. The Emacs FAQ (see
|
|
|
|
|
info/efaq.info) includes pointers to Internet sites where you can find
|
|
|
|
|
the necessary utilities; search for "MS-DOS". The configuration step
|
|
|
|
|
(see below) will test for these utilities and will refuse to continue
|
|
|
|
|
if any of them isn't found.
|
2008-11-08 19:24:59 +00:00
|
|
|
|
|
2018-05-04 15:12:32 +00:00
|
|
|
|
You should carefully choose the version of GCC you use to build Emacs,
|
|
|
|
|
because recent versions of GCC don't support building Emacs very well.
|
|
|
|
|
The main issue is the debug info: the DJGPP build of Emacs must use
|
|
|
|
|
the COFF debug info. GCC support for COFF debug info was steadily
|
|
|
|
|
deteriorating since GCC 5, and GCC 8.1 officially stopped supporting
|
|
|
|
|
the -gcoff switch, which the Emacs build process needs. We recommend
|
|
|
|
|
using GCC 3.4.X and Binutils 2.26; GDB 7.2 is capable to debug an
|
|
|
|
|
Emacs binary built by this combination.
|
|
|
|
|
|
2008-11-15 10:24:08 +00:00
|
|
|
|
Bootstrapping Emacs or recompiling Lisp files in the `lisp'
|
|
|
|
|
subdirectory using the various targets in the lisp/Makefile file
|
|
|
|
|
requires additional utilities: `find' (from Findutils), GNU `echo' and
|
2010-02-19 13:26:50 +00:00
|
|
|
|
`test' (from Sh-utils or Coreutils), `ls' and `chmod' (from Fileutils
|
|
|
|
|
or Coreutils), `grep' (from Grep), and a port of Bash. However, you
|
|
|
|
|
should not normally need to run lisp/Makefile, as all the Lisp files
|
|
|
|
|
are distributed in byte-compiled form as well. As for bootstrapping
|
|
|
|
|
itself, you will only need that if you check-out development sources
|
|
|
|
|
from the Emacs source repository.
|
2008-11-08 19:24:59 +00:00
|
|
|
|
|
2014-08-09 16:12:33 +00:00
|
|
|
|
Building the DJGPP version of Emacs is supported only on systems which
|
|
|
|
|
support long file names (e.g. Windows 9X or Windows XP). You need to
|
|
|
|
|
unpack Emacs distribution in a way that doesn't truncate the original
|
|
|
|
|
long filenames to the DOS 8.3 namespace; the easiest way to do this is
|
|
|
|
|
to use djtar program which comes with DJGPP, since it will behave
|
|
|
|
|
consistently with the rest of DJGPP tools. Do _not_ disable the DJGPP
|
|
|
|
|
long-file-name support (a.k.a. "LFN") while building Emacs.
|
2008-11-08 19:24:59 +00:00
|
|
|
|
|
|
|
|
|
(By the time you read this, you have already unpacked the Emacs
|
|
|
|
|
distribution, but if the explanations above imply that you should have
|
|
|
|
|
done it differently, it's safer to delete the directory tree created
|
|
|
|
|
by the unpacking program and unpack Emacs again, than to risk running
|
2009-07-25 07:45:10 +00:00
|
|
|
|
into strange problems during the build process.)
|
2008-11-08 19:24:59 +00:00
|
|
|
|
|
|
|
|
|
To unpack Emacs with djtar, type this command:
|
|
|
|
|
|
|
|
|
|
djtar -x emacs.tgz
|
|
|
|
|
|
|
|
|
|
(This assumes that the Emacs distribution is called `emacs.tgz' on
|
|
|
|
|
your system.)
|
|
|
|
|
|
2009-07-25 07:45:10 +00:00
|
|
|
|
When unpacking Emacs is done, a directory called `emacs-XX.YY' will be
|
|
|
|
|
created, where XX.YY is the Emacs version.
|
|
|
|
|
|
2008-11-08 19:24:59 +00:00
|
|
|
|
If you want to print international characters, install the intlfonts
|
|
|
|
|
distribution. For this, create a directory called `fonts' under the
|
2009-07-25 07:45:10 +00:00
|
|
|
|
`emacs-XX.YY' top-level directory created by unpacking emacs.tgz,
|
|
|
|
|
chdir into the directory `emacs-XX.YY/fonts', and type this:
|
2008-11-08 19:24:59 +00:00
|
|
|
|
|
|
|
|
|
djtar -x intlfonts.tgz
|
|
|
|
|
|
2009-07-25 07:45:10 +00:00
|
|
|
|
To build and install Emacs, chdir to the `emacs-XX.YY' directory and
|
|
|
|
|
type these commands:
|
2008-11-08 19:24:59 +00:00
|
|
|
|
|
|
|
|
|
config msdos
|
|
|
|
|
make install
|
|
|
|
|
|
|
|
|
|
Running "config msdos" checks for several programs that are required
|
|
|
|
|
to configure and build Emacs; if one of those programs is not found,
|
2014-08-09 16:12:33 +00:00
|
|
|
|
CONFIG.BAT stops and prints an error message.
|
2008-11-08 19:24:59 +00:00
|
|
|
|
|
2018-05-04 15:12:32 +00:00
|
|
|
|
On Windows NT and Windows 2000/XP and later, running "config msdos"
|
2010-02-19 13:26:50 +00:00
|
|
|
|
might print an error message like "VDM has been already loaded". This
|
|
|
|
|
is because those systems have a program called `redir.exe' which is
|
2008-11-08 19:24:59 +00:00
|
|
|
|
incompatible with a program by the same name supplied with DJGPP,
|
|
|
|
|
which is used by config.bat. To resolve this, move the DJGPP's `bin'
|
|
|
|
|
subdirectory to the front of your PATH environment variable.
|
|
|
|
|
|
2018-05-04 15:12:32 +00:00
|
|
|
|
Windows Vista and later has several bugs in its DPMI server related to
|
|
|
|
|
memory allocation: it fails DPMI resize memory block function, and it
|
2008-12-19 11:02:42 +00:00
|
|
|
|
arbitrarily limits the default amount of DPMI memory to 32MB. To work
|
|
|
|
|
around these bugs, first configure Emacs to use the `malloc' function
|
|
|
|
|
from the DJGPP library. To this end, run CONFIG.BAT with the
|
|
|
|
|
"--with-system-malloc" option:
|
|
|
|
|
|
|
|
|
|
config --with-system-malloc msdos
|
|
|
|
|
make install
|
|
|
|
|
|
2010-02-19 13:26:50 +00:00
|
|
|
|
In addition, for Windows Vista you'll need to install Service Pack 1
|
|
|
|
|
(SP1) or later and enlarge its DPMI memory limit by setting the value
|
2008-12-19 11:02:42 +00:00
|
|
|
|
of this Registry key:
|
|
|
|
|
|
|
|
|
|
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Wow\DpmiLimit
|
|
|
|
|
|
|
|
|
|
Create this key if it does not exist. The value is a DWORD; setting
|
|
|
|
|
it to 536870912 should let Emacs use up to 512MB of memory.
|
|
|
|
|
|
2009-02-24 19:11:49 +00:00
|
|
|
|
If you have other problems, either building Emacs or running the
|
|
|
|
|
produced binary, look in the file etc/PROBLEMS for some known problems
|
|
|
|
|
related to the DJGPP port (search for "MS-DOS").
|
|
|
|
|
|
2008-11-08 19:24:59 +00:00
|
|
|
|
To install the international fonts, chdir to the intlfonts-X.Y
|
|
|
|
|
directory created when you unpacked the intlfonts distribution (X.Y is
|
|
|
|
|
the version number of the fonts' distribution), and type the following
|
|
|
|
|
command:
|
|
|
|
|
|
|
|
|
|
make bdf INSTALLDIR=..
|
|
|
|
|
|
|
|
|
|
After Make finishes, you may remove the directory intlfonts-X.Y; the
|
|
|
|
|
fonts are installed into the fonts/bdf subdirectory of the top-level
|
|
|
|
|
Emacs directory, and that is where Emacs will look for them by
|
|
|
|
|
default.
|
|
|
|
|
|
|
|
|
|
Building Emacs creates executable files in the src and lib-src
|
|
|
|
|
directories. Installing the DJGPP port of Emacs moves these
|
|
|
|
|
executables to a sibling directory called bin. For example, if you
|
|
|
|
|
build in directory C:/emacs, installing moves the executables from
|
|
|
|
|
C:/emacs/src and C:/emacs/lib-src to the directory C:/emacs/bin, so
|
|
|
|
|
you can then delete the subdirectories C:/emacs/src and
|
|
|
|
|
C:/emacs/lib-src if you wish. The only subdirectories you need to
|
|
|
|
|
keep are bin, lisp, etc and info. (If you installed intlfonts, keep
|
|
|
|
|
the fonts directory and all its subdirectories as well.) The bin
|
|
|
|
|
subdirectory should be added to your PATH. The msdos subdirectory
|
|
|
|
|
includes a PIF and an icon file for Emacs which you might find useful
|
|
|
|
|
if you run Emacs under MS Windows.
|
|
|
|
|
|
|
|
|
|
Emacs on MSDOS finds the lisp, etc and info directories by looking in
|
|
|
|
|
../lisp, ../etc and ../info, starting from the directory where the
|
|
|
|
|
Emacs executable was run from. You can override this by setting the
|
|
|
|
|
environment variables EMACSDATA (for the location of `etc' directory),
|
|
|
|
|
EMACSLOADPATH (for the location of `lisp' directory) and INFOPATH (for
|
|
|
|
|
the location of the `info' directory).
|
|
|
|
|
|
|
|
|
|
Emacs features which require asynchronous subprocesses that depend on
|
|
|
|
|
multitasking do not work in the DJGPP port. Synchronous subprocesses
|
2010-02-19 13:26:50 +00:00
|
|
|
|
do work, so features such as compilation, grep, and Ispell run
|
|
|
|
|
synchronously, unlike on other platforms.
|
2008-11-08 19:24:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This file is part of GNU Emacs.
|
|
|
|
|
|
|
|
|
|
GNU Emacs is free software: you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
|
|
GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
2017-09-30 00:44:23 +00:00
|
|
|
|
along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|