0027258: Configuration - generate built-in replacement for mandatory resource files IR-2016-10-27
authorski <ski@opencascade.com>
Fri, 28 Oct 2016 11:29:58 +0000 (14:29 +0300)
committerapn <apn@opencascade.com>
Fri, 28 Oct 2016 11:30:28 +0000 (14:30 +0300)
commitee5befae97566611223b30bcb6f803c2d2e6b314
tree58f9fa196891ed7175050cbd7e13675e82fbb0d1
parent30f5e1a74bc8d7b733bd64836346b2b314e5a531
0027258: Configuration - generate built-in replacement for mandatory resource files

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.
62 files changed:
CMakeLists.txt
adm/RESOURCES
adm/cmake/occt_macros.cmake
adm/cmake/occt_resources.cmake [new file with mode: 0644]
adm/cmake/vardescr.cmake
adm/genproj.tcl
adm/templates/env.bat
adm/templates/env.bat.in
adm/templates/env.sh
adm/templates/env.sh.in
adm/templates/header.in
dox/dev_guides/upgrade/upgrade.md
dox/overview/overview.md
samples/java/jniviewer/jni/Android.mk
samples/java/jniviewer/jni/OcctJni_Viewer.cxx
src/Graphic3d/Graphic3d_ShaderProgram.cxx
src/Graphic3d/Graphic3d_ShaderProgram.hxx
src/IGESData/IGESData.cxx
src/Interface/Interface_StaticStandards.cxx
src/Message/Message_MsgFile.cxx
src/Message/Message_MsgFile.hxx
src/OpenGl/OpenGl_ShaderProgram.cxx
src/OpenGl/OpenGl_View.hxx
src/OpenGl/OpenGl_View_Raytrace.cxx
src/SHMessage/FILES
src/SHMessage/SHMessage_SHAPE_us.pxx [new file with mode: 0644]
src/Shaders/FILES
src/Shaders/RaytraceBase.fs
src/Shaders/RaytraceRender.fs
src/Shaders/RaytraceSmooth.fs
src/Shaders/Shaders_DeclarationsImpl_glsl.pxx [new file with mode: 0644]
src/Shaders/Shaders_Declarations_glsl.pxx [new file with mode: 0644]
src/Shaders/Shaders_Display_fs.pxx [new file with mode: 0644]
src/Shaders/Shaders_PathtraceBase_fs.pxx [new file with mode: 0644]
src/Shaders/Shaders_RaytraceBase_fs.pxx [new file with mode: 0644]
src/Shaders/Shaders_RaytraceBase_vs.pxx [new file with mode: 0644]
src/Shaders/Shaders_RaytraceRender_fs.pxx [new file with mode: 0644]
src/Shaders/Shaders_RaytraceSmooth_fs.pxx [new file with mode: 0644]
src/ShapeExtend/ShapeExtend.cxx
src/ShapeProcess/ShapeProcess_OperLibrary.cxx
src/TObj/FILES
src/TObj/TObj_Application.cxx
src/TObj/TObj_TObj_msg.pxx [new file with mode: 0644]
src/TObjDRAW/TObjDRAW.cxx
src/Units/Units.cxx
src/Units/Units_Lexicon.cxx
src/Units/Units_Lexicon.hxx
src/Units/Units_UnitsDictionary.cxx
src/Units/Units_UnitsDictionary.hxx
src/Units/Units_UnitsLexicon.cxx
src/Units/Units_UnitsLexicon.hxx
src/UnitsAPI/FILES
src/UnitsAPI/Lexi_Expr.dat [deleted file]
src/UnitsAPI/Units.dat
src/UnitsAPI/UnitsAPI.cxx
src/UnitsAPI/UnitsAPI_Units_dat.pxx [new file with mode: 0644]
src/ViewerTest/ViewerTest_OpenGlCommands.cxx
src/XSMessage/FILES
src/XSMessage/IGES.fr [deleted file]
src/XSMessage/IGES.us [deleted file]
src/XSMessage/XSMessage_XSTEP_us.pxx [new file with mode: 0644]
src/XSMessage/XSTEP.us