4696
|
1 The following is my current best set of directions for installing |
|
2 Octave on a Windows system using either a binary package or by |
|
3 installing from sources using the Cygwin tools. If you already have |
|
4 Cygwin installed, you may need to update your installation of tools to |
|
5 include those mentioned below. |
4400
|
6 |
|
7 Following these steps should give you an Octave installation that |
|
8 includes all the necessary tools for building dynamically linked |
|
9 functions (.oct files). |
3847
|
10 |
4400
|
11 1. Use your favorite browser to view the page http://www.cygwin.com |
|
12 |
|
13 2. Click on the "Install or update now" link. |
|
14 |
|
15 3. A dialog should appear with the option to run the setup program |
|
16 from its current location or save it to disk. Either will work, |
|
17 but I usually choose to save the setup program to disk so that it |
|
18 is possible to run it later to update the installation without |
|
19 having to go back to the web page using a browser. |
|
20 |
|
21 4. Run the setup program. |
|
22 |
|
23 5. Choose "Install from Internet". |
|
24 |
|
25 6. Select a root install directory. You may choose any directory, but |
|
26 it needs to have about 600MB available to install all the |
|
27 necessary Cygwin tools plus build and install Octave from sources. |
|
28 That may seem like a large disk space requirement, but remember |
|
29 that you are getting more than just Octave, you are installing a |
|
30 Unix-like development environment including C, C++, and Fortran |
|
31 compilers as well. Once Octave is installed, you can delete the |
|
32 sources and build directory, freeing up about 250MB. |
3154
|
33 |
4400
|
34 You may choose to install for just you or all users (if you have |
|
35 permission to do so). I would select "Unix" as the default text |
|
36 file type (this option should be the default). |
|
37 |
|
38 7. Select a local package directory. This is a directory that the |
|
39 setup program will use to temporarily store package files before |
|
40 installing them. It should have plenty of space (probably 70MB |
|
41 or more). You may delete this directory once the installation is |
|
42 complete. |
|
43 |
|
44 8. Select your Internet Connection. Probably "Direct Connection" is |
|
45 OK unless you are behind a firewall of some kind that limits your |
|
46 access to the Internet. |
|
47 |
|
48 9. Choose a download site. One that is "near" you on the net is |
|
49 probably best. |
|
50 |
4696
|
51 If you want to install a binary package of Octave, also add the |
|
52 User URL |
|
53 |
|
54 ftp://ftp.octave.org/pub/octave/cygwin |
|
55 |
|
56 in the dialog (there is a textbox at the bottom with an Add |
|
57 button to the right -- enter the URL in the textbox and click |
|
58 the Add button). |
|
59 |
|
60 10. Select packages. |
|
61 |
|
62 Binary and Source installations: |
|
63 |
|
64 Select the gnuplot package from the Graphics category. The |
|
65 gnuplot package from ftp.octave.org will give you the Windows |
|
66 binary repackaged for Cygwin. If you select the gnuplot package |
|
67 from one of the Cygwin mirrors, you will get a recent 3.8 beta |
|
68 version (pre 4.0 release). |
|
69 |
|
70 Additional packages for binary install: |
|
71 |
|
72 Also select the Octave packages you want from the Math category. |
|
73 |
|
74 Additional packages for source compile and install: |
|
75 |
|
76 The defaults are not enough to build all of Octave from sources. |
|
77 In addition to the default set of packages, you should select the |
|
78 following packages from the following categories: |
4400
|
79 |
|
80 Archive: unzip |
|
81 Devel: autoconf, binutils, bison, cvs, dejagnu, flex, gcc, |
4690
|
82 g++, g77, gperf, make |
4400
|
83 Text: less, tetex, tetex-base |
|
84 Utils: diff, patch |
2587
|
85 |
4400
|
86 Once you have made these selections, click the Next button to |
|
87 download and install all the selected packages. The download and |
|
88 install may take a while depending on the speed of your computer |
|
89 and your connection to the net. |
|
90 |
|
91 11. Once the download and file installation is done, click Finish. I |
|
92 usually choose to create an icon on the desktop and put an icon in |
|
93 the start menu. After you click finish, a series of scripts will |
|
94 run, displaying some output in a terminal window. It will take a |
|
95 few minutes. |
2587
|
96 |
4696
|
97 Skip to step 17 if you are installing the binary package. |
4400
|
98 |
4696
|
99 12. Get the Octave sources, either from a current snapshot |
4694
|
100 distribution or from CVS. |
|
101 |
|
102 You should check the web page http://www.octave.org/download.html |
|
103 or look for the file RECOMMENDED-IS-N.NN.NN in the ftp download |
|
104 directory to see what version is currently recommended (N.NN.NN |
|
105 will be an actual version number, like 2.1.50). If more recent |
|
106 versions may be available they should be considered experimental. |
|
107 |
|
108 The CVS sources are only recommended for people who want be |
|
109 involved in Octave's development process and who don't mind |
|
110 running into the occasional show-stopping bug. |
4400
|
111 |
|
112 Snapshot: |
|
113 |
|
114 a. Download a copy of the current version of Octave from |
|
115 ftp://ftp.octave.org. You may use the command line ftp |
|
116 client in Cygwin or a web browser. You are looking for the |
4694
|
117 most recent recommended version in the pub/octave/bleeding-edge |
4400
|
118 directory. At the time of this writing, it was |
4694
|
119 octave-2.1.50.tar.gz. Save this file to your Cygwin home |
4400
|
120 directory. This directory will usually be called something |
|
121 like c:\cygwin\home\jwe from Windows (the precise location |
|
122 depends on where you chose to install Cygwin). |
2587
|
123 |
4400
|
124 IMPORTANT: If you use the ftp client, be sure to set the |
|
125 binary mode for downloads by typing |
|
126 |
|
127 binary |
|
128 |
|
129 at the ftp prompt. |
|
130 |
|
131 b. Unpack the source files using the command: |
|
132 |
4694
|
133 tar zxf octave-2.1.50.tar.gz |
4400
|
134 |
|
135 in the Cygwin shell. This command will create a subdirectory |
4694
|
136 called octave-2.1.50 in your home directory. |
4400
|
137 |
|
138 c. Change your current working directory to the top-level Octave |
|
139 source directory: |
|
140 |
4694
|
141 cd octave-2.1.50 |
4400
|
142 |
|
143 then continue with step 14 below. |
|
144 |
|
145 CVS: |
|
146 |
|
147 a. Check out a copy of the current sources from the public CVS |
|
148 archive by running the following commands |
3167
|
149 |
4400
|
150 cvs -d :pserver:anoncvs@www.octave.org:/cvs login |
|
151 cvs -z 9 -d :pserver:anoncvs@www.octave.org:/cvs checkout octave |
|
152 |
|
153 in the Cygwin shell. The first command will prompt you for a |
|
154 password; reply with anoncvs. The checkout command will |
|
155 create a subdirectory called octave containing the current |
|
156 CVS version of the Octave sources. |
|
157 |
|
158 b. Change your current working directory to the top-level Octave |
|
159 source directory: |
3167
|
160 |
4400
|
161 cd octave |
|
162 |
|
163 c. Build the configure scripts by running the command |
|
164 |
|
165 ./autogen.sh |
|
166 |
|
167 |
4696
|
168 13. Configure Octave by running the command |
4400
|
169 |
|
170 ./configure --enable-shared --disable-static |
3167
|
171 |
4400
|
172 This command will take several minutes to run as the configure |
|
173 script determines what features are available on your system. You |
|
174 need the --enable-shared option if you want to build dynamically |
|
175 loaded functions (.oct files) later. You may omit the |
|
176 --disable-static option if you want to build static libraries (.a |
|
177 files) in addition to shared libraries, but the build will take |
|
178 about twice as long to complete. |
|
179 |
4696
|
180 14. Build the Octave binary by running the command |
4400
|
181 |
|
182 make |
3167
|
183 |
4400
|
184 You may see warnings from gcc saying that __cdecl is redefined or |
|
185 that all code is position independent. You may safely ignore |
|
186 these warnings. |
|
187 |
4696
|
188 15. (OPTIONAL) Run Octave's regression test suite by running the |
4400
|
189 command |
|
190 |
|
191 make check |
|
192 |
|
193 Running the tests may take a very long time, so if you are in a |
|
194 hurry, you might want to skip this step. At the time of this |
|
195 writing, there are 4 "expected" failures related to the try-catch |
|
196 and eval commands. You may safely ignore those failures. |
|
197 |
4696
|
198 16. Complete the installation by running the command |
4400
|
199 |
3167
|
200 make install |
|
201 |
4696
|
202 17. Try starting Octave by running the command |
3167
|
203 |
4400
|
204 octave |
3167
|
205 |
4400
|
206 in the cygwin shell and then typing |
3167
|
207 |
4400
|
208 sombrero (41) |
3167
|
209 |
4400
|
210 at the Octave prompt to see if you can create a plot. |
3167
|
211 |
4696
|
212 18. Try to build a .oct file and run it: |
2587
|
213 |
4400
|
214 cd examples |
|
215 mkoctfile hello.cc |
|
216 octave |
|
217 ... |
|
218 octave:1> hello |
|
219 Hello, world! |
3176
|
220 |
4696
|
221 If you are doing a binary package install, the examples should be |
|
222 installed in the /usr/share/doc/octave/... XXX FIXME XXX |
|
223 |
|
224 |
3176
|
225 |
2587
|
226 |
|
227 John W. Eaton |
|
228 jwe@bevo.che.wisc.edu |
|
229 University of Wisconsin-Madison |
|
230 Department of Chemical Engineering |
|
231 |
4696
|
232 Wed Jan 14 13:37:15 2004 |