0032450: Modeling Algorithms - change BRepLib_CheckCurveOnSurface & GeomLib_CheckCurv...
[occt.git] / genproj
... / ...
CommitLineData
1#!/bin/bash
2
3# Helper script to run generation of CBP/XCode projects on Linux / OS X.
4# Running it requires that Tcl should be in the PATH
5
6anOldPath="$PATH"
7anOldLd="$LD_LIBRARY_PATH"
8anOldDyLd="$DYLD_LIBRARY_PATH"
9
10# go to the script directory
11aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
12if [ ! -e "${aScriptPath}/env.sh" ]; then
13cat ${aScriptPath}/adm/templates/env.sh | sed -e '/__CASROOT__/d' > ${aScriptPath}/env.sh
14fi
15
16aSystem=`uname -s`
17aTarget="$1"
18anOpt2=$2
19anOpt3=$3
20anOpt4=$4
21anOpt5=$5
22
23if [ ! -e "${aScriptPath}/custom.sh" ]; then
24 tclsh "${aScriptPath}/adm/genconf.tcl"
25fi
26
27if [ ! -e "${aScriptPath}/custom.sh" ]; then
28 echo "Error: custom.sh is not present."
29 echo "Run the script again to generate custom.sh, or create it manually"
30 exit 1
31fi
32source "${aScriptPath}/custom.sh"
33
34if [ -e "${aScriptPath}/env.sh" ]; then source "${aScriptPath}/env.sh"; fi
35
36if [ "$aTarget" == "" ]; then aTarget=$PRJFMT; fi;
37if [ "$aTarget" == "" ]; then
38 aTarget="cbp"
39 if [ "$aSystem" == "Darwin" ]; then aTarget="xcd"; fi;
40fi
41
42cd $aScriptPath
43tclsh "./adm/start.tcl" genproj ${aTarget} -solution "OCCT" $anOpt2 $anOpt3 $anOpt4 $anOpt5
44
45export PATH="$anOldPath"
46export LD_LIBRARY_PATH="$anOldLd"
47export DYLD_LIBRARY_PATH="$anOldDyLd"