annotate nt/INSTALL @ 26524:a39742d2964d

*** empty log message ***
author Gerd Moellmann <gerd@gnu.org>
date Sun, 21 Nov 1999 16:46:24 +0000
parents 354e0c45cedf
children f64a9a44e2a3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25856
Dave Love <fx@gnu.org>
parents:
diff changeset
1 Building and Installing Emacs
Dave Love <fx@gnu.org>
parents:
diff changeset
2 on Windows NT and Windows 95
Dave Love <fx@gnu.org>
parents:
diff changeset
3
Dave Love <fx@gnu.org>
parents:
diff changeset
4 You need a compiler package to build and install Emacs on NT or Win95.
Dave Love <fx@gnu.org>
parents:
diff changeset
5 If you don't have one, precompiled versions are available in
Dave Love <fx@gnu.org>
parents:
diff changeset
6 ftp://ftp.cs.washington.edu/pub/ntemacs/<version>.
Dave Love <fx@gnu.org>
parents:
diff changeset
7
Dave Love <fx@gnu.org>
parents:
diff changeset
8 Configuring:
Dave Love <fx@gnu.org>
parents:
diff changeset
9
Dave Love <fx@gnu.org>
parents:
diff changeset
10 (1) In previous versions, you needed to edit makefile.def
Dave Love <fx@gnu.org>
parents:
diff changeset
11 to reflect the compiler package that you are using. You should no
Dave Love <fx@gnu.org>
parents:
diff changeset
12 longer have to do this if you have defined the INCLUDE and LIB
Dave Love <fx@gnu.org>
parents:
diff changeset
13 environment variables, as is customary for use with Windows compilers.
Dave Love <fx@gnu.org>
parents:
diff changeset
14 (Unless you are using MSVCNT 1.1, in which case you will need
Dave Love <fx@gnu.org>
parents:
diff changeset
15 to set MSVCNT11 to be a non-zero value at the top of makefile.def.)
Dave Love <fx@gnu.org>
parents:
diff changeset
16
Dave Love <fx@gnu.org>
parents:
diff changeset
17 (2) Choose the directory into which Emacs will be installed, and
Dave Love <fx@gnu.org>
parents:
diff changeset
18 edit makefile.def to define INSTALL_DIR to be this directory.
Dave Love <fx@gnu.org>
parents:
diff changeset
19 (Alternatively, if you have INSTALL_DIR set as an environment
Dave Love <fx@gnu.org>
parents:
diff changeset
20 variable, the build process will ignore the value in makefile.def
Dave Love <fx@gnu.org>
parents:
diff changeset
21 and use the value of the environment variable instead.) Note
Dave Love <fx@gnu.org>
parents:
diff changeset
22 that if it is not installed in the directory in which it is built,
Dave Love <fx@gnu.org>
parents:
diff changeset
23 the ~16 MB of lisp files will be copied into the installation directory.
Dave Love <fx@gnu.org>
parents:
diff changeset
24
Dave Love <fx@gnu.org>
parents:
diff changeset
25 Also, makefile.def is sometimes unpacked read-only; use
Dave Love <fx@gnu.org>
parents:
diff changeset
26
Dave Love <fx@gnu.org>
parents:
diff changeset
27 > attrib -r makefile.def
Dave Love <fx@gnu.org>
parents:
diff changeset
28
Dave Love <fx@gnu.org>
parents:
diff changeset
29 to make it writable.
Dave Love <fx@gnu.org>
parents:
diff changeset
30
Dave Love <fx@gnu.org>
parents:
diff changeset
31 (3) You may need to edit nt/paths.h to specify some other device
Dave Love <fx@gnu.org>
parents:
diff changeset
32 instead of `C:'.
Dave Love <fx@gnu.org>
parents:
diff changeset
33
Dave Love <fx@gnu.org>
parents:
diff changeset
34 Building:
Dave Love <fx@gnu.org>
parents:
diff changeset
35
Dave Love <fx@gnu.org>
parents:
diff changeset
36 (4) The target to compile the sources is "all", and is recursive starting
Dave Love <fx@gnu.org>
parents:
diff changeset
37 one directory up. The makefiles for the NT port are in files named
Dave Love <fx@gnu.org>
parents:
diff changeset
38 "makefile.nt". To get things started, type in this directory:
Dave Love <fx@gnu.org>
parents:
diff changeset
39
Dave Love <fx@gnu.org>
parents:
diff changeset
40 > nmake -f makefile.nt all
Dave Love <fx@gnu.org>
parents:
diff changeset
41
Dave Love <fx@gnu.org>
parents:
diff changeset
42 or use the ebuild.bat file.
Dave Love <fx@gnu.org>
parents:
diff changeset
43
Dave Love <fx@gnu.org>
parents:
diff changeset
44 When the files are compiled, you will see some warning messages declaring
Dave Love <fx@gnu.org>
parents:
diff changeset
45 that some functions don't return a value, or that some data conversions
Dave Love <fx@gnu.org>
parents:
diff changeset
46 will be lossy, etc. You can safely ignore these messages. The warnings
Dave Love <fx@gnu.org>
parents:
diff changeset
47 may be fixed in the main FSF source at some point, but until then we
Dave Love <fx@gnu.org>
parents:
diff changeset
48 will just live with them.
Dave Love <fx@gnu.org>
parents:
diff changeset
49
Dave Love <fx@gnu.org>
parents:
diff changeset
50 NOTE: You should not have to edit src\paths.h to get Emacs to run
Dave Love <fx@gnu.org>
parents:
diff changeset
51 correctly. All of the variables in src\paths.h are configured
Dave Love <fx@gnu.org>
parents:
diff changeset
52 during start up using the nt\emacs.bat file (which gets installed
Dave Love <fx@gnu.org>
parents:
diff changeset
53 as bin\emacs.bat -- see below).
Dave Love <fx@gnu.org>
parents:
diff changeset
54
Dave Love <fx@gnu.org>
parents:
diff changeset
55 Installing:
Dave Love <fx@gnu.org>
parents:
diff changeset
56
Dave Love <fx@gnu.org>
parents:
diff changeset
57 (5) Currently, Emacs requires a number of environment variables to be set
Dave Love <fx@gnu.org>
parents:
diff changeset
58 for it to run correctly. A batch file, emacs.bat, is provided that
Dave Love <fx@gnu.org>
parents:
diff changeset
59 sets these variables appropriately and then runs the executable
Dave Love <fx@gnu.org>
parents:
diff changeset
60 (emacs.bat is generated using the definition of INSTALL_DIR in
Dave Love <fx@gnu.org>
parents:
diff changeset
61 nt\makefile.def and the contents of nt\emacs.bat.in).
Dave Love <fx@gnu.org>
parents:
diff changeset
62
Dave Love <fx@gnu.org>
parents:
diff changeset
63 (6) The install process will install the files necessary to run Emacs in
Dave Love <fx@gnu.org>
parents:
diff changeset
64 INSTALL_DIR (which may be the directory in which it was built),
Dave Love <fx@gnu.org>
parents:
diff changeset
65 and create a program manager/folder icon in a folder called GNU Emacs.
Dave Love <fx@gnu.org>
parents:
diff changeset
66 From this directory, type:
Dave Love <fx@gnu.org>
parents:
diff changeset
67
Dave Love <fx@gnu.org>
parents:
diff changeset
68 > nmake -f makefile.nt install
Dave Love <fx@gnu.org>
parents:
diff changeset
69
Dave Love <fx@gnu.org>
parents:
diff changeset
70 or use the install.bat file.
Dave Love <fx@gnu.org>
parents:
diff changeset
71
Dave Love <fx@gnu.org>
parents:
diff changeset
72 (7) Create the Emacs startup file. This file can be named either .emacs,
Dave Love <fx@gnu.org>
parents:
diff changeset
73 as on Unix, or _emacs. Note that Emacs requires the environment
Dave Love <fx@gnu.org>
parents:
diff changeset
74 variable HOME to be set in order for it to locate the startup file.
Dave Love <fx@gnu.org>
parents:
diff changeset
75 HOME could be set, for example, in the System panel of the Control
Dave Love <fx@gnu.org>
parents:
diff changeset
76 Panel on NT, or in autoexec.bat on Win95.
Dave Love <fx@gnu.org>
parents:
diff changeset
77
Dave Love <fx@gnu.org>
parents:
diff changeset
78 (8) Start up Emacs.
Dave Love <fx@gnu.org>
parents:
diff changeset
79
Dave Love <fx@gnu.org>
parents:
diff changeset
80 The installation process should have run the addpm.exe program, which
Dave Love <fx@gnu.org>
parents:
diff changeset
81 does two things. First, it will create a set of registry keys that
Dave Love <fx@gnu.org>
parents:
diff changeset
82 tell Emacs where to find its support files (lisp, info, etc.).
Dave Love <fx@gnu.org>
parents:
diff changeset
83 Second, it will create a folder containing an icon linked to
Dave Love <fx@gnu.org>
parents:
diff changeset
84 runemacs.exe (a wrapper program for invoking Emacs). You can
Dave Love <fx@gnu.org>
parents:
diff changeset
85 also invoke addpm.exe by hand, giving the absolute directory name
Dave Love <fx@gnu.org>
parents:
diff changeset
86 of the installation directory as the first argument:
Dave Love <fx@gnu.org>
parents:
diff changeset
87
Dave Love <fx@gnu.org>
parents:
diff changeset
88 addpm.exe %INSTALL_DIR%
Dave Love <fx@gnu.org>
parents:
diff changeset
89
Dave Love <fx@gnu.org>
parents:
diff changeset
90 Now, to run Emacs, simply click on the icon in the newly created
Dave Love <fx@gnu.org>
parents:
diff changeset
91 folder or invoke runemacs.exe from a command prompt.
Dave Love <fx@gnu.org>
parents:
diff changeset
92
Dave Love <fx@gnu.org>
parents:
diff changeset
93 Another alternative for running Emacs is to use the emacs.bat batch
Dave Love <fx@gnu.org>
parents:
diff changeset
94 file in the bin directory (this was the traditional method of invoking
Dave Love <fx@gnu.org>
parents:
diff changeset
95 Emacs). Edit the emacs.bat file to change the emacs_dir environment
Dave Love <fx@gnu.org>
parents:
diff changeset
96 variable to point to the Emacs installation directory and invoke the
Dave Love <fx@gnu.org>
parents:
diff changeset
97 emacs.bat file to run Emacs.
Dave Love <fx@gnu.org>
parents:
diff changeset
98
Dave Love <fx@gnu.org>
parents:
diff changeset
99 Note that, on Win95, you are likely to get "Out of environment space"
Dave Love <fx@gnu.org>
parents:
diff changeset
100 messages when invoking the emacs.bat batch file. The problem is that
Dave Love <fx@gnu.org>
parents:
diff changeset
101 the console process in which the script is executed runs out of memory
Dave Love <fx@gnu.org>
parents:
diff changeset
102 in which to set the Emacs environment variables. To get around this
Dave Love <fx@gnu.org>
parents:
diff changeset
103 problem, create a shortcut icon to the emacs.bat script. Then right
Dave Love <fx@gnu.org>
parents:
diff changeset
104 click on the icon and select Properties. In the dialog box that pops
Dave Love <fx@gnu.org>
parents:
diff changeset
105 up, select the Memory tab and then change the Environment memory
Dave Love <fx@gnu.org>
parents:
diff changeset
106 allocation from "Auto" to "1024". Close the dialog box and then
Dave Love <fx@gnu.org>
parents:
diff changeset
107 double click on the icon to start Emacs.
Dave Love <fx@gnu.org>
parents:
diff changeset
108
Dave Love <fx@gnu.org>
parents:
diff changeset
109 Debugging:
Dave Love <fx@gnu.org>
parents:
diff changeset
110
Dave Love <fx@gnu.org>
parents:
diff changeset
111 (9) You should be able to debug Emacs using the MSVC debugger as you would
Dave Love <fx@gnu.org>
parents:
diff changeset
112 any other program. To ensure that Emacs uses the lisp files associated
Dave Love <fx@gnu.org>
parents:
diff changeset
113 with the source distribution that you are debugging, it is useful
Dave Love <fx@gnu.org>
parents:
diff changeset
114 to set the Emacs environment variables to point Emacs to the
Dave Love <fx@gnu.org>
parents:
diff changeset
115 source distribution. You can use the debug.bat batch file in this
Dave Love <fx@gnu.org>
parents:
diff changeset
116 directory to setup the environment and invoke msdev on the
Dave Love <fx@gnu.org>
parents:
diff changeset
117 emacs.exe executable.
Dave Love <fx@gnu.org>
parents:
diff changeset
118
Dave Love <fx@gnu.org>
parents:
diff changeset
119 Emacs functions implemented in C use a naming convention that
Dave Love <fx@gnu.org>
parents:
diff changeset
120 reflects their names in lisp. The names of the C routines are
Dave Love <fx@gnu.org>
parents:
diff changeset
121 the lisp names prefixed with 'F', and with dashes converted to
Dave Love <fx@gnu.org>
parents:
diff changeset
122 underscores. For example, the function call-process is implemented
Dave Love <fx@gnu.org>
parents:
diff changeset
123 in C by Fcall_process. Similarly, lisp variables are prefixed
Dave Love <fx@gnu.org>
parents:
diff changeset
124 with 'V', again with dashes converted to underscores. These
Dave Love <fx@gnu.org>
parents:
diff changeset
125 conventions enable you to easily set breakpoints or examine familiar
Dave Love <fx@gnu.org>
parents:
diff changeset
126 lisp variables by name.
Dave Love <fx@gnu.org>
parents:
diff changeset
127
Dave Love <fx@gnu.org>
parents:
diff changeset
128 Since Emacs data is often in the form of a lisp object, and the
Dave Love <fx@gnu.org>
parents:
diff changeset
129 Lisp_Object type is difficult to examine manually in the debugger,
Dave Love <fx@gnu.org>
parents:
diff changeset
130 Emacs provides a helper routine called debug_print that prints out
Dave Love <fx@gnu.org>
parents:
diff changeset
131 a readable representation of a Lisp_Object. The output from
Dave Love <fx@gnu.org>
parents:
diff changeset
132 debug_print is sent to stderr, and to the debugger via the
Dave Love <fx@gnu.org>
parents:
diff changeset
133 OutputDebugString routine. The output sent to stderr should be
Dave Love <fx@gnu.org>
parents:
diff changeset
134 displayed in the console window that was opened when the emacs.exe
Dave Love <fx@gnu.org>
parents:
diff changeset
135 executable was started. The output sent to the debugger should be
Dave Love <fx@gnu.org>
parents:
diff changeset
136 displayed in its "Debug" output window.
Dave Love <fx@gnu.org>
parents:
diff changeset
137
Dave Love <fx@gnu.org>
parents:
diff changeset
138 When you are in the process of debugging Emacs and you would like
Dave Love <fx@gnu.org>
parents:
diff changeset
139 to examine the contents of a Lisp_Object variable, popup the
Dave Love <fx@gnu.org>
parents:
diff changeset
140 QuickWatch window (QuickWatch has an eyeglass symbol on its button
Dave Love <fx@gnu.org>
parents:
diff changeset
141 in the toolbar). In the text field at the top of the window, enter
Dave Love <fx@gnu.org>
parents:
diff changeset
142 debug_print(<variable>) and hit return. For example, start
Dave Love <fx@gnu.org>
parents:
diff changeset
143 and run Emacs in the debugger until it is waiting for user input.
Dave Love <fx@gnu.org>
parents:
diff changeset
144 Then click on the Break button in the debugger to halt execution.
Dave Love <fx@gnu.org>
parents:
diff changeset
145 Emacs should halt in ZwUserGetMessage waiting for an input event.
Dave Love <fx@gnu.org>
parents:
diff changeset
146 Use the Call Stack window to select the procedure w32_msp_pump
Dave Love <fx@gnu.org>
parents:
diff changeset
147 up the call stack (see below for why you have to do this). Open
Dave Love <fx@gnu.org>
parents:
diff changeset
148 the QuickWatch window and enter debug_print(Vexec_path). Evaluating
Dave Love <fx@gnu.org>
parents:
diff changeset
149 this expression will then print out the contents of the lisp
Dave Love <fx@gnu.org>
parents:
diff changeset
150 variable exec-path.
Dave Love <fx@gnu.org>
parents:
diff changeset
151
Dave Love <fx@gnu.org>
parents:
diff changeset
152 If QuickWatch reports that the symbol is unknown, then check the
Dave Love <fx@gnu.org>
parents:
diff changeset
153 call stack in the Call Stack window. If the selected frame in the
Dave Love <fx@gnu.org>
parents:
diff changeset
154 call stack is not an Emacs procedure, then the debugger won't
Dave Love <fx@gnu.org>
parents:
diff changeset
155 recognize Emacs symbols. Instead, select a frame that is inside
Dave Love <fx@gnu.org>
parents:
diff changeset
156 an Emacs procedure and try using debug_print again.
Dave Love <fx@gnu.org>
parents:
diff changeset
157
Dave Love <fx@gnu.org>
parents:
diff changeset
158 If QuickWatch invokes debug_print but nothing happens, then check
Dave Love <fx@gnu.org>
parents:
diff changeset
159 the thread that is selected in the debugger. If the selected
Dave Love <fx@gnu.org>
parents:
diff changeset
160 thread is not the last thread to run (the "current" thread), then
Dave Love <fx@gnu.org>
parents:
diff changeset
161 it cannot be used to execute debug_print. Use the Debug menu
Dave Love <fx@gnu.org>
parents:
diff changeset
162 to select the current thread and try using debug_print again.
Dave Love <fx@gnu.org>
parents:
diff changeset
163 Note that the debugger halts execution (e.g., due to a breakpoint)
Dave Love <fx@gnu.org>
parents:
diff changeset
164 in the context of the current thread, so this should only be a problem
Dave Love <fx@gnu.org>
parents:
diff changeset
165 if you've explicitly switched threads.