1 Building and Installing XEmacs on Windows 95/98/NT -*- mode:outline -*-
8 This is a port of XEmacs to Windows 95/98/NT. If you are looking for a port
9 of GNU Emacs, see http://www.cs.washington.edu/homes/voelker/ntemacs.html.
12 * Required tools and sources
13 ============================
15 1. You will need Visual C++ V4.0 or later to compile everything. Personally
16 we have tested V4.0, V4.2, V5.0 and v6.0.
18 Note that Visual C++ assumes that the environment variables INCLUDE and
19 LIB are set to specify the location of the includes and libraries.
20 Your PATH environment variable also needs to include the DevStudio
21 vc\bin and sharedide\bin directories.
23 Visual C++ V5.0 installs a batch file called vcvars32.bat in
24 c:\Program Files\DevStudio\VC\bin\ (or wherever you installed it) that you
25 can run before building to set up all of these environment variables.
27 2. Grab the latest XEmacs source from
29 ftp://ftp.xemacs.org/pub/xemacs/
31 or one of its mirrors listed at http://www.xemacs.org/Download/index.html .
33 You'll also need the packages. You probably want to get the unified
36 ftp://ftp.xemacs.org/pub/xemacs/packages/xemacs-sumo.tar.gz
38 Although we don't recommend it, you can also retrieve just the packages
39 you really need if you have an extremely slow net connection or are very
40 short on disk space. You can find the various packages in
41 ftp://ftp.xemacs.org/pub/xemacs/packages/. You will need the
42 xemacs-base package. You'll also need the texinfo package unless you
43 have a copy of makeinfo.exe on your machine. If you want to download
44 additional or updated packages from within XEmacs you'll need the efs,
45 dired and vm packages. You'll probably also want at least the
46 edit-utils, text-modes, fsf-compat, cc-mode, prog-modes and xemacs-devel
49 Unpack the packages into "x:\your\choice\XEmacs\xemacs-packages",
50 for example "c:\Program Files\XEmacs\xemacs-packages".
52 3. At this point you can choose to build for X and/or for Win32 native GUI.
53 If you only want to build for the Win32 native GUI then skip the next
57 ** Extra tools and sources required for X
59 If you want support for X you will also need:
61 1. An X server. MI/X is available on the Internet as trialware; it is
62 available from: http://www.microimages.com/www/html/mix/
64 2. Source for the MIT X11R6.3 libraries, available from: ftp.x.org
66 3. You'll need to compile the MIT libraries without multi-thread support.
67 To do this, there is an example Win32.cf and site.def provided which set
68 the relevant flags. You will also need to apply the patch in nt/X11.patch
69 in the xc/lib/X11 directory which will fix the DLL definition file.
71 Once compiled and installed, you will need to apply the patch in
72 nt/Xmd.patch. This is messy and better solutions would be appreciated.
74 4. Goto step 2 under 'Optional libraries' below.
80 1. You really want the XPM library. Grab the latest version of the
81 xpm sources (xpm-3.4k.tar.gz at time of writing) from
82 ftp://ftp.xemacs.org/pub/xemacs/aux/ and unpack them somewhere.
83 Copy nt\xpm.mak from the xemacs sources to the lib subdirectory of the
84 xpm sources, cd to that directory and build xpm with 'nmake -f xpm.mak'.
86 2. You probably also want PNG image support. Grab the latest versions of zlib
87 and libpng (zlib-1.1.3 and libpng-1.0.2 at time of writing) from
88 ftp://ftp.xemacs.org/pub/xemacs/aux/, unpack them somewhere and read
89 the respective READMEs for details on how to build them. The following
90 build procedure works for zlib-1.1.3 and libpng-1.0.2:
92 cd to the zlib directory, type 'copy msdos\makefile.w32 Makefile' and
95 cd to the libpng directory, rename or move the zlib directory to ..\zlib
96 and type 'nmake -f scripts\makefile.w32'.
98 3. If you want TIFF support, grap the latest version of libtiff (tiff-v3.4
99 at time of writing) from ftp://ftp.xemacs.org/pub/xemacs/aux/ and unpack
100 it somewhere. Copy nt\tiff.mak from the xemacs sources to the
101 contrib\winnt subdirectory of the tiff sources, cd to that directory and
102 build libtiff with 'nmake -f tiff.mak'. Note: tiff.mak has only been
103 verified to work under WinNT, not Win95 or 98. However, the lastest
104 distribution of libtiff includes a contrib\win95\makefile.w95; that might
107 4. If you want JPEG support grab the latest version of jpegsrc (jpeg-6b at
108 time of writing) from ftp://ftp.xemacs.org/pub/xemacs/aux/ and read the
109 README for details on how to build it.
111 5. If you want X-Face support, grab the compface distribution from
112 ftp://ftp.xemacs.org/pub/xemacs/aux/ and unpack it somewhere.
113 Copy nt\compface.mak from xemacs sources to the compface directory.
114 cd to that directory and build libcompface with 'nmake -f compface.mak'.
120 1. cd to the nt subdirectory of the xemacs distribution and copy the file
121 config.inc.samp to config.inc. Make any necessary modifications. This
122 file controls the options that XEmacs is built with:
124 -- If you're building with XPM support, modify the appropriate lines in
125 config.inc as follows:
128 XPM_DIR="x:\location\of\your\xpm\sources"
130 and similarly for JPEG and TIFF support.
132 -- If you're building with PNG support, modify the appropriate lines in
133 config.inc as follows:
136 PNG_DIR="x:\location\of\your\png\sources"
137 ZLIB_DIR="x:\location\of\your\zlib\sources"
139 -- If you're building with GIF support, modify the appropriate lines in
140 config.inc as follows:
144 -- If you're building with X-Face support, modify the appropriate lines in
145 config.inc as follows:
148 COMPFACE_DIR="x:\location\of\your\compface\sources"
150 -- If you're building for X, modify the appropriate lines in config.inc
154 X11_DIR=x:\root\directory\of\your\X11\installation
156 -- By default, XEmacs will expect to find its packages in the
157 subdirectories "site-packages", "mule-packages" and "xemacs-packages"
158 under the directory "c:\Program Files\XEmacs". If you want it to look
159 for these subdirectories elsewhere, modify the appropriate lines in
160 config.inc as follows:
162 PACKAGE_PREFIX="x:\your\package\directory"
164 Make sure that the directory pointed to by PACKAGE_PREFIX contains
165 the xemacs-packages directory into which you installed the packages.
167 -- XEmacs can build its info files more quickly if you have a copy of the
168 makeinfo program. If you have a copy, modify the appropriate lines in
169 config.inc as follows:
171 MAKEINFO="x:\location\of\makeinfo.exe"
173 If you don't have a copy of makeinfo then you'll need to have installed
174 the XEmacs texinfo package.
176 2. If you want to install XEmacs when you build it, modify the appropriate
177 lines in config.inc as follows (you can also run XEmacs from its build
180 INSTALL_DIR="x:\your\installation\directory"
182 (By default, XEmacs will be installed in directories under the directory
183 "c:\Program Files\XEmacs\XEmacs-21.2".)
185 2. If you want to build xemacs on the command line, use
186 `nmake install -f xemacs.mak', or just `nmake -f xemacs.mak' if you want
187 to run XEmacs from its build directory. nmake will build temacs, the DOC
188 file, update the elc's, dump xemacs and (optionally) install the relevant
189 files in the directories under the installation directory.
191 If you chose to install XEmacs, the file that you should run to start
192 XEmacs will be installed (by default) as
193 "c:\Program Files\XEmacs\XEmacs-21.2\i586-pc-win32\xemacs.exe".
195 To run from the build directory, run the file "nt\xemacs.exe" off of the
196 root of the build directory.
198 You may want to create a shortcut to the file from your Desktop or
201 3. To build using MS Developer Studio, you can use the workspace file
202 `nt/xemacs.dsw'. This was prepared for Visual C++ 5.0; if you have
203 a different version and this file doesn't work, just open up
204 `nt/xemacs.mak' from within MS Developer Studio and it will offer to
205 wrap this Makefile in a workspace file, from which you can build.
206 Assuming you want to run from the build directory (which you will
207 want to do if you are planning on doing any development work on XEmacs),
208 use the following settings in Project/Settings...:
210 Under the General tab:
212 Build command line: NMAKE /f xemacs.mak
213 Output file name: ..\src\xemacs.exe
214 Browse info file name: ..\src\temacs.bsc
218 Executable for debug session: ..\src\xemacs.exe
221 If you want to install XEmacs when it's built, change the build command
222 line to "NMAKE install /f xemacs.mak". (You will have to make the same
223 change even if you use the provided workspace nt/xemacs.dsw.)
226 * Debugging under MS Developer Studio
227 =====================================
229 The build process always creates debugging and "Source Browser" information
230 in the source tree for use with DevStudio. However that information is not
231 very useful unless you build a debug version of XEmacs:
233 1. Set DEBUG_XEMACS=1 and DEPEND=1 in config.inc and rebuild.
235 2. See instructions above for obtaining a workspace file for use with
236 MS Developer Studio. Build and debug your XEmacs this way.
238 3. To display the contents of a lisp variable, type Shift-F9 (or use the
239 menu) to bring up the QuickWatch window, type debug_print(variable) and
240 click Recalculate. The output will appear in a console window, as well
241 as in the Debug window in MS Developer Studio.
243 4. To view Lisp variables in the "Watch" window wrap the variable in one of
244 the helper functions from the file src\console-msw.c, for example type
245 DSTRING(variable) in the "Watch" window to inspect a Lisp string.
251 Please look at the PROBLEMS file for known problems. Any other problems you
252 need clarified, please email us and we will endeavour to provide any
255 The XEmacs NT Mailing List: xemacs-nt@xemacs.org
256 Subscribe address: xemacs-nt-request@xemacs.org