INSTALL 8.9 KB

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