This document is organized in the following way:
- Overview
- Octave is a high-level language, primarily intended for numerical
computations. It provides a convenient command line interface for
solving linear and nonlinear problems numerically.
- Octave is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
- Octave is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the file COPYING for more
details.
- Used Compiler and Libraries
- Octave for OS/2 is compiled using EMX-GCC 0.9C (with EMXFIX04)
and libg++ 2.7.2.
- The fortran routines are translated to C using f2c.
- Binary Distribution
- Why a binary distribution?
- There are only minor changes made in the source files of Octave.
The main job was patching stdcpp, info, kpathsea and readline.
- Octave is big (40 MB with the source, object files and libraries)
and it takes time to compile the program. (ca. 50 minutes on my
133 MHz Pentium-Overdrive system = ca. 8 hours on a 486DX-33).
- Compiling Octave
- If you want to compile Octave yourself you must download the patched
sources and unpack them.
- Modify the paths in the file makeversions depending on your
system setup.
- Run 'make octave'.
- Files
- The files BUGS, CHANGELO, CHANGELO.1, COPYING, NEWS, NEWS.1, PROJECTS,
README, ROADMAP, SENDING.PAT and THANKS are part of the Octave 2.0.17
source code.
- In the zip file scripts.zip are the scripts coming with octave 2.0.17.
The installation script will unzip the correct set of script files for
your file system.
- The files COPYING.EMX, emx.dll, emxlibcs.dll and termcap.dat are
part of the emx 0.9c package (with EMXFIX04 applied, see COPYING.EMX).
- Octave.exe and Octave.ico are the executable and the icon of
the main program. The file Octave.exe must no longer be build by
the install program!
- info.exe is the standalone info browser coming with EMX. It was recompiled
so that info.exe and octave.exe uses the same DLL (gnuinfo.dll). And it is
patched so that info.exe accepts the --index-search
option.
- gnuview.exe is a replacement for info.exe: It accepts the same command
line option, but it starts OS/2s view.exe.
- mkfifo.exe is the utility for creating, removing and listing named pipes.
It starts the program nmpserv.exe, if neccessary.
- The program oct-view.exe is used for starting the image viewer.
- README.OS2 is the file you are reading.
- In the directory lisp you find the elisp files (and the
compiled elisp files) you need to run Octave in an Emacs subshell and
the files for editing script files or temporary files of Octave using
the Emacs editor.
- In the directory doc you can find the documentation in
dvi, postscript and info files.
- In the directory dll you can find the Dynamic Link Libraries of
Octave and emx, and the file termcap.dat is in the directory etc.
- All files you need for using the dynamic loading in Octave for loading
your own C++ routines into Octave are in dlfcn and
its subdirectories.
- Updating to the most recent build level
BEFORE APPLYING A PATCH MAKE SURE THAT THE PATCH IS FOR YOUR
INSTALLED OCTAVE VERSION (CHECK THE TIMESTAMPS OF THE FILES).
|
DO NOT INSTALL AN OLDER PATCH OVER A NEWER VERSION OF OCTAVE!
|
- First you must install Octave. See Installation below.
- Unzip the patches into the directory you have Octave/2 installed in.
- Change into that directory and type
updt-octave
- Type
inst-octave /clean
- Installation
Change to the directory of octave and run install (REXX must be installed!):
- Type:
inst-octave /install
The script make changes in the config.sys, .octaverc, .emacs and dir.
It unzips the scriptfiles, removes older emx-dlls, copies the info-files
to the INFO directory and creates an object on the desktop!
For all modified or deleted files it will create backups in the current
directory.
BEFORE REBOOTING CONFIRM THE CHANGES THIS SCRIPT WILL HAVE DONE
IN YOUR CONFIG.SYS!
|
IF THERE IS SOMETHING WRONG PLEASE SEND ME A NOTE! |
- If necessary the script will ask you to reboot. Do so.
- To save disk space you can use:
inst-octave /clean
All the files you don't need for running octave are deleted.
All backup files are also removed.
The setup script modify the following parts of the config.sys, if necessary:
PATH=...;h:\apps\science\octave;
LIBPATH=...;h:\apps\science\octave\dll;
SET OCTAVE_HOME=c:/octave
SET TERM=ansi
SET TERMCAP=h:/apps/science/octave/etc/termcap.dat
SET HOME=h:/.
SET OCTAVE_INITFILE=octave.ini
SET INFOPATH=.;h:/apps/science/octave/doc
SET GNUPLOT=h:/apps/science/gnuplot
- PAGER
- If you want to use the less pager, you need the file less252-2.zip or
newer. This less port does not use the termcap library, so it is unable
to work with ansi-color-2, ansi-color-3,...
- If you want to use ansi-color-3, you must recompile less after deleting
termcap.c and adding the termcap-library in the makefile, or you must edit
the file termcap.dat: Replace every tc=ansi in the termcap.dat by the
lines following ansi.
- EMACS
- You can use emacs to edit the script files of Octave.
To do so add the lines
(setq load-path (append '("h:/apps/science/octave/lisp") load-path))
(autoload 'octave-mode "octave-mode" "Enter Octave mode." t)
(setq auto-mode-alist (cons '("\\.[Mm]$" . octave-mode) auto-mode-alist))
(defun my-octave-mode-hook ()
(setq fill-column 76)
(auto-fill-mode 1))
(setq octave-mode-hook 'my-octave-mode-hook)
(setq octave-prog-filename "h:/apps/science/octave/octave.exe")
to your .emacs.
- If you run emacs in server mode, Octave can use the emacsclient for
editing temporary files. Add the following lines to .emacs:
(autoload 'octave-tmp-mode "octave-tmp-mode" "Enter Octave's tmp mode." t)
(setq auto-mode-alist
(cons '("[Oo][Cc][Tt]-....\\.[Tt][Mm][Pp]$" . tmp-mode)
auto-mode-alist))
The tmp mode is the normal text mode with one exception: If you finished
editing by pressing C-x # the buffer is killed. So Octave can delete
the file.
- If you want to run Octave in a special shell mode under Emacs
you must also add the following line to .emacs:
(require 'octave)
- For example your .emacs file should look like this:
(setq load-path (append '("h:/apps/science/octave/lisp") load-path))
(require 'octave)
(autoload 'octave-mode "octave-mode" "Enter Octave mode." t)
(setq auto-mode-alist (cons '("\\.[Mm]$" . octave-mode) auto-mode-alist))
(defun my-octave-mode-hook ()
(setq fill-column 76)
(auto-fill-mode 1))
(setq octave-mode-hook 'my-octave-mode-hook)
(autoload 'octave-tmp-mode "octave-tmp-mode" "Enter Octave's tmp mode." t)
(setq auto-mode-alist
(cons '("[Oo][Cc][Tt]-....\\.[Tt][Mm][Pp]$" . octave-tmp-mode)
auto-mode-alist))
- Dynamic Loading of C++ Functions
This port now supports the dynamic loading. Use the script MAKE-OCTFILE to
compile your scripts EVERY time you installed a new version of Octave! The
script MAKE-OCTFILE is created by INST-OCTAVE.
For example:
cd dlfcn\examples
make-octfile hello.cc
and add the path .../dlfcn/examples to Octave's LOADPATH;
start Octave and type hello (1,2,3).
You can find examples in the directories .../dlfcn/examples and
scripts/image/codecs.
- Images
Octave for OS/2 uses the excellent PM View. If you want to use a different
viewer or if your PM View is installed in directory other then
h:\apps\graphics\pmview, set the environment variable
OCTAVE_IMAGE_VIEWER. You can use the environment variable
OCTAVE_IMAGE_VIEWER_OPT for specifying command line options:
For example:
SET OCTAVE_IMAGE_VIEWER=c:\pmview\pmview.exe
SET OCTAVE_IMAGE_VIEWER_OPT=/WPos(,,,,ForAct)
For loading and saving images Octave uses now the DLFCN feature. Octave can
read and write BMP, PNM, IMG formats and write Postscript.
- MKFIFO
The mkfifo command is now supported! You can use Octave's mkfifo command
to create a named pipe for communication with another program (local or
in a LAN). There is also a utility called mkfifo, which can be used for
creating, removing, listing named pipes, you have created with mkfifo.
The names of the pipes must start with '\PIPE' or with
'/PIPE'. If you want access to a pipe on another computer in your
LAN you must prepend '\\HOSTNAME', where HOSTNAME stands for the
name of the computer.
For example:
1) Start octave.
2) Open an OS/2 window.
3) Run mkfifo \PIPE\TEST
4) Type 'echo abcdef >\PIPE\TEST' in the OS/2 window
5) In Octave execute the following commands:
fid = fopen ("/PIPE/TEST", "r");
fgets (fid)
fclose (fid);
6) Run mkfifo -d \PIPE\TEST in the OS/2 window
To speed up the execution of the first mkfifo command you can add the
following in your STARTUP.CMD:
detach [DRIVE:]\[PATH]\nmpserv --noexit
- Known Limitations, Modifikations and Bugs
- fork is not supported, use spawn instead. Compare the script
file popen2.m with the original version (popen2.org).
- dup2 has been renamed to _dup2.
- Because of an OS/2 limitation dynamic loading of C++ functions will only
work, if the length of the function name is less than 8 characters.
Dr. Klaus Gebhardt [TEAM OS/2]
Competence Center Architecture and Technology
Deutsche Börse Systems
Copyright © 1997, 1998
Klaus Gebhardt