mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
Generation of header files from resource files was added to CMake and genproj procedures. Message_MsgFile has been extended with new method ::LoadFromString() for loading messages from embedded resources. Message_MsgFile::LoadFromString() is now a preferred way for loading message resources by application as alternative to environment variables. TObje/TObj.msg is now embedded into TObj_Application.cxx. TObj_Application now loads its global messages on instantiation of the first class instance. UnitsAPI/Lexi_Expr.dat now completely embedded into Units_Lexicon.cxx. UnitsAPI/Units.dat now embedded into Units_UnitsDictionary.cxx but can be regenerated from resource file. The definition of the following units have been removed: benne à charbon, calorie (diététique). Unused message files XSMessage/IGES.us and IGES.fr have been removed. Related code IGESData.cxx has been removed as well. XSMessage/XSTEP.us is now embedded into Interface_StaticStandards.cxx and used for fallback initialization in case when file resources defined by CSF_XSMessage environment variable are missing. SHMessage/SHAPE.us is now embedded into ShapeExtend.cxx and used for fallback initialization in case when file resources defined by CSF_XHMessage environment variable are missing. Duplicating code has been removed from ShapeProcess_OperLibrary.cxx. Shaders/Declarations.glsl and Shaders/DeclarationsImpl.glsl are now embedded into OpenGl_ShaderProgram.cxx. CSF_ShadersDirectory is no more required for using OCCT 3D Viewer. Ray-Tracing GLSL programs from Shaders are now embedded into OpenGl_View_Raytrace.cxx. File resources are still used instead of embedded programs when CSF_ShadersDirectory is defined, but this functionality is intended for OCCT development. Enumeration Graphic3d_ShaderProgram::ShaderName_Phong demonstrating custom GLSL program usage has been removed.
131 lines
3.8 KiB
Bash
131 lines
3.8 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_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
|