mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-04 18:06:22 +03:00
Possibility to customize layout of installation of OCCT is introduced by: - variable INSTALL_DIR_LAYOUT - select one of the two predefined layouts: either Windows (classic OCCT layout) or Unix (Linux standard) - variables INSTALL_DIR_* (BIN, LIB, INCLUDE, RESOURCE, DOC, TESTS, SCRIPT, SAMPLES, DATA) - specify locations of relevant components - variable INSTALL_DIR_WITH_VERSION (bool) - specifies whether full version of OCCT should be used in paths in Unix layout Files LICENSE_LGPL_21.txt and OCCT_LGPL_EXCEPTION.txt are always installed. Environment is extended to support non-default layouts. For that, environment variables "CSF_OCCT*Path" are defined, corresponding to CMake variables INSTALL_DIR_* described above. Visual Studio environment, DRAW, tests, samples are amended to use these variables instead of (or as alternative to) CASROOT. Settings of Products-specific vars are removed from environment scripts. File genconf.bat was corrected to avoid error message for the case when path to TCL contains spaces. Product name in rc files changed to "Open CASCADE Technology".
133 lines
4.0 KiB
Bash
133 lines
4.0 KiB
Bash
#!/bin/bash
|
|
|
|
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
|
|
|
|
# ----- for compatability with external application using CASROOT -----
|
|
if [ "${CASROOT}" == "" ]; then
|
|
export CASROOT="${aScriptPath}"
|
|
fi
|
|
|
|
# Read script arguments
|
|
shopt -s nocasematch
|
|
export CASDEB="";
|
|
if [[ "$1" == "debug" ]]; then export CASDEB="d"; fi
|
|
if [[ "$1" == "d" ]]; then export CASDEB="d"; fi
|
|
if [[ "$1" == "relwithdeb" ]]; then export CASDEB="i"; fi
|
|
if [[ "$1" == "i" ]]; then export CASDEB="i"; fi
|
|
shopt -u nocasematch
|
|
|
|
# ----- Set path to 3rd party and OCCT libraries -----
|
|
anArch=`uname -m`
|
|
if [ "$anArch" != "x86_64" ] && [ "$anArch" != "ia64" ]; then
|
|
export ARCH="32";
|
|
else
|
|
export ARCH="64";
|
|
fi
|
|
|
|
aSystem=`uname -s`
|
|
if [ "$aSystem" == "Darwin" ]; then
|
|
export WOKSTATION="mac";
|
|
export ARCH="64";
|
|
else
|
|
export WOKSTATION="lin";
|
|
fi
|
|
|
|
# ----- Set local settings -----
|
|
if [ -e "${aScriptPath}/custom.sh" ]; then
|
|
source "${aScriptPath}/custom.sh" "${CASDEB}" "${ARCH}"
|
|
fi
|
|
|
|
THRDPARTY_PATH=""
|
|
if [ "$TCL_DIR" != "" ]; then
|
|
THRDPARTY_PATH="${TCL_DIR}:${THRDPARTY_PATH}"
|
|
fi
|
|
|
|
if [ "$TK_DIR" != "" ]; then
|
|
THRDPARTY_PATH="${TK_DIR}:${THRDPARTY_PATH}"
|
|
fi
|
|
|
|
if [ "$FREETYPE_DIR" != "" ]; then
|
|
THRDPARTY_PATH="${FREETYPE_DIR}:${THRDPARTY_PATH}"
|
|
fi
|
|
|
|
if [ "$FREEIMAGE_DIR" != "" ]; then
|
|
THRDPARTY_PATH="${FREEIMAGE_DIR}:${THRDPARTY_PATH}"
|
|
fi
|
|
|
|
if [ "$GL2PS_DIR" != "" ]; then
|
|
THRDPARTY_PATH="${GL2PS_DIR}:${THRDPARTY_PATH}"
|
|
fi
|
|
|
|
if [ "$TBB_DIR" != "" ]; then
|
|
THRDPARTY_PATH="${TBB_DIR}:${THRDPARTY_PATH}"
|
|
fi
|
|
|
|
if [ "$VTK_DIR" != "" ]; then
|
|
THRDPARTY_PATH="${VTK_DIR}:${THRDPARTY_PATH}"
|
|
fi
|
|
|
|
if [ "$TK_DIR" != "$TCL_DIR" ]; then
|
|
if [ "$TK_DIR" != "" ]; then
|
|
export TK_LIBRARY="${TK_DIR}/../lib/tk${TK_VERSION_WITH_DOT}"
|
|
fi
|
|
if [ "$TCL_DIR" != "" ]; then
|
|
export TCL_LIBRARY="${TCL_DIR}/../lib/tcl${TCL_VERSION_WITH_DOT}"
|
|
fi
|
|
fi
|
|
|
|
if [ "$LD_LIBRARY_PATH" != "" ]; then
|
|
export LD_LIBRARY_PATH="${THRDPARTY_PATH}:${LD_LIBRARY_PATH}"
|
|
else
|
|
export LD_LIBRARY_PATH="${THRDPARTY_PATH}"
|
|
fi
|
|
|
|
if [ "$CSF_OCCTBinPath" != "" ]; then
|
|
export PATH="${CSF_OCCTBinPath}:${PATH}"
|
|
fi
|
|
|
|
if [ "$CSF_OCCTLibPath" != "" ]; then
|
|
if [ "$LD_LIBRARY_PATH" != "" ]; then
|
|
export LD_LIBRARY_PATH="${CSF_OCCTLibPath}:${LD_LIBRARY_PATH}"
|
|
else
|
|
export LD_LIBRARY_PATH="${CSF_OCCTLibPath}"
|
|
fi
|
|
fi
|
|
|
|
if [ "$WOKSTATION" == "mac" ]; then
|
|
if [ "$DYLD_LIBRARY_PATH" != "" ]; then
|
|
export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${DYLD_LIBRARY_PATH}"
|
|
else
|
|
export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
|
|
fi
|
|
fi
|
|
|
|
# ----- Set envoronment variables used by OCCT -----
|
|
export CSF_LANGUAGE=us
|
|
export MMGT_CLEAR=1
|
|
export CSF_SHMessage="${CSF_OCCTResourcePath}/SHMessage"
|
|
export CSF_MDTVTexturesDirectory="${CSF_OCCTResourcePath}/Textures"
|
|
export CSF_ShadersDirectory="${CSF_OCCTResourcePath}/Shaders"
|
|
export CSF_XSMessage="${CSF_OCCTResourcePath}/XSMessage"
|
|
export CSF_TObjMessage="${CSF_OCCTResourcePath}/TObj"
|
|
export CSF_StandardDefaults="${CSF_OCCTResourcePath}/StdResource"
|
|
export CSF_PluginDefaults="${CSF_OCCTResourcePath}/StdResource"
|
|
export CSF_XCAFDefaults="${CSF_OCCTResourcePath}/StdResource"
|
|
export CSF_TObjDefaults="${CSF_OCCTResourcePath}/StdResource"
|
|
export CSF_StandardLiteDefaults="${CSF_OCCTResourcePath}/StdResource"
|
|
export CSF_UnitsLexicon="${CSF_OCCTResourcePath}/UnitsAPI/Lexi_Expr.dat"
|
|
export CSF_UnitsDefinition="${CSF_OCCTResourcePath}/UnitsAPI/Units.dat"
|
|
export CSF_IGESDefaults="${CSF_OCCTResourcePath}/XSTEPResource"
|
|
export CSF_STEPDefaults="${CSF_OCCTResourcePath}/XSTEPResource"
|
|
export CSF_XmlOcafResource="${CSF_OCCTResourcePath}/XmlOcafResource"
|
|
export CSF_MIGRATION_TYPES="${CSF_OCCTResourcePath}/StdResource/MigrationSheet.txt"
|
|
|
|
# Draw Harness special stuff
|
|
if [ -e "${CSF_OCCTResourcePath}/DrawResources" ]; then
|
|
export DRAWHOME="${CSF_OCCTResourcePath}/DrawResources"
|
|
export CSF_DrawPluginDefaults="${CSF_OCCTResourcePath}/DrawResources"
|
|
|
|
if [ -e "${CSF_OCCTResourcePath}/DrawResources/DrawDefault" ]; then
|
|
export DRAWDEFAULT="${CSF_OCCTResourcePath}/DrawResources/DrawDefault"
|
|
fi
|
|
fi
|