comparison nt/README @ 2951:b694dfd2f40e

[xemacs-hg @ 2005-09-26 08:13:00 by ben] Compile Windows with gmp, ldap, postgresql, db, etc. README: Major rewrite. Document how to compile various optional libs. config.inc.samp: Update to recent versions of optional libs. Add support for gmp, db, postgresql, ldap. Turn on optimization when not debug. minitar.c: Include config.h. xemacs.mak: Figure out VC++ version and use it to set debug and browser flags appropriately. Add support for building gmp, db, postgresql, ldap. Rewrite handling of optional stuff so it is all added to single variables OPT_* rather than to various FOO_* variables. Pass -I$(SRC) to minitar.c so it compiles. Pass module sources, not objects, to make-docfile. Delete more stuff in `make clean'.
author ben
date Mon, 26 Sep 2005 08:13:00 +0000
parents 3227a97effa8
children 1cecc3e9f0a0
comparison
equal deleted inserted replaced
2950:6faeb73983bb 2951:b694dfd2f40e
1 Building and Installing XEmacs on Windows 95/98/NT/2000/XP -*- mode:outline -*- 1 Building and Installing XEmacs on Windows 95/98/NT/2000/XP -*- mode:outline -*-
2 2
3 Ben Wing
4
5 based on old version by
6
3 David Hobley 7 David Hobley
4 Marc Paquette 8 Marc Paquette
5 Jonathan Harris 9 Jonathan Harris
6 Ben Wing 10
7 11 This is a port of XEmacs to Windows 95/98/ME/NT/2000/XP. If you are
8 This is a port of XEmacs to Windows 95/98/NT/2000/XP. If you are looking for a 12 looking for a port of GNU Emacs, get the latest release of the 21.x series
9 port of GNU Emacs, get the latest release of the 21.x series from gnu.org. 13 from gnu.org. NT 4.0 or later is required for building on Windows NT.
10 (At the time of writing, GNU Emacs does not support images but does support 14 Note that the developers typically use NT 4.0 and Windows 2000 or XP, and
11 Mule.) NT 4.0 or later is required for building on Windows NT. Note that the 15 there may possibly be problems under Windows 95/98. (One developer has
12 developers typically use NT 4.0 and Windows 2000, and there may possibly be 16 successfully built on Windows ME, though, which is the successor of Windows
13 problems under Windows 95/98. If so, please report them to 17 98.) If so, please report them to xemacs-nt@xemacs.org; we are committed
14 xemacs-nt@xemacs.org; we are committed to maintaining compatibility with all 18 to maintaining compatibility with all systems listed.
15 systems listed.
16 19
17 * Required tools and sources 20 * Required tools and sources
18 ============================ 21 ============================
19 22
20 1. You will need Visual C++ V6.0, Visual Studio .NET or later to compile 23 1. You will need Visual C++ V6.0, Visual Studio .NET or later to compile
36 $Installdir\Common7\Tools, but doesn't offer at install time to 39 $Installdir\Common7\Tools, but doesn't offer at install time to
37 automatically set these environment variables up in the registry. 40 automatically set these environment variables up in the registry.
38 41
39 2. Grab the latest XEmacs source from 42 2. Grab the latest XEmacs source from
40 43
41 ftp://ftp.xemacs.org/pub/xemacs/ 44 http://ftp.xemacs.org/pub/xemacs/
42 45
43 or one of its mirrors listed at http://www.xemacs.org/Download/index.html. 46 or one of its mirrors listed at http://www.xemacs.org/Download/index.html.
44 47
45 (NOTE: If you are behind a firewall and have problems with FTP access, 48 (NOTE: If you are behind a firewall and have problems with FTP access,
46 the URL http://ftp.xemacs.org/pub/xemacs/ works just as well.) 49 the URL http://ftp.xemacs.org/pub/xemacs/ works just as well.)
47 50
48 You'll also need the packages. You probably want to get the unified 51 You'll also need the packages. You probably want to get the unified
49 packages bundle from 52 packages bundle from
50 53
51 ftp://ftp.xemacs.org/pub/xemacs/packages/xemacs-sumo.tar.gz 54 http://ftp.xemacs.org/pub/xemacs/packages/xemacs-sumo.tar.gz
52 55
53 If you are building with international support, you also need 56 If you are building with international support, you also need
54 57
55 ftp://ftp.xemacs.org/pub/xemacs/packages/xemacs-mule-sumo.tar.gz 58 http://ftp.xemacs.org/pub/xemacs/packages/xemacs-mule-sumo.tar.gz
56 59
57 Although we don't recommend it, you can also retrieve just the packages 60 Although we don't recommend it, you can also retrieve just the packages
58 you really need if you have an extremely slow net connection or are very 61 you really need if you have an extremely slow net connection or are very
59 short on disk space. You can find the various packages in 62 short on disk space. You can find the various packages in
60 ftp://ftp.xemacs.org/pub/xemacs/packages/. You will need the xemacs-base 63 http://ftp.xemacs.org/pub/xemacs/packages/. You will need the xemacs-base
61 package (and mule-base, if building with international support). You'll 64 package (and mule-base, if building with international support). You'll
62 also need the texinfo package unless you have a copy of makeinfo.exe on 65 also need the texinfo package unless you have a copy of makeinfo.exe on
63 your machine. If you want to download additional or updated packages 66 your machine. If you want to download additional or updated packages
64 from within XEmacs you'll need the efs, dired and vm packages. You'll 67 from within XEmacs you'll need the efs, dired and vm packages. You'll
65 probably also want at least the edit-utils, text-modes, fsf-compat, 68 probably also want at least the edit-utils, text-modes, fsf-compat,
74 77
75 78
76 * Optional libraries 79 * Optional libraries
77 ==================== 80 ====================
78 81
79 1. You really want the XPM library. Grab the latest version of the xpm 82 The easiest way to get the optional libraries is to grab the appropriate
80 sources (xpm-3.4k.tar.gz as of 2003-10-27) from 83 set of precompiled versions for your compiler:
81 ftp://ftp.xemacs.org/pub/xemacs/aux/ and unpack them somewhere. Copy 84
82 nt\xpm.mak from the xemacs sources to the lib subdirectory of the xpm 85 http://www.xemacs.org/Download/win32/optional-libs.exe
83 sources, cd to that directory and build xpm with 'nmake -f xpm.mak'. 86
84 87 or for VC++ 2005 (VC8)
85 2. You probably also want PNG image support. Grab the latest versions of 88
86 zlib and libpng (zlib-1.1.4 and libpng-1.2.5 as of 2003-10-27) from 89 http://www.xemacs.org/Download/win32/optional-libs-vc8.exe
87 ftp://ftp.xemacs.org/pub/xemacs/aux/, unpack them somewhere and read the 90
88 respective READMEs for details on how to build them. The following 91 unpack them somewhere and set the OPTIONAL_LIBRARY_DIR in config.inc
89 build procedure works for zlib-1.1.4 and libpng-1.2.5: 92 to point to where you put them. This will automatically give you
90 93 all the graphics libraries. (NOTE: optional-libs.exe was compiled with
91 cd to the zlib directory and type 'nmake -f nt\Makefile.nt'. 94 VC++ .NET and may or may not work with VC++ 6.0. If not, you will have
92 95 to build them yourself until we provide VC6 binaries.)
93 cd to the libpng directory, rename or move the zlib directory to ..\zlib 96
94 and type 'nmake -f scripts\makefile.vcwin32'. 97 * Alternative: Building the optional libraries yourself
95 98 =======================================================
96 3. If you want TIFF support, grab the latest version of libtiff (tiff-v3.5.7 99
97 as of 2003-10-27) from ftp://ftp.xemacs.org/pub/xemacs/aux/ and unpack 100 If you need to build the libraries yourself, grab them from
98 it somewhere. Then cd to the libtiff subdirectory of the tiff directory 101 http://ftp.xemacs.org/pub/xemacs/aux or get the latest version from the
99 and type 'nmake -f makefile.vc'. 102 home page of the appropriate library, as listed on
100 103 http://www.xemacs.org/Download/optLibs.html. The following instructions
101 4. If you want JPEG support grab the latest version of jpegsrc (jpeg-6b as 104 assume that you have the appropriate libraries and have unpacked them
102 of 2003-10-27) from ftp://ftp.xemacs.org/pub/xemacs/aux/ and read the 105 somewhere, e.g. c:\src.
103 README for details on how to build it. 106
104 107 Directions for building the various libraries:
105 5. If you want X-Face support, grab the latest version of the compface 108
106 distribution (1.4 as of 2003-10-27) from 109 1. You really want the XPM library. Copy nt\xpm.mak from the xemacs sources
107 ftp://ftp.xemacs.org/pub/xemacs/aux/ and unpack it somewhere. 110 to the lib/ subdirectory of the XPM sources, cd to that directory and
108 Copy nt\compface.mak from the xemacs sources to the compface directory. 111 build xpm with 'nmake -f xpm.mak'.
109 cd to that directory and build libcompface with 'nmake -f compface.mak'. 112
113 2. You probably also want PNG image support. Get PNG and ZLIB and read the
114 respective READMEs for details on how to build them.
115
116 cd to the ZLIB source directory and type 'nmake -f win32\Makefile.msc'.
117
118 cd to the libpng source directory, rename or move the zlib directory to
119 ..\zlib and type 'nmake -f scripts\makefile.vcawin32'.
120
121 3. If you want TIFF support, cd to the TIFF source directory and type
122 'nmake -f Makefile.vc'.
123
124 4. If you want JPEG support, cd to the JPEG source directory and type
125 'nmake -f makefile.vc'.
126
127 5. If you want X-Face support, copy nt\compface.mak from the xemacs sources
128 to the compface directory, cd to that directory and build libcompface
129 with 'nmake -f compface.mak'.
130
131 6. It's also possible to build the Sleepycat DB libraries. Open up the file
132
133 DB-SOURCE-DIR\docs\ref\build_win\intro.html
134
135 in a browser, where DB-SOURCE-DIR is the top-level source directory for
136 the Sleepcat DB libraries, and follow the directions. You should build the
137 `Release_static' target if you want to use the static version of this
138 library, or the `Release' target if you want to use the DLL version of
139 the library. To use the DLL version, you need to set BUILD_DATABASE_SHARED
140 to 1 in config.inc. The DLL version will make the executable much smaller,
141 but you will have to have the DLL present at run-time -- either in the
142 same directory as the XEmacs executable or somewhere in your path.
143
144 7. It's possible, but difficult, to build shared libraries for GNU MP.
145 (Static libraries are not yet possible, as there is no makefile.vc for
146 this; you can't build static libraries for VC++ using MinGW.) Basically,
147 you need to build using MinGW and then generate native import libraries.
148 This is more or less described in the documentation, but the following
149 procedure seems to work:
150
151 -- In the top level of the GMP sources, configure using
152
153 CC='gcc -mno-cygwin' configure --build=pentium3-pc-mingw32 --disable-static --enable-shared
154
155 -- Edit the `libtool' script in the same directory and change the value
156 of CC from `gcc' to `gcc -mno-cygwin'.
157
158 -- Run `make'.
159
160 -- Run these commands:
161
162 lib /machine:IX86 /def:.libs/libgmp-3.dll-def
163 cp .libs/libgmp-3.dll-exp libgmp-3.exp
164 cp .libs/libgmp-3.dll .
165
166 -- You should now have an import library named libgmp-3.lib and a DLL
167 libgmp-3.dll.
168
169 -- NOTE: You will need to have this DLL accessible when XEmacs runs.
170 It either needs to be in the same directory as the XEmacs executable
171 or in your path.
172
173 8. There are also pre-built binaries for GMP-4.1.2 at
174
175 http://www.cs.nyu.edu/exact/core/gmp/.
176
177 However, they don't seem to work properly for our purposes, as they
178 require LIBC.LIB rather than MSVCRT.DLL.
179
180 9. You can build the client library for PostgreSQL by cd'ing to the src/
181 subdirectory of the PostgreSQL sources and running `nmake -f win32.mak'.
182
183 10. It does not appear to be very easy to build OpenLDAP under
184 native MS Windows, as it is only experimentally supported. However, there
185 is a mailing list for this, which contains postings of recent binaries and
186 build patches; see
187
188 http://lucas.bergmans.us/hacks/openldap/
189
190 If you know how to build OpenLDAP, please write up a description of the
191 process and send it to us at xemacs-beta@xemacs.org.
110 192
111 193
112 * Building 194 * Building
113 ========== 195 ==========
114 196
119 -- If you want international (aka "Mule") support, modify the appropriate 201 -- If you want international (aka "Mule") support, modify the appropriate
120 line in config.inc as follows: 202 line in config.inc as follows:
121 203
122 MULE=1 204 MULE=1
123 205
124 -- If you're building with XPM support, modify the appropriate lines in 206 -- If you're using the pre-supplied optional library pack, all you should
207 have to do is set OPTIONAL_LIBRARY_DIR to the top-level directory
208 where you unpacked everything.
209
210 -- By default, support is enabled for all graphics formats, but not
211 currently for any of the other libraries in the optional library
212 pack. If you want support for GMP, Berkeley DB or PostgreSQL, set
213 the appropriate flag (HAVE_BIGNUM, HAVE_DATABASE or HAVE_POSTGRESQL,
214 respectively) to 1. We do not currently enable these by default
215 because of lack of sufficient testing, questionable usefulness in
216 the case of Berkeley DB and PostgreSQL, excessive library size in
217 the case of Berkeley DB (more than 2 MB for the static library!),
218 and lack of a static library in the case of GMP.
219
220 -- If you want to turn off support for any of the graphics libraries,
221 set the appropriate flag (HAVE_XPM, HAVE_GIF, HAVE_PNG, HAVE_JPEG,
222 HAVE_TIFF or HAVE_XFACE) to 0.
223
224 -- If you have compiled some of the libraries yourself, you will have to
225 specify the location of the top-level source directory for each of
226 these libraries. XEmacs assumes that the directory structure under
227 these directories is as it is in the sources, rather than in any
228 installed format.
229
230 For example, for XPM support, modify the appropriate lines in
125 config.inc as follows: 231 config.inc as follows:
126 232
127 HAVE_XPM=1 233 HAVE_XPM=1
128 XPM_DIR="x:\location\of\your\xpm\sources" 234 XPM_DIR="x:\location\of\your\xpm\sources"
129 235
130 and similarly for JPEG and TIFF support. 236 Similarly for JPEG, TIFF, etc. support.
131 237
132 -- If you're building with PNG support, modify the appropriate lines in 238 For PNG support, you also need to specify ZLIB_DIR.
133 config.inc as follows: 239 For GIF support, no directory is necessary as the appropriate code
134 240 is already in XEmacs.
135 HAVE_PNG=1 241
136 PNG_DIR="x:\location\of\your\png\sources" 242 If you want to use the DLL version of the Sleepycat DB library,
137 ZLIB_DIR="x:\location\of\your\zlib\sources" 243 set BUILD_DATABASE_SHARED to 1. You will have to have the DLL
138 244 present at run-time -- either in the same directory as the XEmacs
139 -- If you're building with GIF support, modify the appropriate lines in 245 executable or somewhere in your path.
140 config.inc as follows:
141
142 HAVE_GIF=1
143
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 246
150 -- By default, XEmacs will expect to find its packages in the 247 -- By default, XEmacs will expect to find its packages in the
151 subdirectories "site-packages", "mule-packages" and "xemacs-packages" 248 subdirectories "site-packages", "mule-packages" and "xemacs-packages"
152 under the directory "c:\Program Files\XEmacs". If you want it to look 249 under the directory "c:\Program Files\XEmacs". If you want it to look
153 for these subdirectories elsewhere, modify the appropriate lines in 250 for these subdirectories elsewhere, modify the appropriate lines in
199 296
200 You may want to create a shortcut to the file from your Desktop or 297 You may want to create a shortcut to the file from your Desktop or
201 Start Menu. 298 Start Menu.
202 299
203 5. To build using MS Visual Studio, you can use the workspace file 300 5. To build using MS Visual Studio, you can use the workspace file
204 `nt/xemacs.dsw'. This was prepared for Visual C++ 6.0. If you have a 301 `nt/xemacs.dsw'. This was prepared for Visual C++ 6.0. If you are using
205 different version and neither file works, just open up `nt/xemacs.mak' 302 Visual Studio .NET, open this file up inside of it and it will offer to
206 from within Visual Studio and it will offer to wrap this Makefile in a 303 convert it to a .NET "solution" file. The same procedure should work
207 workspace file, from which you can build. Assuming you want to run from 304 for newer versions of Visual Studio (e.g. Visual Studio 2005). If this
208 the build directory (which you will want to do if you are planning on 305 doesn't work (e.g. you are using Visual C++ 5 or even earlier), just
209 doing any development work on XEmacs), use the following settings in 306 open up `nt/xemacs.mak' from within Visual Studio and it will offer to
307 wrap this Makefile in a workspace file, from which you can build.
308 Assuming you want to run from the build directory (which you will want
309 to do if you are planning on doing any development work on XEmacs), use
310 the following settings (for Visual C++ 6.0, at least) in
210 Project/Settings...: 311 Project/Settings...:
211 312
212 Under the General tab: 313 Under the General tab:
213 314
214 Build command line: NMAKE /f xemacs.mak 315 Build command line: NMAKE /f xemacs.mak
265 366
266 Ben Wing (current primary MS Windows maintainer; author of the MS Windows 367 Ben Wing (current primary MS Windows maintainer; author of the MS Windows
267 Mule code and some of the dialog box code) 368 Mule code and some of the dialog box code)
268 Andy Piper (MS Windows contributor; author of the Cygwin support and the 369 Andy Piper (MS Windows contributor; author of the Cygwin support and the
269 MS Windows glyph and widget code) 370 MS Windows glyph and widget code)
270 Jonathan Harris (MS Windows contributor; author of the MS Windows redisplay 371 Jonathan Harris (MS Windows contributor; original author of the MS Windows
271 and underlying GUI code) 372 redisplay and underlying GUI code)
272 Kirill Katsnelson (MS Windows contributor; author of the MS Windows process 373 Kirill Katsnelson (MS Windows contributor; author of the MS Windows process
273 and printing code and some of the dialog box code; 374 and printing code and some of the dialog box code;
274 general guru on obscure MS Windows programming topics) 375 general guru on obscure MS Windows programming topics)
275 David Hobley (early MS Windows contributor) 376 David Hobley (early MS Windows contributor)
276 Marc Paquette (early MS Windows contributor) 377 Marc Paquette (early MS Windows contributor)