comparison nt/README @ 442:abe6d1db359e r21-2-36

Import from CVS: tag r21-2-36
author cvs
date Mon, 13 Aug 2007 11:35:02 +0200
parents 3ecd8885ac67
children 576fb035e263
comparison
equal deleted inserted replaced
441:72a7cfa4a488 442:abe6d1db359e
1 Building and Installing XEmacs on Windows NT 1 Building and Installing XEmacs on Windows 95/98/NT/2000 -*- mode:outline -*-
2 2
3 David Hobley 3 David Hobley
4 Marc Paquette 4 Marc Paquette
5 Jonathan Harris 5 Jonathan Harris
6 6 Ben Wing
7 The port was made much easier by the groundbreaking work of Geoff Voelker 7
8 and others who worked on the GNU Emacs port to NT. Their version is available 8 This is a port of XEmacs to Windows 95/98/NT/2000. If you are looking for a
9 from http://www.cs.washington.edu/homes/voelker/ntemacs.html 9 port of GNU Emacs, see http://www.cs.washington.edu/homes/voelker/ntemacs.html.
10 10 NT 3.51 or later is required for building on Windows NT. Note that the
11 To get it working you will need: 11 developers typically use NT 4.0 and Windows 2000, and there may possibly be
12 12 problems under Windows 95/98 and NT 3.51. If so, please report them to
13 1. You will need Visual C++ V4.0 or later to compile everything. Personally we 13 xemacs-nt@xemacs.org; we are committed to maintaining compatibility with all
14 have tested V4.0, V4.2 and V5.0. 14 systems listed.
15 Note that Visual C++ assumes a couple of environment variables INCLUDE and 15
16 LIB to be set which specify the location of the includes and libraries. 16 * Required tools and sources
17 Your PATH environment variable also needs to include the DevStudio vc\bin 17 ============================
18 and sharedide\bin directories. 18
19 Visual C++ V5.0 installs a batch file called vcvars32.bat in 19 1. You will need Visual C++ V4.0 or later to compile everything. Personally
20 we have tested V4.0, V4.2, V5.0 and v6.0.
21
22 Note that Visual C++ assumes that the environment variables INCLUDE and
23 LIB are set to specify the location of the includes and libraries.
24 Your PATH environment variable also needs to include the DevStudio
25 vc\bin and sharedide\bin directories.
26
27 Visual C++ V5.0 and later install a batch file called vcvars32.bat in
20 c:\Program Files\DevStudio\VC\bin\ (or wherever you installed it) that you 28 c:\Program Files\DevStudio\VC\bin\ (or wherever you installed it) that you
21 can run before building to set up all of these environment variables. 29 can run before building to set up all of these environment variables.
22 30 Alternatively, you can choose at setup time to have these
23 2. Grab the latest XEmacs source from ftp.xemacs.org if necessary. All Win32 31 environment variables automatically set up in the registry, which
24 support is in the nt\ subdirectory. You'll also need the xemacs-base 32 is generally a good idea.
25 package from the binary-packages subdirectory and you'll probably also 33
26 want at least the edit-utils, text-modes, fsf-compat, cc-mode, 34
27 prog-modes and xemacs-devel packages. 35 2. Grab the latest XEmacs source from
28 Unpack the packages into, say, "c:\Program Files\XEmacs\xemacs-packages". 36
29 37 ftp://ftp.xemacs.org/pub/xemacs/
30 3. At this point you can select X or Win32 native GUI support. 38
31 39 or one of its mirrors listed at http://www.xemacs.org/Download/index.html.
32 If you want to build for native GUI: 40
33 41 (NOTE: If you are behind a firewall and have problems with FTP access,
34 1. If you want XPM image and toolbar support grab the latest version of the 42 the URL http://ftp.xemacs.org/pub/xemacs/ works just as well.)
35 xpm sources (xpm-3.4k.tar.gz at time of writing) and unpack them somewhere. 43
44 You'll also need the packages. You probably want to get the unified
45 packages bundle from
46
47 ftp://ftp.xemacs.org/pub/xemacs/packages/xemacs-sumo.tar.gz
48
49 If you are building with international support, you also need
50
51 ftp://ftp.xemacs.org/pub/xemacs/packages/xemacs-mule-sumo.tar.gz
52
53 Although we don't recommend it, you can also retrieve just the packages
54 you really need if you have an extremely slow net connection or are very
55 short on disk space. You can find the various packages in
56 ftp://ftp.xemacs.org/pub/xemacs/packages/. You will need the xemacs-base
57 package (and mule-base, if building with international support). You'll
58 also need the texinfo package unless you have a copy of makeinfo.exe on
59 your machine. If you want to download additional or updated packages
60 from within XEmacs you'll need the efs, dired and vm packages. You'll
61 probably also want at least the edit-utils, text-modes, fsf-compat,
62 cc-mode, prog-modes and xemacs-devel packages.
63
64 Unpack the packages into "x:\your\choice\XEmacs\xemacs-packages",
65 for example "c:\Program Files\XEmacs\xemacs-packages".
66
67 3. At this point you can choose to build for X and/or for Win32 native GUI.
68 If you only want to build for the Win32 native GUI then skip the next
69 section.
70
71
72 ** Extra tools and sources required for X
73
74 NOTE: XEmacs has not been tested with X support under the native
75 Windows build for a long, long time! It may not even compile any
76 more. If you are interested in X support, you're better off compiling
77 the Cygwin version of XEmacs, which can handle both Win32 native and X
78 frames (in the same binary, in fact, but not at the same time), and is
79 actively tested with X support.
80
81 If you want support for X you will also need:
82
83 1. An X server. XEmacs has been tested and runs well under MI/X,
84 available from: http://www.microimages.com/mix/. (International aka
85 "Mule" support even works under this X server!) Unfortunately, this is
86 not free, but is trialware; you have to pay $25 if you want to use it
87 for more than 15 days. XEmacs also runs (barely) under the free XWin
88 server that comes as part of the Cygwin XFree86 package, available at
89
90 ftp://sources.redhat.com/pub/cygwin/xfree/
91
92 or numerous mirrors, such as
93
94 ftp://ftp.freesoftware.com/pub/sourceware/cygwin/xfree/
95
96 There are numerous other X servers available in the same package or at
97 the same location, but unfortunately most of them behave even worse
98 than XWin. If you have any luck with any of these, *PLEASE* email
99 the maintainers at xemacs-nt@xemacs.org, and we'll add the info here.
100
101 2. Source for the MIT X11R6.3 libraries, available from ftp.x.org.
102
103 3. You'll need to compile the MIT libraries without multi-thread support.
104 To do this, there is an example Win32.cf and site.def provided which set
105 the relevant flags. You will also need to apply the patch in nt/X11.patch
106 in the xc/lib/X11 directory which will fix the DLL definition file.
107
108 Once compiled and installed, you will need to apply the patch in
109 nt/Xmd.patch. This is messy and better solutions would be appreciated.
110
111 4. Goto step 2 under 'Optional libraries' below.
112
113
114 * Optional libraries
115 ====================
116
117 1. You really want the XPM library. Grab the latest version of the
118 xpm sources (xpm-3.4k.tar.gz at time of writing) from
119 ftp://ftp.xemacs.org/pub/xemacs/aux/ and unpack them somewhere.
36 Copy nt\xpm.mak from the xemacs sources to the lib subdirectory of the 120 Copy nt\xpm.mak from the xemacs sources to the lib subdirectory of the
37 xpm sources, cd to that directory and build xpm with 'nmake -f xpm.mak'. 121 xpm sources, cd to that directory and build xpm with 'nmake -f xpm.mak'.
38 122
39 2. You probably also want PNG image support. Grab the latest versions of zlib 123 2. You probably also want PNG image support. Grab the latest versions of zlib
40 and libpng (zlib-1.1.3 and libpng-1.0.2 at time of writing), unpack them 124 and libpng (zlib-1.1.3 and libpng-1.0.2 at time of writing) from
41 somewhere and read the respective READMEs for details on how to build them. 125 ftp://ftp.xemacs.org/pub/xemacs/aux/, unpack them somewhere and read
42 The following build procedure works for zlib-1.1.3 and libpng-1.0.2: 126 the respective READMEs for details on how to build them. The following
127 build procedure works for zlib-1.1.3 and libpng-1.0.2:
43 128
44 cd to the zlib directory, type 'copy msdos\makefile.w32 Makefile' and 129 cd to the zlib directory, type 'copy msdos\makefile.w32 Makefile' and
45 then type 'nmake'. 130 then type 'nmake'.
46 131
47 cd to the libpng directory, rename or move the zlib directory to ..\zlib 132 cd to the libpng directory, rename or move the zlib directory to ..\zlib
48 and type 'nmake -f scripts\makefile.w32'. 133 and type 'nmake -f scripts\makefile.w32'.
49 134
50 3. If you want TIFF support, grap the latest version of libtiff (tiff-v3.4 135 3. If you want TIFF support, grap the latest version of libtiff (tiff-v3.4
51 at time of writing) and unpack it somewhere. Copy nt\tiff.mak from the 136 at time of writing) from ftp://ftp.xemacs.org/pub/xemacs/aux/ and unpack
52 xemacs sources to the contrib\winnt subdirectory of the tiff sources, 137 it somewhere. Copy nt\tiff.mak from the xemacs sources to the
53 cd to that directory and build libtiff with 'nmake -f tiff.mak'. Note: 138 contrib\winnt subdirectory of the tiff sources, cd to that directory and
54 tiff.mak has only been verified to work under WinNT, not Win95 or 98. 139 build libtiff with 'nmake -f tiff.mak'. Note: tiff.mak has only been
55 However, the lastest distribution of libtiff includes a 140 verified to work under WinNT, not Win95 or 98. However, the lastest
56 contrib\win95\makefile.w95; that might work. 141 distribution of libtiff includes a contrib\win95\makefile.w95; that might
142 work.
57 143
58 4. If you want JPEG support grab the latest version of jpegsrc (jpeg-6b at 144 4. If you want JPEG support grab the latest version of jpegsrc (jpeg-6b at
59 time of writing) and read the README for details on how to build it. 145 time of writing) from ftp://ftp.xemacs.org/pub/xemacs/aux/ and read the
60 146 README for details on how to build it.
61 5. If you want X-Face support, grab compface distribution and unpack it 147
62 somewhere. Copy nt\compface.mak from xemacs sources to the compface 148 5. If you want X-Face support, grab the compface distribution from
63 directory. cd to that directory and build libcompface with 149 ftp://ftp.xemacs.org/pub/xemacs/aux/ and unpack it somewhere.
64 'nmake -f compface.mak'. 150 Copy nt\compface.mak from xemacs sources to the compface directory.
65 151 cd to that directory and build libcompface with 'nmake -f compface.mak'.
66 6. cd to the nt subdirectory of the xemacs distribution and build xemacs: 152
67 `nmake install -f xemacs.mak`, but read on before hitting Enter. 153
68 154 * Building
69 7. If you're building with XPM support, add this to the nmake command line: 155 ==========
70 HAVE_XPM=1 XPM_DIR="x:\location\of\your\xpm\sources" 156
71 and similarly for JPEG and TIFF support. 157 1. cd to the nt subdirectory of the xemacs distribution and copy the file
72 158 config.inc.samp to config.inc. Make any necessary modifications. This
73 If you're building with PNG support, add this to the nmake command line: 159 file controls the options that XEmacs is built with:
74 HAVE_PNG=1 PNG_DIR="x:\location\of\your\png\sources" 160
75 ZLIB_DIR="x:\location\of\your\zlib\sources" 161 -- If you want international (aka "Mule") support, modify the appropriate
76 162 line in config.inc as follows:
77 If you want to build with GIF support, add this to the nmake command line: 163
78 HAVE_GIF=1 164 HAVE_MULE=1
79 165
80 If you're building with X-Face support, add this to the nmake command line: 166 NOTE: This support is still quite raw under the Win32 native GUI,
81 HAVE_XFACE=1 COMPFACE_DIR="x:\location\of\your\compface\sources" 167 but works well if you compile the Cygwin version with X support
82 168 and disable native Win32 support (--with-msw=no).
83 8. By default, XEmacs will expect to find its packages in the subdirectories 169
84 "site-packages", "mule-packages" and "xemacs-packages" under the package 170 -- If you're building with XPM support, modify the appropriate lines in
85 prefix directory "c:\Program Files\XEmacs". If you want it to look for 171 config.inc as follows:
86 these subdirectories elsewhere, add this to the nmake command line: 172
87 PACKAGE_PREFIX="x:\your\package\directory" 173 HAVE_XPM=1
88 If you change your mind and want to alter the package prefix directory 174 XPM_DIR="x:\location\of\your\xpm\sources"
89 after you've built XEmacs, delete the file .\obj\emacs.obj and rebuild with 175
90 the new PACKAGE_PREFIX. 176 and similarly for JPEG and TIFF support.
91 177
92 9. By default, XEmacs will be installed in directories under the directory 178 -- If you're building with PNG support, modify the appropriate lines in
93 "c:\Program Files\XEmacs\XEmacs-21.0". If you want to install it elsewhere, 179 config.inc as follows:
94 add this to the nmake command line: 180
95 INSTALL_DIR="x:\your\installation\directory" 181 HAVE_PNG=1
96 182 PNG_DIR="x:\location\of\your\png\sources"
97 10. Now you can press Enter. nmake will build temacs, the DOC file, update the 183 ZLIB_DIR="x:\location\of\your\zlib\sources"
98 elc's, dump xemacs and install the relevant files in the directories under 184
99 the installation directory. Unless you set INSTALL_DIR above, the file that 185 -- If you're building with GIF support, modify the appropriate lines in
100 you should run to start XEmacs will be installed as 186 config.inc as follows:
101 "c:\Program Files\XEmacs\XEmacs-21.0\i386-pc-win32\runemacs.exe". You may 187
102 want to create a shortcut to that file from your Desktop or Start Menu. 188 HAVE_GIF=1
103 189
104 11. The build process always creates debugging and "Source Browser" information 190 -- If you're building with X-Face support, modify the appropriate lines in
105 in the source tree for use with MS DevStudio. If you actually want to debug 191 config.inc as follows:
106 XEmacs you should run XEmacs from the source directory instead of from the 192
107 installation directory. You should probably also build a debug version of 193 HAVE_XFACE=1
108 XEmacs; to do this start with a clean source tree and add DEBUG_XEMACS=1 to 194 COMPFACE_DIR="x:\location\of\your\compface\sources"
109 the nmake command line. You probably don't want to install your debug build 195
110 so you should tell nmake to build the 'all' target instead of the 'install' 196 -- If you're building for X, modify the appropriate lines in config.inc
111 target. 197 as follows:
112 198
113 To make use of the debugging and "Source Browser" information, create a new 199 HAVE_X_WINDOWS=1
114 "console" project in MS DevStudio and, under Project/Settings, set: 200 X11_DIR=x:\root\directory\of\your\X11\installation
115 Debug: executable name = full path of src\xemacs.exe 201
116 Link: output file name = full path of src\temacs.exe 202 -- By default, XEmacs will expect to find its packages in the
117 Browse Info: browse info file name = full path of src\temacs.bsc 203 subdirectories "site-packages", "mule-packages" and "xemacs-packages"
118 Remember to close the Source Browser file in DevStudio before rebuilding. 204 under the directory "c:\Program Files\XEmacs". If you want it to look
119 205 for these subdirectories elsewhere, modify the appropriate lines in
120 206 config.inc as follows:
121 If you want support for X you will need: 207
122 208 PACKAGE_PREFIX="x:\your\package\directory"
123 1. An X server. MI/X is available on the Internet for free; It is 209
124 available from: http://www.microimages.com/www/html/freestuf/mixdlfrm.htm 210 Make sure that the directory pointed to by PACKAGE_PREFIX contains
125 211 the xemacs-packages directory into which you installed the packages.
126 2. The MIT X11R6.3 libraries available from: ftp.x.org 212
127 213 -- XEmacs can build its info files more quickly if you have a copy of the
128 3. You'll need to compile the MIT libraries without multi-thread support. 214 makeinfo program. If you have a copy, modify the appropriate lines in
129 To do this, there is an example Win32.cf and site.def provided which 215 config.inc as follows:
130 set the relevant flags. You will also need to apply the patch in 216
131 nt/X11.patch in the xc/lib/X11 directory which will fix the DLL definition 217 MAKEINFO="x:\location\of\makeinfo.exe"
132 file. Once compiled and installed, you will need to apply the following 218
133 patch to Xmd.h. This is messy and better solutions would be appreciated. 219 If you don't have a copy of makeinfo then you'll need to have installed
134 220 the XEmacs texinfo package.
135 4. Goto 2 under 'native GUI' above and add this to the nmake command line: 221
136 HAVE_X=1 X11_DIR=x:\root\directory\of\your\X11\installation 222 2. If you want to install XEmacs when you build it, modify the appropriate
137 223 lines in config.inc as follows (you can also run XEmacs from its build
138 --- Xmd.h~ Thu Jun 08 23:20:40 1995 224 directory):
139 +++ Xmd.h Sun Mar 16 13:09:10 1997 225
140 @@ -150,8 +150,9 @@ 226 INSTALL_DIR="x:\your\installation\directory"
141 typedef CARD16 BITS16; 227
142 typedef CARD8 BYTE; 228 (By default, XEmacs will be installed in directories under the directory
143 229 "c:\Program Files\XEmacs\XEmacs-21.2".)
144 +#ifndef WIN32 230
145 typedef CARD8 BOOL; 231 3. If you want to build xemacs on the command line, use
146 - 232 `nmake install -f xemacs.mak', or just `nmake -f xemacs.mak' if you want
147 +#endif 233 to run XEmacs from its build directory. nmake will build temacs, the DOC
148 234 file, update the elc's, dump xemacs and (optionally) install the relevant
149 Known Problems: 235 files in the directories under the installation directory.
150 Please look at the TODO list for the current list of problems and people 236
151 working on them. 237 If you chose to install XEmacs, the file that you should run to start
152 238 XEmacs will be installed (by default) as
153 Any other problems you need clarified, please email us and we will endeavour 239 "c:\Program Files\XEmacs\XEmacs-21.2\i586-pc-win32\xemacs.exe".
154 to provide any assistance we can: 240
241 To run from the build directory, run the file "nt\xemacs.exe" off of the
242 root of the build directory.
243
244 You may want to create a shortcut to the file from your Desktop or
245 Start Menu.
246
247 4. To build using MS Developer Studio, you can use the workspace file
248 `nt/xemacs.dsw'. This was prepared for Visual C++ 6.0. If you are using
249 Visual C++ 5.0, you can use the workspace file `nt/xemacs-vc50.dsw'. If
250 you have a different version and neither file works, just open up
251 `nt/xemacs.mak' from within MS Developer Studio and it will offer to wrap
252 this Makefile in a workspace file, from which you can build. Assuming
253 you want to run from the build directory (which you will want to do if
254 you are planning on doing any development work on XEmacs), use the
255 following settings in Project/Settings...:
256
257 Under the General tab:
258
259 Build command line: NMAKE /f xemacs.mak
260 Output file name: ..\src\xemacs.exe
261 Browse info file name: ..\src\temacs.bsc
262
263 Under the Debug tab:
264
265 Executable for debug session: ..\src\xemacs.exe
266
267
268 If you want to install XEmacs when it's built, change the build command
269 line to "NMAKE install /f xemacs.mak". (You will have to make the same
270 change even if you use the provided workspace nt/xemacs.dsw.)
271
272
273 * Debugging under MS Developer Studio
274 =====================================
275
276 The build process always creates debugging and "Source Browser" information
277 in the source tree for use with DevStudio. However that information is not
278 very useful unless you build a debug version of XEmacs:
279
280 1. Set DEBUG_XEMACS=1 and DEPEND=1 in config.inc and rebuild.
281
282 2. See instructions above for obtaining a workspace file for use with
283 MS Developer Studio. Build and debug your XEmacs this way.
284
285 3. To display the contents of a lisp variable, type Shift-F9 (or use the
286 menu) to bring up the QuickWatch window, type debug_print(variable) and
287 click Recalculate. The output will appear in a console window, as well
288 as in the Debug window in MS Developer Studio.
289
290 4. To view Lisp variables in the "Watch" window wrap the variable in one of
291 the helper functions from the file src\console-msw.c, for example type
292 DSTRING(variable) in the "Watch" window to inspect a Lisp string.
293
294
295 * Known Problems
296 ================
297
298 Please look at the PROBLEMS file for known problems. Any other problems you
299 need clarified, please email us and we will endeavour to provide any
300 assistance we can:
155 301
156 The XEmacs NT Mailing List: xemacs-nt@xemacs.org 302 The XEmacs NT Mailing List: xemacs-nt@xemacs.org
157 Subscribe address: xemacs-nt-request@xemacs.org 303 Subscribe address: xemacs-nt-request@xemacs.org
158 304
159 David Hobley 305 Ben Wing (current primary MS Windows maintainer; author of the MS Windows
160 Marc Paquette 306 Mule code and some of the dialog box code)
161 August Hill 307 Andy Piper (MS Windows contributor; author of the Cygwin support and the
162 Jonathan Harris 308 MS Windows glyph and widget code)
309 Jonathan Harris (MS Windows contributor; author of the MS Windows redisplay
310 and underlying GUI code)
311 Kirill Katsnelson (MS Windows contributor; author of the MS Windows process
312 and printing code and some of the dialog box code;
313 general guru on obscure MS Windows programming topics)
314 David Hobley (early MS Windows contributor)
315 Marc Paquette (early MS Windows contributor)
316 August Hill (early MS Windows contributor)
163 317
164 and others. 318 and others.