1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-01 17:36:21 +03:00
occt/genproj
abv 72c3745808 0027193: Describe building OCCT with genproj tool
Description of building OCCT with WOK and automake scripts is removed from documentation.
Use of genproj utility is described in pages on building with MSVC, Code::Blocks, and XCode projects.

New script genconf allows starting configuration GUI explicitly; dialog is slightly revised.
Script genproj.sh is renamed to genproj; permissions for scripts are corrected for Linux.

Script env.bat does not set anymore environment required for Products.
2016-03-04 14:44:22 +03:00

45 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# Helper script to run generation of CBP/XCode projects on Linux / OS X.
# Running it requires that Tcl should be in the PATH
anOldPath="$PATH"
anOldLd="$LD_LIBRARY_PATH"
anOldDyLd="$DYLD_LIBRARY_PATH"
# go to the script directory
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
if [ ! -e "${aScriptPath}/env.sh" ]; then
cat ${aScriptPath}/adm/templates/env.sh | sed -e '/__CASROOT__/d' > ${aScriptPath}/env.sh
fi
aSystem=`uname -s`
aTarget="$1"
anOpt2=$2
anOpt3=$3
anOpt4=$4
anOpt5=$5
if [ "$aTarget" == "" ]; then
aTarget="cbp"
if [ "$aSystem" == "Darwin" ]; then aTarget="xcd"; fi;
fi
if [ ! -e "${aScriptPath}/custom.sh" ]; then
tclsh "${aScriptPath}/adm/genconf.tcl"
fi
if [ ! -e "${aScriptPath}/custom.sh" ]; then
echo "Error: custom.sh is not present."
echo "Run the script again to generate custom.sh, or create it manually"
exit 1
fi
source "${aScriptPath}/custom.sh"
if [ -e "${aScriptPath}/env.sh" ]; then source "${aScriptPath}/env.sh"; fi
tclsh "${aScriptPath}/adm/start.tcl" genproj -path="${aScriptPath}" -target=${aTarget} $anOpt2 $anOpt3 $anOpt4 $anOpt5
export PATH="$anOldPath"
export LD_LIBRARY_PATH="$anOldLd"
export DYLD_LIBRARY_PATH="$anOldDyLd"