homesystemforumcontactopensgplus

prerequisites
ldownload
installation
documentation
information
changelog
feedback
roadmap

 



Installation

From Source

Short version: ./configure && make && make install.

Long version:
OpenSG uses the standard autoconf (version 2.13) method of installation.
The configure script takes the standard set of options, --prefix probably being the most important, and some OpenSG-specific ones:

  • --with-compiler=«val»: select the compiler to use. If there is only one supported compiler for your platform, it is set automatically. Call ./configure --help for the available alternatives.
  • --with-glut=«val»: define the position where to find the GLUT library. If no value is given some standard places are searched automatically.
  • --with-tif=«val»: define the position where to find the TIFF library. If no value is given some standard places are searched automatically.
  • --with-jpg=«val»: define the position where to find the JPEG library. If no value is given some standard places are searched automatically.
  • --with-stl=«val»: define the position where to find the STL library. If no value is given the system default is used.
  • --with-png=«val»: define the position where to find the PNG library. If no value is given some standard places are searched automatically.
  • --with-mng=«val»: define the position where to find the MNG library. If no value is given some standard places are searched automatically.
  • --with-freetype1=«val»: define the position where to find the Freetype1 library.
  • --with-add-incdir=«val»/--with-add-libdir=«val»: define the position where to find additional libraries needed by your setup.

configure creates a subdirectory in Builds, whose name depends on the current system, e.g. Builds/mips-sgi-irix6.5-CC, and which will contain all system-dependent files. This allows concurrent development on multiple different systems in one directory tree.

Go into this directory and call make to create the libraries. To find out which make targets are available call make help. This is possible in all directories of the system which contain a makefile.
There are different libraries that make up the whole system:

  • Base: the low-level support library. Contains elementary stuff like basic types, vectors, matrices, quaternions, bounding volumes and the OS abstractions.
  • System: the central library, containing the main scenegraph, all the nodes and higher-level objects.
  • WindowGLUT: a little library that contains the OpenSG-GLUT interface object
  • WindowX: a little library that contains the OpenSG-X interface object
  • WindowWIN32: a little library that contains the OpenSG-WIN32 interface object
  • WindowQT: a little library that contains the OpenSG-QT interface object

After the libraries are built install them by calling make install. The libraries will be installed in the directory hierarchy defined by the --prefix option given to configure, per default /usr/local. Include files will go into prefix/include/OpenSG, libs into prefix/lib/dbg or prefix/lib/opt. The osg-config script, which can be used to simplify OpenSG makefiles, goes into prefix/bin.
One useful variant is to install into the system-dependent directory in Builds by using --prefix=BUILD.

To run OpenSG programs, make sure that the directory where the libraries are installed is in your LD_LIBRARY_PATH.
For bash/ksh users do a

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:prefix/lib/{dbg,opt}

For csh/tcsh users do a

setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:prefix/lib/{dbg,opt}

while replacing prefix with your install prefix and {dbg,opt} with dbg or opt, depending on which kind of library you created.

After making the libraries you should make the tutorial examples. They are in OpenSG/tutorials. For Unix systems a simple make should do, for Windows it's probably easier to download a binary release and start with that.

As a somewhat bigger example program there's OpenSG/examples/SceneViewer. It needs QT 3.0, and it needs QTDIR to be set to directory where QT is installed. Given that, a simple make should be enough to create it.

There are also a bunch of tests that can be created in the *Test directory for each library. These are internal tests to see if the system does what it's supposed to do and not tutorials, thus they don't necessarily show the right way of doing things. Use them just if you can't find an example for what you want to do in the tutorials.

From Binary

The Windows version is easy, just put it somewhere. The example programs are in tutorials. Note that the installer registers some pathes in the environment, so if you move the directory around you either have to manually fix HKCU/Environment/PATH or run run_pathappend.bat again after you moved the directory.

The Unix versions are not much different. Just put them somewhere and go into the tutorials directory to work with it. To execute the programs you will have to add ../lib/dbg or ../lib/opt to your LD_LIBRARY_PATH, otherwise the OpenSG libraries will not be found.



For inquiries, wishes, or comments please contact info@opensg.org.
© 2003 OpenSG Forum - Last change: Mon Jul 1 16:38:16 2002
Designed by CAPCom GmbH - Maintained with WML