Thanks to Javier Arantegui for this tutorial
The following guide is for QtOctave 0.6.8. Probably it will work for older and newer versions of QtOctave but I haven’t tested it. My Mac is an Intel and has Leopard 10.5.1. There shouldn’t be any problem in a PPC Mac. Obviously you need to have installed the developer tools (Xcode) for Leopard and QT for Mac ( 4.3). I installed Octave using Fink and use Aquaterm as a terminal for plots, although this shouldn’t be important. Octave is installed en /sw. I haven’t tried to compile QtOctave using the Octave.app available at http://octave.sf.net.
The compilation process is quite easy and I tried to explain it step by step.
1. Download qtoctave-0.6.8.tar.gz
2. Open a Terminal. Untar qtoctave (The text in courier is what you should type in the terminal):
tar xvzf qtoctave-0.6.8.tar.gz
3. cd qtoctave-0.6.8
4. Time to define to enviroment variables:
export QTDIR=/usr/local/Qt4.3/
export QMAKESPEC=/usr/local/Qt4.3 /mkspecs/macx-g++
5. Here come a tricky part where we tell the compiler that we don’t want a bundle application:
cd install-tool2
Now it’s time to edit a text file. You can use an excellent text editor like Smultron (GPL) or nano, like here:
nano install-tool2.pro
After the line “QT -= gui # Only the core module is used.”, add the following line:
CONFIG-=app_bundle
Probably where you add this line is not important, but there is where I put it and it worked…
Save the file and
cd ..
6. Now we are ready to execute configure:
sh configure –prefix=/sw
Because Octave is in /sw, I thought that it was the best place to install QtOctave.
7. Not it’s time to edit another .pro file:
cd qtoctave
nano qtoctave.pro
Add the following line after “INCLUDEPATH += . operations dynamic_help”:
CONFIG-=app_bundle
Again, I don’t know why I put it there, but it worked…
Save the file and
cd ..
8. Compile:
/usr/bin/make
9. And install:
sudo make install
10. Enjoy. That’s all. To use QtOctave, just type qtoctave in a terminal.
Javier