0026637: Save function works incorrect in OCAF mfc sample
[occt.git] / genproj.sh
CommitLineData
c7d774c5 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";
12
13aSystem=`uname -s`
14aTarget="$1"
15anOpt2=$2
16anOpt3=$3
17anOpt4=$4
18anOpt5=$5
19if [ "$aTarget" == "" ]; then
20 aTarget="cbp"
21 if [ "$aSystem" == "Darwin" ]; then aTarget="xcd"; fi;
22fi
23
24if [ ! -e "${aScriptPath}/custom.sh" ]; then
25 tclsh "${aScriptPath}/adm/genconf.tcl"
26fi
27
28if [ ! -e "${aScriptPath}/custom.sh" ]; then
29 echo custom.sh is not created. Run the script again and generate custom.sh
30 exit 1
31fi
32source "${aScriptPath}/custom.sh"
33
34if [ -e "${aScriptPath}/env.sh" ]; then source "${aScriptPath}/env.sh"; fi
35
cb6a2fbc 36tclsh "${aScriptPath}/adm/start.tcl" genproj -path="${aScriptPath}" -target=${aTarget} $anOpt2 $anOpt3 $anOpt4 $anOpt5
c7d774c5 37
38export PATH="$anOldPath"
39export LD_LIBRARY_PATH="$anOldLd"
40export DYLD_LIBRARY_PATH="$anOldDyLd"