406
|
1 Building and Installing XEmacs on Windows 95/98/NT -*- mode:outline -*-
|
155
|
2
|
169
|
3 David Hobley
|
406
|
4 Marc Paquette
|
|
5 Jonathan Harris
|
|
6 Ben Wing
|
155
|
7
|
406
|
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.
|
169
|
10
|
400
|
11
|
|
12 * Required tools and sources
|
|
13 ============================
|
155
|
14
|
400
|
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.
|
|
17
|
|
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.
|
|
22
|
373
|
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.
|
298
|
26
|
406
|
27 2. Grab the latest XEmacs source from
|
|
28
|
|
29 ftp://ftp.xemacs.org/pub/xemacs/
|
|
30
|
|
31 or one of its mirrors listed at http://www.xemacs.org/Download/index.html .
|
|
32
|
|
33 You'll also need the packages. You probably want to get the unified
|
|
34 packages bundle from
|
400
|
35
|
406
|
36 ftp://ftp.xemacs.org/pub/xemacs/packages/xemacs-sumo.tar.gz
|
|
37
|
|
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
|
400
|
47 packages.
|
|
48
|
406
|
49 Unpack the packages into "x:\your\choice\XEmacs\xemacs-packages",
|
|
50 for example "c:\Program Files\XEmacs\xemacs-packages".
|
298
|
51
|
400
|
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
|
|
54 section.
|
|
55
|
|
56
|
|
57 ** Extra tools and sources required for X
|
|
58
|
|
59 If you want support for X you will also need:
|
|
60
|
406
|
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/
|
400
|
63
|
|
64 2. Source for the MIT X11R6.3 libraries, available from: ftp.x.org
|
276
|
65
|
400
|
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.
|
|
70
|
|
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.
|
|
73
|
|
74 4. Goto step 2 under 'Optional libraries' below.
|
|
75
|
|
76
|
|
77 * Optional libraries
|
|
78 ====================
|
276
|
79
|
406
|
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.
|
298
|
83 Copy nt\xpm.mak from the xemacs sources to the lib subdirectory of the
|
373
|
84 xpm sources, cd to that directory and build xpm with 'nmake -f xpm.mak'.
|
|
85
|
|
86 2. You probably also want PNG image support. Grab the latest versions of zlib
|
406
|
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:
|
373
|
91
|
|
92 cd to the zlib directory, type 'copy msdos\makefile.w32 Makefile' and
|
|
93 then type 'nmake'.
|
|
94
|
|
95 cd to the libpng directory, rename or move the zlib directory to ..\zlib
|
|
96 and type 'nmake -f scripts\makefile.w32'.
|
314
|
97
|
373
|
98 3. If you want TIFF support, grap the latest version of libtiff (tiff-v3.4
|
406
|
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
|
|
105 work.
|
373
|
106
|
|
107 4. If you want JPEG support grab the latest version of jpegsrc (jpeg-6b at
|
406
|
108 time of writing) from ftp://ftp.xemacs.org/pub/xemacs/aux/ and read the
|
|
109 README for details on how to build it.
|
373
|
110
|
406
|
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'.
|
394
|
115
|
400
|
116
|
|
117 * Building
|
|
118 ==========
|
|
119
|
406
|
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:
|
|
123
|
|
124 -- If you're building with XPM support, modify the appropriate lines in
|
|
125 config.inc as follows:
|
|
126
|
|
127 HAVE_XPM=1
|
|
128 XPM_DIR="x:\location\of\your\xpm\sources"
|
|
129
|
|
130 and similarly for JPEG and TIFF support.
|
314
|
131
|
406
|
132 -- If you're building with PNG support, modify the appropriate lines in
|
|
133 config.inc as follows:
|
|
134
|
|
135 HAVE_PNG=1
|
|
136 PNG_DIR="x:\location\of\your\png\sources"
|
|
137 ZLIB_DIR="x:\location\of\your\zlib\sources"
|
|
138
|
|
139 -- If you're building with GIF support, modify the appropriate lines in
|
|
140 config.inc as follows:
|
|
141
|
|
142 HAVE_GIF=1
|
318
|
143
|
406
|
144 -- If you're building with X-Face support, modify the appropriate lines in
|
|
145 config.inc as follows:
|
|
146
|
|
147 HAVE_XFACE=1
|
|
148 COMPFACE_DIR="x:\location\of\your\compface\sources"
|
|
149
|
|
150 -- If you're building for X, modify the appropriate lines in config.inc
|
|
151 as follows:
|
|
152
|
|
153 HAVE_X_WINDOWS=1
|
|
154 X11_DIR=x:\root\directory\of\your\X11\installation
|
373
|
155
|
406
|
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:
|
373
|
161
|
406
|
162 PACKAGE_PREFIX="x:\your\package\directory"
|
394
|
163
|
406
|
164 Make sure that the directory pointed to by PACKAGE_PREFIX contains
|
|
165 the xemacs-packages directory into which you installed the packages.
|
|
166
|
|
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:
|
400
|
170
|
406
|
171 MAKEINFO="x:\location\of\makeinfo.exe"
|
|
172
|
|
173 If you don't have a copy of makeinfo then you'll need to have installed
|
|
174 the XEmacs texinfo package.
|
|
175
|
|
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
|
|
178 directory):
|
|
179
|
|
180 INSTALL_DIR="x:\your\installation\directory"
|
314
|
181
|
406
|
182 (By default, XEmacs will be installed in directories under the directory
|
|
183 "c:\Program Files\XEmacs\XEmacs-21.2".)
|
|
184
|
|
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.
|
|
190
|
|
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".
|
|
194
|
|
195 To run from the build directory, run the file "nt\xemacs.exe" off of the
|
|
196 root of the build directory.
|
298
|
197
|
406
|
198 You may want to create a shortcut to the file from your Desktop or
|
|
199 Start Menu.
|
|
200
|
|
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...:
|
400
|
209
|
406
|
210 Under the General tab:
|
|
211
|
|
212 Build command line: NMAKE /f xemacs.mak
|
|
213 Output file name: ..\src\xemacs.exe
|
|
214 Browse info file name: ..\src\temacs.bsc
|
400
|
215
|
406
|
216 Under the Debug tab:
|
|
217
|
|
218 Executable for debug session: ..\src\xemacs.exe
|
|
219
|
|
220
|
|
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.)
|
298
|
224
|
400
|
225
|
|
226 * Debugging under MS Developer Studio
|
|
227 =====================================
|
|
228
|
|
229 The build process always creates debugging and "Source Browser" information
|
406
|
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:
|
298
|
232
|
406
|
233 1. Set DEBUG_XEMACS=1 and DEPEND=1 in config.inc and rebuild.
|
400
|
234
|
406
|
235 2. See instructions above for obtaining a workspace file for use with
|
|
236 MS Developer Studio. Build and debug your XEmacs this way.
|
400
|
237
|
406
|
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.
|
213
|
242
|
406
|
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.
|
400
|
246
|
155
|
247
|
400
|
248 * Known Problems
|
|
249 ================
|
|
250
|
406
|
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
|
|
253 assistance we can:
|
155
|
254
|
213
|
255 The XEmacs NT Mailing List: xemacs-nt@xemacs.org
|
|
256 Subscribe address: xemacs-nt-request@xemacs.org
|
155
|
257
|
213
|
258 David Hobley
|
|
259 Marc Paquette
|
|
260 August Hill
|
215
|
261 Jonathan Harris
|
406
|
262 Ben Wing
|
155
|
263
|
213
|
264 and others.
|