Mercurial > hg > xemacs-beta
annotate nt/README @ 5892:053ef01b71a8
Import the #'clear-string API from GNU, use it in tls.c
src/ChangeLog addition:
2015-04-18 Aidan Kehoe <kehoea@parhasard.net>
* sequence.c (Fclear_string): New, API from GNU. Zero a string's
contents, making sure the text is not kept around even when the
string's data is reallocated because of a changed character
length.
* sequence.c (syms_of_sequence): Make it available to Lisp.
* lisp.h: Make it available to C code.
* tls.c (nss_pk11_password): Use it.
* tls.c (gnutls_pk11_password): Use it.
* tls.c (openssl_password): Use it.
tests/ChangeLog addition:
2015-04-18 Aidan Kehoe <kehoea@parhasard.net>
* automated/lisp-tests.el:
Test #'clear-string, just added. Unfortunately there's no way to
be certain from Lisp that the old password data has been erased
after realloc; it may be worth adding a test to tests.c, but
*we'll be reading memory we shouldn't be*, so that gives me pause.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 18 Apr 2015 23:00:14 +0100 |
parents | 98681721a588 |
children | b58b74274fa2 |
rev | line source |
---|---|
900 | 1 Building and Installing XEmacs on Windows 95/98/NT/2000/XP -*- mode:outline -*- |
428 | 2 |
2951 | 3 Ben Wing |
4 | |
5 based on old version by | |
6 | |
428 | 7 David Hobley |
442 | 8 Marc Paquette |
9 Jonathan Harris | |
428 | 10 |
2951 | 11 This is a port of XEmacs to Windows 95/98/ME/NT/2000/XP. If you are |
12 looking for a port of GNU Emacs, get the latest release of the 21.x series | |
13 from gnu.org. NT 4.0 or later is required for building on Windows NT. | |
14 Note that the developers typically use NT 4.0 and Windows 2000 or XP, and | |
15 there may possibly be problems under Windows 95/98. (One developer has | |
16 successfully built on Windows ME, though, which is the successor of Windows | |
17 98.) If so, please report them to xemacs-nt@xemacs.org; we are committed | |
18 to maintaining compatibility with all systems listed. | |
428 | 19 |
442 | 20 * Required tools and sources |
21 ============================ | |
22 | |
900 | 23 1. You will need Visual C++ V6.0, Visual Studio .NET or later to compile |
24 everything. | |
428 | 25 |
442 | 26 Note that Visual C++ assumes that the environment variables INCLUDE and |
27 LIB are set to specify the location of the includes and libraries. | |
827 | 28 Your PATH environment variable also needs to include the Visual Studio |
442 | 29 vc\bin and sharedide\bin directories. |
30 | |
900 | 31 Visual C++ V6.0 installs a batch file called vcvars32.bat in |
812 | 32 c:\Program Files\Microsoft Visual Studio\VC98\bin\ (or wherever you |
33 installed it) that you can run before building to set up all of these | |
34 environment variables. Alternatively, you can choose at setup time to | |
35 have these environment variables automatically set up in the registry, | |
36 which is generally a good idea. | |
428 | 37 |
900 | 38 Visual Studio .NET calls this batch file vsvars32.bat and installs it in |
39 $Installdir\Common7\Tools, but doesn't offer at install time to | |
40 automatically set these environment variables up in the registry. | |
442 | 41 |
42 2. Grab the latest XEmacs source from | |
43 | |
2951 | 44 http://ftp.xemacs.org/pub/xemacs/ |
442 | 45 |
46 or one of its mirrors listed at http://www.xemacs.org/Download/index.html. | |
47 | |
48 (NOTE: If you are behind a firewall and have problems with FTP access, | |
49 the URL http://ftp.xemacs.org/pub/xemacs/ works just as well.) | |
50 | |
51 You'll also need the packages. You probably want to get the unified | |
52 packages bundle from | |
53 | |
2951 | 54 http://ftp.xemacs.org/pub/xemacs/packages/xemacs-sumo.tar.gz |
442 | 55 |
56 If you are building with international support, you also need | |
57 | |
2951 | 58 http://ftp.xemacs.org/pub/xemacs/packages/xemacs-mule-sumo.tar.gz |
442 | 59 |
60 Although we don't recommend it, you can also retrieve just the packages | |
61 you really need if you have an extremely slow net connection or are very | |
62 short on disk space. You can find the various packages in | |
2951 | 63 http://ftp.xemacs.org/pub/xemacs/packages/. You will need the xemacs-base |
442 | 64 package (and mule-base, if building with international support). You'll |
65 also need the texinfo package unless you have a copy of makeinfo.exe on | |
66 your machine. If you want to download additional or updated packages | |
67 from within XEmacs you'll need the efs, dired and vm packages. You'll | |
68 probably also want at least the edit-utils, text-modes, fsf-compat, | |
69 cc-mode, prog-modes and xemacs-devel packages. | |
70 | |
71 Unpack the packages into "x:\your\choice\XEmacs\xemacs-packages", | |
72 for example "c:\Program Files\XEmacs\xemacs-packages". | |
73 | |
1330 | 74 3. The native build no longer supports X Windows. There is no point, |
75 since the Cygwin build is actively maintained and supports X Windows | |
76 very well. See the FAQ if you want to build with Cygwin. | |
442 | 77 |
78 | |
79 * Optional libraries | |
80 ==================== | |
81 | |
2951 | 82 The easiest way to get the optional libraries is to grab the appropriate |
83 set of precompiled versions for your compiler: | |
84 | |
85 http://www.xemacs.org/Download/win32/optional-libs.exe | |
86 | |
87 or for VC++ 2005 (VC8) | |
88 | |
89 http://www.xemacs.org/Download/win32/optional-libs-vc8.exe | |
90 | |
91 unpack them somewhere and set the OPTIONAL_LIBRARY_DIR in config.inc | |
92 to point to where you put them. This will automatically give you | |
93 all the graphics libraries. (NOTE: optional-libs.exe was compiled with | |
94 VC++ .NET and may or may not work with VC++ 6.0. If not, you will have | |
95 to build them yourself until we provide VC6 binaries.) | |
96 | |
97 * Alternative: Building the optional libraries yourself | |
98 ======================================================= | |
99 | |
100 If you need to build the libraries yourself, grab them from | |
101 http://ftp.xemacs.org/pub/xemacs/aux or get the latest version from the | |
102 home page of the appropriate library, as listed on | |
103 http://www.xemacs.org/Download/optLibs.html. The following instructions | |
104 assume that you have the appropriate libraries and have unpacked them | |
105 somewhere, e.g. c:\src. | |
428 | 106 |
2951 | 107 Directions for building the various libraries: |
108 | |
109 1. You really want the XPM library. Copy nt\xpm.mak from the xemacs sources | |
110 to the lib/ subdirectory of the XPM sources, cd to that directory and | |
111 build xpm with 'nmake -f xpm.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'. | |
428 | 120 |
2951 | 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 | |
428 | 134 |
2951 | 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. | |
428 | 143 |
2951 | 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: | |
428 | 161 |
2951 | 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/. | |
428 | 176 |
2951 | 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. | |
428 | 192 |
193 | |
442 | 194 * Building |
195 ========== | |
196 | |
197 1. cd to the nt subdirectory of the xemacs distribution and copy the file | |
198 config.inc.samp to config.inc. Make any necessary modifications. This | |
199 file controls the options that XEmacs is built with: | |
200 | |
201 -- If you want international (aka "Mule") support, modify the appropriate | |
202 line in config.inc as follows: | |
203 | |
771 | 204 MULE=1 |
428 | 205 |
2951 | 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 | |
442 | 231 config.inc as follows: |
232 | |
233 HAVE_XPM=1 | |
234 XPM_DIR="x:\location\of\your\xpm\sources" | |
235 | |
2951 | 236 Similarly for JPEG, TIFF, etc. support. |
442 | 237 |
2951 | 238 For PNG support, you also need to specify ZLIB_DIR. |
428 | 239 |
2951 | 240 If you want to use the DLL version of the Sleepycat DB library, |
241 set BUILD_DATABASE_SHARED to 1. You will have to have the DLL | |
242 present at run-time -- either in the same directory as the XEmacs | |
243 executable or somewhere in your path. | |
442 | 244 |
245 -- By default, XEmacs will expect to find its packages in the | |
246 subdirectories "site-packages", "mule-packages" and "xemacs-packages" | |
247 under the directory "c:\Program Files\XEmacs". If you want it to look | |
248 for these subdirectories elsewhere, modify the appropriate lines in | |
249 config.inc as follows: | |
428 | 250 |
442 | 251 PACKAGE_PREFIX="x:\your\package\directory" |
252 | |
253 Make sure that the directory pointed to by PACKAGE_PREFIX contains | |
254 the xemacs-packages directory into which you installed the packages. | |
255 | |
256 -- XEmacs can build its info files more quickly if you have a copy of the | |
257 makeinfo program. If you have a copy, modify the appropriate lines in | |
258 config.inc as follows: | |
259 | |
260 MAKEINFO="x:\location\of\makeinfo.exe" | |
261 | |
262 If you don't have a copy of makeinfo then you'll need to have installed | |
263 the XEmacs texinfo package. | |
264 | |
265 2. If you want to install XEmacs when you build it, modify the appropriate | |
266 lines in config.inc as follows (you can also run XEmacs from its build | |
267 directory): | |
268 | |
269 INSTALL_DIR="x:\your\installation\directory" | |
428 | 270 |
442 | 271 (By default, XEmacs will be installed in directories under the directory |
827 | 272 "c:\Program Files\XEmacs\XEmacs-21.5".) |
442 | 273 |
1330 | 274 3. If you want the built files to go into a different tree than the source |
275 tree (e.g. this allows you to build multiple versions of XEmacs, with | |
276 different configuration settings, from the same source tree), use the | |
277 script `make-build-dir' to create a skeleton build tree, create a | |
278 config.inc in that tree, and then run nmake from that tree. This is | |
279 similar to running `configure --srcdir=PATH' under Unix. See the | |
280 comments in `config.inc.samp' for more information. | |
281 | |
282 4. If you want to build xemacs on the command line, use | |
442 | 283 `nmake install -f xemacs.mak', or just `nmake -f xemacs.mak' if you want |
284 to run XEmacs from its build directory. nmake will build temacs, the DOC | |
285 file, update the elc's, dump xemacs and (optionally) install the relevant | |
286 files in the directories under the installation directory. | |
287 | |
288 If you chose to install XEmacs, the file that you should run to start | |
289 XEmacs will be installed (by default) as | |
827 | 290 "c:\Program Files\XEmacs\XEmacs-21.5\i586-pc-win32\xemacs.exe". |
442 | 291 |
827 | 292 To run from the build directory, run the file "src\xemacs.exe" off of the |
442 | 293 root of the build directory. |
294 | |
295 You may want to create a shortcut to the file from your Desktop or | |
296 Start Menu. | |
297 | |
1330 | 298 5. To build using MS Visual Studio, you can use the workspace file |
2951 | 299 `nt/xemacs.dsw'. This was prepared for Visual C++ 6.0. If you are using |
300 Visual Studio .NET, open this file up inside of it and it will offer to | |
301 convert it to a .NET "solution" file. The same procedure should work | |
302 for newer versions of Visual Studio (e.g. Visual Studio 2005). If this | |
303 doesn't work (e.g. you are using Visual C++ 5 or even earlier), just | |
304 open up `nt/xemacs.mak' from within Visual Studio and it will offer to | |
305 wrap this Makefile in a workspace file, from which you can build. | |
306 Assuming you want to run from the build directory (which you will want | |
307 to do if you are planning on doing any development work on XEmacs), use | |
308 the following settings (for Visual C++ 6.0, at least) in | |
827 | 309 Project/Settings...: |
442 | 310 |
311 Under the General tab: | |
312 | |
313 Build command line: NMAKE /f xemacs.mak | |
314 Output file name: ..\src\xemacs.exe | |
315 Browse info file name: ..\src\temacs.bsc | |
316 | |
317 Under the Debug tab: | |
428 | 318 |
442 | 319 Executable for debug session: ..\src\xemacs.exe |
320 | |
321 | |
322 If you want to install XEmacs when it's built, change the build command | |
323 line to "NMAKE install /f xemacs.mak". (You will have to make the same | |
324 change even if you use the provided workspace nt/xemacs.dsw.) | |
325 | |
326 | |
327 * Debugging under MS Developer Studio | |
328 ===================================== | |
329 | |
330 The build process always creates debugging and "Source Browser" information | |
331 in the source tree for use with DevStudio. However that information is not | |
332 very useful unless you build a debug version of XEmacs: | |
333 | |
334 1. Set DEBUG_XEMACS=1 and DEPEND=1 in config.inc and rebuild. | |
335 | |
336 2. See instructions above for obtaining a workspace file for use with | |
337 MS Developer Studio. Build and debug your XEmacs this way. | |
338 | |
339 3. To display the contents of a lisp variable, type Shift-F9 (or use the | |
1203 | 340 menu) to bring up the QuickWatch window, type dp(variable) and click |
341 Recalculate. The output will appear in a console window, as well as in | |
342 the Debug window in MS Developer Studio. | |
442 | 343 |
1203 | 344 4. To display a current Lisp backtrace, type db() in the QuickWatch window, |
345 as in the previous item. | |
346 | |
347 5. To view Lisp variables in the "Watch" window wrap the variable in one of | |
442 | 348 the helper functions from the file src\console-msw.c, for example type |
349 DSTRING(variable) in the "Watch" window to inspect a Lisp string. | |
350 | |
1203 | 351 6. For further information on debugging XEmacs, see the item |
352 `How to Debug an XEmacs problem with a debugger' in the XEmacs FAQ. | |
353 | |
442 | 354 |
355 * Known Problems | |
356 ================ | |
357 | |
358 Please look at the PROBLEMS file for known problems. Any other problems you | |
359 need clarified, please email us and we will endeavour to provide any | |
360 assistance we can: | |
428 | 361 |
5826
98681721a588
Small update to Windows contributors to test hg access
Vin Shelton <acs@xemacs.org>
parents:
4708
diff
changeset
|
362 The XEmacs developers' list: xemacs-beta@xemacs.org |
428 | 363 |
5826
98681721a588
Small update to Windows contributors to test hg access
Vin Shelton <acs@xemacs.org>
parents:
4708
diff
changeset
|
364 Vin Shelton (creator of the InnoSetup Windows native setup kits) |
98681721a588
Small update to Windows contributors to test hg access
Vin Shelton <acs@xemacs.org>
parents:
4708
diff
changeset
|
365 Ben Wing (former primary MS Windows maintainer; author of the MS Windows |
442 | 366 Mule code and some of the dialog box code) |
367 Andy Piper (MS Windows contributor; author of the Cygwin support and the | |
368 MS Windows glyph and widget code) | |
2951 | 369 Jonathan Harris (MS Windows contributor; original author of the MS Windows |
370 redisplay and underlying GUI code) | |
442 | 371 Kirill Katsnelson (MS Windows contributor; author of the MS Windows process |
372 and printing code and some of the dialog box code; | |
373 general guru on obscure MS Windows programming topics) | |
374 David Hobley (early MS Windows contributor) | |
375 Marc Paquette (early MS Windows contributor) | |
376 August Hill (early MS Windows contributor) | |
428 | 377 |
378 and others. |