[FGS] Preliminary packaging

Frank Warmerdam warmerdam at pobox.com
Fri Jun 18 11:58:50 EDT 2004


Tyler Mitchell wrote:
>>For the OpenEV_FW releases, I actually setup a cover script for every
>>commandline program and python script that first set the appropriate
>>environment variables and then ran the real program/script.  We may need
>>to do the same or we may just explain to the user what they need to set.
>>I'm not sure about that yet.
> 
> 
> That certainly has been a helpful approach - but do you really want to 
> wrap everything?  It would also be good to find a way of having a tool to 
> run that exports the settings and makes them persistent so that someone 
> can run it and hack away at the command line with all capabilities.

Tyler,

I'm not convinced we want to do that.  I did it to ensure that all the
environment settings were done properly and bullet proof.  But the
alternative is to provide csh and bash versions of scripts that the user
can source to accomplish the same.   Note, it isn't terribly hard to wrap
everything.  I just use a generic wrapper script for everything.  It looks
like this:

#!/bin/sh

TARGET=$0

if [ "`basename $TARGET`" = "env_cover.sh" ] ; then
   echo "This script is not intended to be run directly."
   exit 1
fi

OPENEV_HOME=`dirname $TARGET`
OPENEV_HOME=`dirname $OPENEV_HOME`

# Setup Environment Variables for OpenEV

PROJ_LIB=$OPENEV_HOME/share/proj
GEOTIFF_CSV=$OPENEV_HOME/share/gdal
GDAL_DATA=$OPENEV_HOME/share/gdal
PYTHONHOME=${OPENEV_HOME}
PYTHONPATH=${OPENEV_HOME}/pymod:${PYTHONPATH}
LD_LIBRARY_PATH=${OPENEV_HOME}/lib:${LD_LIBRARY_PATH}
PATH=${OPENEV_HOME}/bin:$PATH
LC_NUMERIC=C

export PYTHONHOME PYTHONPATH LD_LIBRARY_PATH PATH PROJ_LIB GEOTIFF_CSV LC_NUMERIC GDAL_DATA

$OPENEV_HOME/bin/`basename $TARGET` $@

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Foss-gis-suite mailing list