Something went wrong on our end
-
Andreas Schenk authoredAndreas Schenk authored
ost_config.in 2.28 KiB
#!/bin/bash
#------------------------------------------------------------------------------
# This file is part of the OpenStructure project <www.openstructure.org>
#
# Copyright (C) 2008-2011 by the OpenStructure authors
#
# This library is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 3.0 of the License, or (at your option)
# any later version.
# This library 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 GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this library; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#------------------------------------------------------------------------------
# common config script
# Authors: Marco Biasini, Andreas Schenk
# Self detect important directories
export DNG_ROOT=`cd "$BIN_DIR/..";pwd`
export DNG_BINDIR="$DNG_ROOT/bin"
export DNG_LIBDIR="$DNG_ROOT/@LIBDIR@"
export DNG_INITDIR="$DNG_LIBDIR/openstructure"
#export PATH="$DNG_BINDIR:$PATH"
#export DYLD_FRAMEWORK_PATH="$BIN_LIBDIR:${DYLD_FRAMEWORK_PATH}"
#export DYLD_LIBRARY_PATH="$BIN_LIBDIR:${DYLD_LIBRARY_PATH}"
#export LD_LIBRARY_PATH="$DNG_LIBDIR:$LD_LIBRARY_PATH"
# set QT_PLUGIN_PATH PYTHONHOME and PYTHONPATH for bundle (commented except in linux bundles)
#export PYTHONHOME=$DNG_ROOT
#export PYTHONPATH=
#export QT_PLUGIN_PATH="$BIN_DIR/plugins"
# retrieve absolute path to python executable
pyexec=""
if [ -z "$DNG_ATTACH_VALGRIND" ]; then
pyexec="@PYTHON_BINARY@"
else
pyexec="valgrind --leak-check=full $pyexec"
fi
if [ ! -f "$pyexec" ]; then
echo "Error: Python executable '$pyexec' not found!"
exit
fi
set -o noglob
opts=""
for argument in "$@";do
if [ -n "$opts" ]; then
opts=$opts"#""$argument"
else
opts="$argument"
fi
done
# decide whether to start interactively or not
# interactive mode can be forced by setting -i as a iplt option
interactive=""
if [ $# == 0 ];then
interactive="-i"
else
if [ $1 == "-i" ] ;then
interactive="-i"
fi
fi
IFS="#"