Installing MacOS X Bundle: Difference between revisions
(Clean up (could use a review). We'll eventually want to have separate sections for 3.2,x, 3.4.x, 3.6,x, etc.) |
|||
Line 31: | Line 31: | ||
** {{Codeline|sudo ln -s /Applications/Gnuplot.app/Contents/Resources/bin/gnuplot /usr/local/bin/gnuplot}} | ** {{Codeline|sudo ln -s /Applications/Gnuplot.app/Contents/Resources/bin/gnuplot /usr/local/bin/gnuplot}} | ||
** {{Codeline|sudo touch /usr/local/bin/octave}} | ** {{Codeline|sudo touch /usr/local/bin/octave}} | ||
** {{Codeline|sudo ln -s /Applications/Octave.app/Contents/Resources/octave /usr/local/bin/octave}} | ** {{Codeline|sudo ln -s /Applications/Octave.app/Contents/Resources/bin/octave /usr/local/bin/octave}} | ||
* Test that everything is ok. | * Test that everything is ok. | ||
** In a Terminal window type the command below. | ** In a Terminal window type the command below. |
Revision as of 16:24, 7 March 2012
These install instructions are verified to work for the October 04, 2011 binary for Octave 3.4.0, hosted on sourceforge.
Download the DMG
The latest MacOS X binary (DMG) available is for Octave-3.4.0. Click on this link to download.
Once it has been downloaded, double-click on the dmg to mount the disk image. It is recomended that Gnuplot is installed prior to Octave.
Install Gnuplot & Aquaterm
Look in the 'Extras' folder and find the gnuplot-4.4.3-aqua-i386.dmg disc image. Double-click this dmg to mount the Gnuplot disk image.
On this disk is the OS X binary for Gnuplot. The Gnuplot package includes and relies on Aquaterm for displaying plots using Apple's Quartz graphics layer. Alternatively, X11 can be used. However, the pleasant anti-aliasing features of Quartz will are not included with X11 on MacOS X.
Move the 'Gnuplot' icon to your Applications folder. For purpose of this discussion - this is assumed to be /Applications. If you are using a local Applications folder (/~/Applications) appropriate modification of the paths specified below will be necessary.
This Gnuplot application includes Aquaterm. It is located at /Applications/Gnuplot.app/Contents/Resources/lib/Aquaterm.app If you need it for some other application, this is the path that will find it. But don't move it to the upper level of the Applications folder, or else Gnuplot will not know where to find it.
Install Octave
Move the 'Octave' icon from the first .dmg to the Applications folder (/Applications).
Now you have everything you need to run Octave, Gnuplot, and Aquaterm. You can put the Octave and Gnuplot icons in the dock and either will open in a terminal window with a simple 'click'. To test Octave, click its icon, and the Octave prompt should appear in a new terminal window along with some splash screen information. Then type 'sombrero(24)' at the Octave prompt and after a while aquaterm will open and the multicolor sombrero plot should appear.
Running Octave and Gnuplot from a Terminal
Starting Octave from the command line requires one further step to inform bash (your shell) where the Octave binary is located. This is accomplished through the bash initialization file ~/.bashrc (the leading "." means it's normally invisible in the finder). To run Octave and Gnuplot from a terminal, symbolic links will be used.
- Open a new terminal window, and enter the commands below.
sudo touch /usr/local/bin/gnuplot
sudo ln -s /Applications/Gnuplot.app/Contents/Resources/bin/gnuplot /usr/local/bin/gnuplot
sudo touch /usr/local/bin/octave
sudo ln -s /Applications/Octave.app/Contents/Resources/bin/octave /usr/local/bin/octave
- Test that everything is ok.
- In a Terminal window type the command below.
octave
- Octave should now be running. To test Gnuplot / Aquaterm, try a plot.
sombrero ()
- In a Terminal window type the command below.
If Octave did not run, check to ensure that your PATH includes /usr/local/bin.
- From the Terminal prompt, type,
env
- If the PATH does not include /usr/local/bin, type the commands below.
- Open ~/.bashrc in an editor
touch ~/.bashrc
open ~/.bashrc
- Add the line below to the contents of ~/.bashrc
export PATH=$PATH:/usr/local/bin
- Save ~/.bashrc and exit
- Open ~/.bashrc in an editor
- If the PATH does include /usr/local/bin, help may be requested by posting to Octave's email list. Please provide a detailed description of what you've tried and what the results were.