Notes On Building OpenEV
Getting the Source
The current development source for OpenEV is available from CVS. The only module name currently used is openev. Detailed instructions can be found on the OpenEV - CVS page, but the short answer is the following for anonymous CVS.
% cvs -d:pserver:email@example.com:/cvsroot/openev login % cvs -z3 -d:pserver:firstname.lastname@example.org:/cvsroot/openev co -P openev
Eventually we may also prepare source tarballs.
OpenEV depends on having the following packages installed:
- OpenGL (such as Mesa-3.2)
- Gtk 1.2.x (at least 1.2.8) (www.gtk.org)
- gtkglarea-1.2.3 - Integrates OpenGL support into Gtk+.
- Python 2.1+ (www.python.org)
- pygtk-0.6.x - at least 0.6.6 and 0.6.11 is now available. (Python bindings for Gtk+.
- proj-4.4.5+ - optional - provides reprojection and datum shifting support.
- GDAL 1.2.0+ - Raster access library.
To build GDAL:
$ wget http://www.gdal.org/dl/gdal-1.2.2.tar.gz $ tar xzvf gdal-1.2.2.tar.gz $ mv gdal-1.2.2 gdal $ cd gdal $ configure $ make
Ensure that GDAL is located "parallel" to the openev directory, and that it is built prior to configuring OpenEV.
Building OpenEV (Unix)
Once all the required components are build and installed it should be possible to build OpenEV with a configure, and make in the openev directory. The ../openev/pymod directory should be added to the PYTHONPATH, as well as the ../gdal/pymod directory. The ../gdal directory should be in LD_LIBRARY_PATH so that libgdal.1.1.so can be loaded. For instance, assuming that openev and gdal are under the users home directory they might do the following:
% cd ~/openev % configure % make % setenv PYTHONPATH ~/gdal/pymod:~/openev/pymod % setenv LD_LIBRARY_PATH ~/gdal % pymod/openev.py utm.tif &
Note that OpenEV can read any GDAL supported file format, including GeoTIFF. The utm11-27.tif file is a small, georeferenced greyscale GeoTIFF image suitable for testing.
Building OpenEV (Windows)
On Windows OpenEV is built with MS VC++ 6.x. Download, and install the Windows port of Python normally. Download and build GDAL according to the GDAL instructions for Windows. Download and build PROJ.4 according to the PROJ.4 instructions for Windows.
Due to the relative immaturity of GTK, PyGtk, and GtkGLArea on the Windows platform, we have created our own port closely based on the general windows ports of these packages. The source tree for these can be downloaded from CVS as the pkgsrc package. This produces a 'pkgsrc' source tree that would normally be unpacked parallel to the openev source directory.
Compiling OpenEV with newer versions of MS VC++, such as .NET or 2005 are not recommended. While it will compile fine, when run the program will display a blank (black) window.
% cvs -d:pserver:anonymous@cvs.OpenEV.sourceforge.net:/cvsroot/openev login % cvs -z3 -d:pserver:anonymous@cvs.OpenEV.sourceforge.net:/cvsroot/openev co pkgsrc
It is built with the command nmake /f makefile.vc install in the pkgsrc directory, but first edit the pkgsrc\nmake.opt file, setting the options appropriately:
NM_BIN_DIR = d:\bin NM_PYMOD_DIR = c:\usr\pymod NM_PY_DIR = c:\Python NM_OPTFLAGS = -MD -Ox NM_GTK_DIR = $(NM_ROOT)\gtk+ NM_GLIB_DIR = $(NM_ROOT)\glib NM_INTL_DIR = $(NM_ROOT)\intl NM_PTHREADS_DIR = $(NM_ROOT)\pthreads NM_GTKGLAREA_DIR = $(NM_ROOT)\gtkglarea
- NM_BIN_DIR: Where do you want to install dll's? Should be somewhere in your path, and is normally the same place you are installing all the OpenEV, GDAL and PROJ.4 DLLs.
- NM_PYMOD_DIR: Where should Python .py files, and related DLLs be installed? Normally the same place the GDAL and OpenEV stuff is installed.
- NM_PY_DIR: Where is your python tree? Needed to find include files during build.
- NM_OPTFLAGS: Don't change these! The GTK components seems very sensitive to changes, and I can't get anything to work without these exact options.
The rest should normally be left unchanged, and are relative paths within the pkgsrc tree.
Once the pkgsrc stuff (and GDAL, and PROJ.4) are successfully built, you need to build OpenEV itself. OpenEV source can be extracted from CVS, or come from any other source. The openev directory should have an nmake.opt file which needs to be modified to point to the GDAL and pkgsrc trees. Once that is done, it should be possible to build and install OpenEV with the command nmake /f makefile.vc install.