documentation updated
unrelated changes: Unused unit OpenCL removed from UDLIST All articles revised README revised comments are allowed in FILES.txt Add gendoc.sh for Linux Added option -s to set search engine of the HTML documents Added 3rdparty_building docs for different platforms help message removed from bat&sh scripts (left within tcl script) tableofcontents added for all huge articles; gendoc.bat doesn't change PATH variable jpgs converted to pngs and unused pngs removed logo displaying of pdf files fixed Automatic detection of OCCT version number added to occtdoc.tcl OCCT version within pdfs is got from Standard_Version.hxx; copyright changed pdf generation process removes latex dir now GIF images converted to PNG in technical_overview; references fixed (incorrect reference to wok and cdl didn't touch; redundant latex option removed Tutorial moved from Overview and made top level page LICENSE.md moved from dox/overview to dox folder Section related to OCCT building refactored and simplified. WOK and CDL explicitly declared as deprecated.
303
dox/dev_guides/building/3rdparty/3rdparty_linux.md
vendored
Normal file
@@ -0,0 +1,303 @@
|
||||
Building 3rd-party libraries on Linux {#dev_guides__building_3rdparty_linux}
|
||||
============================================
|
||||
@tableofcontents
|
||||
|
||||
@section dev_guides__building_3rdparty_linux_1 Introduction
|
||||
|
||||
This document presents additional guidelines for building third-party
|
||||
products used by Open CASCADE Technology and samples on Linux platform.
|
||||
|
||||
The links for downloading the third-party products are available on the web site
|
||||
of OPEN CASCADE SAS at
|
||||
http://www.opencascade.org/getocc/require/.
|
||||
|
||||
There are two types of third-party products, which are necessary to build OCCT:
|
||||
|
||||
* Mandatory products: Tcl 8.5, Tk 8.5, FreeType 2.4.10
|
||||
* Optional products: TBB 3.x or 4.x, gl2ps 1.3.5, FreeImage 3.14.1
|
||||
|
||||
@section dev_guides__building_3rdparty_linux_2 Building Mandatory Third-party Products
|
||||
|
||||
@subsection dev_guides__building_3rdparty_linux_2_1 Tcl/Tk 8.5
|
||||
|
||||
Tcl/Tk is required for DRAW test harness. Version 8.5 or 8.6 can be used with OCCT.
|
||||
|
||||
@subsubsection dev_guides__building_3rdparty_linux_2_1_1 Installation from binaries
|
||||
|
||||
It is possible to download ready-to-install binaries from
|
||||
http://www.activestate.com/activetcl/downloads
|
||||
|
||||
* 1. Download the binaries archive and unpack them to some TCL_SRC_DIR.
|
||||
* 2. Enter the directory TCL_SRC_DIR.
|
||||
|
||||
@verbatim
|
||||
cd TCL_SRC_DIR
|
||||
@endverbatim
|
||||
|
||||
* 3. Run the install command
|
||||
|
||||
@verbatim
|
||||
install.sh
|
||||
@endverbatim
|
||||
|
||||
and follow instructions.
|
||||
|
||||
@subsubsection dev_guides__building_3rdparty_linux_2_1_2 Installation from sources: Tcl 8.5
|
||||
|
||||
Download the necessary archive from http://www.tcl.tk/software/tcltk/download.html and unpack it.
|
||||
|
||||
* 1. Enter the unix sub-directory of the directory where the source files of Tcl are located (TCL_SRC_DIR).
|
||||
|
||||
@verbatim
|
||||
cd TCL_SRC_DIR/unix
|
||||
@endverbatim
|
||||
|
||||
* 2. Run the configure command
|
||||
|
||||
@verbatim
|
||||
configure --enable-gcc --enable-shared --enable-threads --prefix=TCL_INSTALL_DIR
|
||||
@endverbatim
|
||||
|
||||
For a 64 bit platform also add --enable-64bit option to the command line.
|
||||
|
||||
* 3. If the configure command has finished successfully, start the building process
|
||||
|
||||
@verbatim
|
||||
make
|
||||
@endverbatim
|
||||
|
||||
* 4. If building is finished successfully, start the installation of Tcl.
|
||||
All binary and service files of the product will be copied to the directory defined by TCL_INSTALL_DIR
|
||||
|
||||
@verbatim
|
||||
make install
|
||||
@endverbatim
|
||||
|
||||
@subsubsection dev_guides__building_3rdparty_linux_2_1_3 Installation from sources: Tk 8.5
|
||||
|
||||
Download the necessary archive from http://www.tcl.tk/software/tcltk/download.html and unpack it.
|
||||
|
||||
* 1. Enter the unix sub-directory of the directory where the source files of Tk are located (TK_SRC_DIR).
|
||||
|
||||
@verbatim
|
||||
cd TK_SRC_DIR/unix
|
||||
@endverbatim
|
||||
|
||||
* 2. Run the configure command, where TCL_LIB_DIR is TCL_INSTALL_DIR/lib
|
||||
|
||||
@verbatim
|
||||
configure --enable-gcc --enable-shared --enable-threads --with-tcl=TCL_LIB_DIR --prefix=TK_INSTALL_DIR
|
||||
@endverbatim
|
||||
|
||||
where TCL_LIB_DIR is TCL_INSTALL_DIR/lib
|
||||
|
||||
For a 64 bit platform also add --enable-64bit option to the command line.
|
||||
|
||||
* 3. If the configure command has finished successfully, start the building process
|
||||
|
||||
@verbatim
|
||||
make
|
||||
@endverbatim
|
||||
|
||||
* 4. If building has finished successfully, start the installation of Tk.
|
||||
All binary and service files of the product will be copied
|
||||
to the directory defined by TK_INSTALL_DIR (usually TK_INSTALL_DIR is TCL_INSTALL_DIR)
|
||||
|
||||
@verbatim
|
||||
make install
|
||||
@endverbatim
|
||||
|
||||
@subsection dev_guides__building_3rdparty_linux_2_2 FreeType 2.4.10
|
||||
|
||||
FreeType is required for display of text in 3D viewer.
|
||||
Download the necessary archive from http://sourceforge.net/projects/freetype/files/ and unpack it.
|
||||
|
||||
* 1. Enter the directory where the source files of FreeType are located (FREETYPE_SRC_DIR).
|
||||
|
||||
@verbatim
|
||||
cd FREETYPE_SRC_DIR
|
||||
@endverbatim
|
||||
|
||||
* 2. Run the configure command
|
||||
|
||||
@verbatim
|
||||
configure --prefix=FREETYPE_INSTALL_DIR
|
||||
@endverbatim
|
||||
|
||||
For a 64 bit platform also add CFLAGS='-m64 -fPIC' CPPFLAGS='-m64 -fPIC' option to the command line.
|
||||
|
||||
* 3. If the configure command has finished successfully, start the building process
|
||||
|
||||
@verbatim
|
||||
make
|
||||
@endverbatim
|
||||
|
||||
* 4. If building has finished successfully, start the installation of FreeType.
|
||||
All binary and service files of the product will be copied to the directory defined by FREETYPE_INSTALL_DIR
|
||||
|
||||
@verbatim
|
||||
make install
|
||||
@endverbatim
|
||||
|
||||
@section dev_guides__building_3rdparty_linux_3 Building Optional Third-party Products
|
||||
|
||||
@subsection dev_guides__building_3rdparty_linux_3_1 TBB 3.x or 4.x
|
||||
|
||||
This third-party product is installed with binaries from the archive that can be downloaded from http://threadingbuildingblocks.org.
|
||||
Go to \"Downloads page\", find the release version you need (e.g. tbb30_018oss) and pick the archive for Linux platform.
|
||||
To install, unpack the downloaded archive of TBB 3.0 product (*tbb30_018oss_lin.tgz*).
|
||||
|
||||
@subsection dev_guides__building_3rdparty_linux_3_2 gl2ps 1.3.5
|
||||
|
||||
Download the necessary archive from http://geuz.org/gl2ps/ and unpack it.
|
||||
|
||||
* 1. Install or build cmake product from source file.
|
||||
* 2. Start cmake in GUI mode with the directory where the source files of gl2ps are located:
|
||||
@verbatim
|
||||
ccmake GL2PS_SRC_DIR
|
||||
@endverbatim
|
||||
* 2.1. Press [c] to make the initial configuration
|
||||
* 2.2. Define the necessary options CMAKE_INSTALL_PREFIX
|
||||
* 2.3. Press [c] to make the final configuration
|
||||
* 2.4. Press [g] to generate Makefile and exit
|
||||
|
||||
or just run the following command:
|
||||
|
||||
@verbatim
|
||||
cmake –DCMAKE_INSTALL_PREFIX=GL2PS_INSTALL_DIR –DCMAKE_BUILD_TYPE=Release
|
||||
@endverbatim
|
||||
|
||||
* 3. Start building of gl2ps
|
||||
|
||||
@verbatim
|
||||
make
|
||||
@endverbatim
|
||||
|
||||
* 4. Start the installation of gl2ps. Binaries will be installed according to the CMAKE_INSTALL_PREFIX option
|
||||
|
||||
@verbatim
|
||||
make install
|
||||
@endverbatim
|
||||
|
||||
@subsection dev_guides__building_3rdparty_linux_3_3 FreeImage 3.14.1
|
||||
|
||||
Download the necessary archive from http://sourceforge.net/projects/freeimage/files/Source%20Distribution/
|
||||
and unpack it. The directory with unpacked sources is further referred to as FREEIMAGE_SRC_DIR.
|
||||
|
||||
* 1. Modify FREEIMAGE_SRC_DIR/Source/OpenEXR/Imath/ImathMatrix.h:
|
||||
In line 60 insert the following:
|
||||
|
||||
@verbatim
|
||||
#include string.h
|
||||
@endverbatim
|
||||
|
||||
* 2. Enter the directory where the source files of FreeImage are located (FREEIMAGE_SRC_DIR).
|
||||
|
||||
@verbatim
|
||||
cd FREEIMAGE_SRC_DIR
|
||||
@endverbatim
|
||||
|
||||
* 3. Run the building process
|
||||
|
||||
@verbatim
|
||||
make
|
||||
@endverbatim
|
||||
|
||||
* 4. Run the installation process
|
||||
* 4.1. If you have permissions to write to /usr/include and /usr/lib directories then run the following command:
|
||||
@verbatim
|
||||
make install
|
||||
@endverbatim
|
||||
* 4.2. If you don’t have permissions to write to /usr/include and
|
||||
/usr/lib directories then you need to modify the file FREEIMAGE_SRC_DIR/Makefile.gnu:
|
||||
|
||||
Change lines 7-9 from:
|
||||
|
||||
@verbatim
|
||||
DESTDIR ?= /
|
||||
INCDIR ?= $(DESTDIR)/usr/include
|
||||
INSTALLDIR ?= $(DESTDIR)/usr/lib
|
||||
@endverbatim
|
||||
|
||||
to:
|
||||
|
||||
@verbatim
|
||||
DESTDIR ?= $(DESTDIR)
|
||||
INCDIR ?= $(DESTDIR)/include
|
||||
INSTALLDIR ?= $(DESTDIR)/lib
|
||||
@endverbatim
|
||||
|
||||
Change lines 65-67 from:
|
||||
|
||||
@verbatim
|
||||
install -m 644 -o root -g root $(HEADER) $(INCDIR)
|
||||
install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
|
||||
install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
|
||||
@endverbatim
|
||||
|
||||
to:
|
||||
|
||||
@verbatim
|
||||
install -m 755 $(HEADER) $(INCDIR)
|
||||
install -m 755 $(STATICLIB) $(INSTALLDIR)
|
||||
install -m 755 $(SHAREDLIB) $(INSTALLDIR)
|
||||
@endverbatim
|
||||
|
||||
Change line 70 from:
|
||||
|
||||
@verbatim
|
||||
ldconfig
|
||||
@endverbatim
|
||||
|
||||
to:
|
||||
|
||||
@verbatim
|
||||
\#ldconfig
|
||||
@endverbatim
|
||||
|
||||
Then run the installation process by the following command:
|
||||
|
||||
@verbatim
|
||||
make DESTDIR=FREEIMAGE_INSTALL_DIR install
|
||||
@endverbatim
|
||||
|
||||
* 5. Clean the temporary files
|
||||
|
||||
@verbatim
|
||||
make clean
|
||||
@endverbatim
|
||||
|
||||
@section dev_guides__building_3rdparty_linux_4 Installation From Official Repositories
|
||||
|
||||
@subsection dev_guides__building_3rdparty_linux_4_1 Debian-based distributives
|
||||
|
||||
All 3rd-party products required for building of OCCT could be installed
|
||||
from official repositories. You may install them from console using apt-get utility:
|
||||
|
||||
@verbatim
|
||||
sudo apt-get install \
|
||||
tcllib tklib tcl-dev tk-dev \
|
||||
libfreetype-dev \
|
||||
libxt-dev libxmu-dev \
|
||||
libgl1-mesa-dev \
|
||||
libfreeimage-dev \
|
||||
libtbb-dev \
|
||||
libgl2ps-dev
|
||||
@endverbatim
|
||||
|
||||
To launch WOK-prebuilt binaries you need install C shell and 32-bit libraries on x86_64 distributives:
|
||||
|
||||
@verbatim
|
||||
sudo apt-get install \
|
||||
csh \
|
||||
libstdc++5:i386 libxt6:i386
|
||||
@endverbatim
|
||||
|
||||
Any compliant C++ compiler is required for building anyway:
|
||||
|
||||
@verbatim
|
||||
sudo apt-get install \
|
||||
g++ \
|
||||
@endverbatim
|
||||
|
||||
@see http://www.opencascade.org for details
|
269
dox/dev_guides/building/3rdparty/3rdparty_osx.md
vendored
Normal file
@@ -0,0 +1,269 @@
|
||||
Building 3rd-party libraries on MacOS X {#dev_guides__building_3rdparty_osx}
|
||||
==============================================
|
||||
@tableofcontents
|
||||
|
||||
@section dev_guides__building_3rdparty_osx_1 Introduction
|
||||
|
||||
This document presents additional guidelines for building third-party products
|
||||
used by Open CASCADE Technology and samples on Mac OS X platform (10.6.4 and later).
|
||||
|
||||
The links for downloading the third-party products are available
|
||||
on the web site of OPEN CASCADE SAS at
|
||||
http://www.opencascade.org/getocc/require/</a>.
|
||||
|
||||
There are two types of third-party products, which are necessary to build OCCT:
|
||||
|
||||
* Mandatory products: Tcl 8.5, Tk 8.5, FreeType 2.4.10
|
||||
* Optional products: TBB 3.x or 4.x, gl2ps 1.3.5, FreeImage 3.14.1 or 3.15.x
|
||||
|
||||
@section dev_guides__building_3rdparty_osx_2 Building Mandatory Third-party Products
|
||||
|
||||
@subsection dev_guides__building_3rdparty_osx_2_1 Tcl/Tk 8.5
|
||||
|
||||
Tcl/Tk is required for DRAW test harness. Version 8.5 or 8.6 can be used with OCCT.
|
||||
|
||||
@subsubsection dev_guides__building_3rdparty_osx_2_1_1 Installation from binaries
|
||||
|
||||
It is possible to download ready-to-install binaries from
|
||||
http://www.activestate.com/activetcl/downloads
|
||||
|
||||
* 1. Download the disk image to some TCL_DOWNLOAD_DIR.
|
||||
* 2. Open in Finder the directory TCL_DOWNLOAD_DIR.
|
||||
* 3. Open disk image and follow instructions.
|
||||
|
||||
@subsubsection dev_guides__building_3rdparty_osx_2_1_2 Installation from sources: Tcl 8.5
|
||||
|
||||
Download the necessary archive from http://www.tcl.tk/software/tcltk/download.html and unpack it.
|
||||
|
||||
* 1. Enter the macosx sub-directory of the directory where the source files of Tcl are located (TCL_SRC_DIR).
|
||||
|
||||
@verbatim
|
||||
cd TCL_SRC_DIR/macosx
|
||||
@endverbatim
|
||||
|
||||
* 2. Run the configure command
|
||||
|
||||
@verbatim
|
||||
configure --enable-gcc --enable-shared --enable-threads --prefix=TCL_INSTALL_DIR
|
||||
@endverbatim
|
||||
|
||||
For a 64 bit platform also add --enable-64bit option to the command line.
|
||||
|
||||
* 3. If the configure command has finished successfully, start the building process
|
||||
|
||||
@verbatim
|
||||
make
|
||||
@endverbatim
|
||||
|
||||
* 4. If building is finished successfully, start the installation of Tcl.
|
||||
All binary and service files of the product will be copied to the directory defined by TCL_INSTALL_DIR
|
||||
|
||||
@verbatim
|
||||
make install
|
||||
@endverbatim
|
||||
|
||||
@subsubsection dev_guides__building_3rdparty_osx_2_1_3 Installation from sources: Tk 8.5
|
||||
|
||||
Download the necessary archive from http://www.tcl.tk/software/tcltk/download.html and unpack it.
|
||||
|
||||
* 1. Enter the macosx sub-directory of the directory where the source files of Tk are located (TK_SRC_DIR).
|
||||
|
||||
@verbatim
|
||||
cd TK_SRC_DIR/macosx
|
||||
@endverbatim
|
||||
|
||||
* 2. Run the configure command, where TCL_LIB_DIR is TCL_INSTALL_DIR/lib
|
||||
|
||||
@verbatim
|
||||
configure --enable-gcc --enable-shared --enable-threads --with-tcl=TCL_LIB_DIR --prefix=TK_INSTALL_DIR
|
||||
@endverbatim
|
||||
|
||||
where TCL_LIB_DIR is TCL_INSTALL_DIR/lib. For a 64 bit platform also add --enable-64bit option to the command line.
|
||||
|
||||
* 3. If the configure command has finished successfully, start the building process
|
||||
|
||||
@verbatim
|
||||
make
|
||||
@endverbatim
|
||||
|
||||
* 4. If building has finished successfully, start the installation of Tk.
|
||||
All binary and service files of the product will be copied to the directory
|
||||
defined by TK_INSTALL_DIR (usually TK_INSTALL_DIR is TCL_INSTALL_DIR)
|
||||
|
||||
@verbatim
|
||||
make install
|
||||
@endverbatim
|
||||
|
||||
@subsection dev_guides__building_3rdparty_osx_2_2 FreeType 2.4.10
|
||||
|
||||
FreeType is required for display of text in 3D viewer.
|
||||
|
||||
Download the necessary archive from http://sourceforge.net/projects/freetype/files/ and unpack it.
|
||||
|
||||
* 1. Enter the directory where the source files of FreeType are located (FREETYPE_SRC_DIR).
|
||||
|
||||
@verbatim
|
||||
cd FREETYPE_SRC_DIR
|
||||
@endverbatim
|
||||
|
||||
* 2. Run the configure command
|
||||
|
||||
@verbatim
|
||||
configure --prefix=FREETYPE_INSTALL_DIR
|
||||
@endverbatim
|
||||
|
||||
For a 64 bit platform also add CFLAGS='-m64 -fPIC' CPPFLAGS='-m64 -fPIC' option to the command line.
|
||||
|
||||
* 3. If the configure command has finished successfully, start the building process
|
||||
|
||||
@verbatim
|
||||
make
|
||||
@endverbatim
|
||||
|
||||
* 4. If building has finished successfully, start the installation of FreeType.
|
||||
All binary and service files of the product will be copied to the directory defined by FREETYPE_INSTALL_DIR
|
||||
|
||||
@verbatim
|
||||
make install
|
||||
@endverbatim
|
||||
|
||||
@section dev_guides__building_3rdparty_osx_3 Building Optional Third-party Products
|
||||
|
||||
@subsection dev_guides__building_3rdparty_osx_3_1 TBB 3.x or 4.x
|
||||
|
||||
This third-party product is installed with binaries from the archive
|
||||
that can be downloaded from http://threadingbuildingblocks.org/.
|
||||
Go to \"Downloads / Commercial Aligned Release\", find the release version you need (e.g. tbb30_018oss)
|
||||
and pick the archive for Mac OS X platform.
|
||||
To install, unpack the downloaded archive of TBB 3.0 product (*tbb30_018oss_osx.tgz*).
|
||||
|
||||
@subsection dev_guides__building_3rdparty_osx_3_2 gl2ps 1.3.5
|
||||
|
||||
Download the necessary archive from http://geuz.org/gl2ps/ and unpack it.
|
||||
|
||||
* 1. Install or build cmake product from source file.
|
||||
|
||||
* 2. Start cmake in GUI mode with the directory where the source files of fl2ps are located
|
||||
@verbatim
|
||||
ccmake GL2PS_SRC_DIR
|
||||
@endverbatim
|
||||
* 2.1. Press [c] to make the initial configuration
|
||||
* 2.2. Define the necessary options CMAKE_INSTALL_PREFIX
|
||||
* 2.3. Press [c] to make the final configuration
|
||||
* 2.4. Press [g] to generate Makefile and exit
|
||||
|
||||
or just run the following command:
|
||||
|
||||
@verbatim
|
||||
cmake –DCMAKE_INSTALL_PREFIX=GL2PS_INSTALL_DIR –DCMAKE_BUILD_TYPE=Release
|
||||
@endverbatim
|
||||
|
||||
* 3. Start building of gl2ps
|
||||
|
||||
@verbatim
|
||||
make
|
||||
@endverbatim
|
||||
|
||||
* 4. Start the installation of gl2ps. Binaries will be installed according to the CMAKE_INSTALL_PREFIX option
|
||||
|
||||
@verbatim
|
||||
make install
|
||||
@endverbatim
|
||||
|
||||
@subsection dev_guides__building_3rdparty_osx_3_3 FreeImage 3.14.1 or 3.15.x
|
||||
|
||||
Download the necessary archive from
|
||||
http://sourceforge.net/projects/freeimage/files/Source%20Distribution/
|
||||
and unpack it. The directory with unpacked sources is further referred to as FREEIMAGE_SRC_DIR.
|
||||
|
||||
Note that for building FreeImage on Mac OS X 10.7 you should replace Makefile.osx
|
||||
in FREEIMAGE_SRC_DIR by corrected one which you can find in attachment to issue #22811 in OCCT Mantis bug tracker
|
||||
(http://tracker.dev.opencascade.org/file_download.php?file_id=6937&type=bug) or elsewhere.
|
||||
|
||||
* 1.If you are building FreeImage 3.15.x you can skip this step.
|
||||
Modify FREEIMAGE_SRC_DIR/Source/OpenEXR/Imath/ImathMatrix.h:
|
||||
|
||||
In line 60 insert the following:
|
||||
|
||||
@verbatim
|
||||
#include string.h
|
||||
@endverbatim
|
||||
|
||||
Modify FREEIMAGE_SRC_DIR/Source/FreeImage/PluginTARGA.cpp:
|
||||
|
||||
In line 320 replace:
|
||||
@verbatim
|
||||
SwapShort(value);
|
||||
@endverbatim
|
||||
|
||||
with:
|
||||
@verbatim
|
||||
SwapShort(&value);
|
||||
@endverbatim
|
||||
|
||||
* 2.Enter the directory where the source files of FreeImage are located (FREEIMAGE_SRC_DIR).
|
||||
|
||||
@verbatim
|
||||
cd FREEIMAGE_SRC_DIR
|
||||
@endverbatim
|
||||
|
||||
* 3.Run the building process
|
||||
|
||||
@verbatim
|
||||
make
|
||||
@endverbatim
|
||||
|
||||
* 4.Run the installation process
|
||||
* 4.1. If you have permissions to write to /usr/local/include and /usr/local/lib directories then run the following command:
|
||||
@verbatim
|
||||
make install
|
||||
@endverbatim
|
||||
* 4.2. If you don’t have permissions to write to /usr/include and /usr/lib directories
|
||||
then you need to modify the file FREEIMAGE_SRC_DIR/Makefile.osx:
|
||||
|
||||
Change line 49 from:
|
||||
|
||||
@verbatim
|
||||
PREFIX ?= /usr/local
|
||||
@endverbatim
|
||||
|
||||
to:
|
||||
|
||||
@verbatim
|
||||
PREFIX ?= $(PREFIX)
|
||||
@endverbatim
|
||||
|
||||
Change lines 65-69 from:
|
||||
|
||||
@verbatim
|
||||
install -d -m 755 -o root -g wheel $(INCDIR) $(INSTALLDIR)
|
||||
install -m 644 -o root -g wheel $(HEADER) $(INCDIR)
|
||||
install -m 644 -o root -g wheel $(SHAREDLIB) $(STATICLIB) $(INSTALLDIR)
|
||||
ranlib -sf $(INSTALLDIR)/$(STATICLIB)
|
||||
ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(LIBNAME)
|
||||
@endverbatim
|
||||
|
||||
to:
|
||||
|
||||
@verbatim
|
||||
install -d $(INCDIR) $(INSTALLDIR)
|
||||
install -m 755 $(HEADER) $(INCDIR)
|
||||
install -m 755 $(STATICLIB) $(INSTALLDIR)
|
||||
install -m 755 $(SHAREDLIB) $(INSTALLDIR)
|
||||
ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
|
||||
ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
|
||||
@endverbatim
|
||||
|
||||
Then run the installation process by the following command:
|
||||
|
||||
@verbatim
|
||||
make PREFIX=FREEIMAGE_INSTALL_DIR install
|
||||
@endverbatim
|
||||
|
||||
* 5.Clean the temporary files
|
||||
|
||||
@verbatim
|
||||
make clean
|
||||
@endverbatim
|
||||
|
||||
@see http://www.opencascade.org for details
|
270
dox/dev_guides/building/3rdparty/3rdparty_windows.md
vendored
Normal file
@@ -0,0 +1,270 @@
|
||||
Building 3rd-party libraries on Windows {#dev_guides__building_3rdparty_windows}
|
||||
==============================================
|
||||
@tableofcontents
|
||||
|
||||
@section dev_guides__building_3rdparty_win_1 Introduction
|
||||
|
||||
This document presents guidelines for building third-party products
|
||||
used by Open CASCADE Technology (OCCT) and samples on Windows platform.
|
||||
|
||||
In order to understand these guidelines, you need to be familiar with MS Visual Studio / Visual C++.
|
||||
|
||||
You need to use the same version of MS Visual Studio for building
|
||||
all third-party products and OCCT itself, in order to receive a consistent set of run-time binaries.
|
||||
|
||||
The links for downloading the third-party products are available on the web site
|
||||
of OPEN CASCADE SAS at http://www.opencascade.org/getocc/require/.
|
||||
There are two types of third-party products which are used by OCCT:
|
||||
|
||||
* Mandatory products: Tcl 8.5, Tk 8.5 and FreeType 2.4.10
|
||||
* Optional products: TBB 3.x or 4.x, gl2ps * 1.3.5, FreeImage 3.14.1
|
||||
|
||||
It is recommended to create a separate new folder on your workstation where
|
||||
you will unpack the downloaded archives of the third-party products,
|
||||
and where you will build these products (for example, *c:\\occ3rdparty*).
|
||||
|
||||
Further in this document, this folder is referred to as *3rdparty*.
|
||||
|
||||
@section dev_guides__building_3rdparty_win_2 Building Mandatory Third-party Products
|
||||
|
||||
@subsection dev_guides__building_3rdparty_win_2_1 Tcl/Tk 8.5
|
||||
|
||||
Tcl/Tk is required for DRAW test harness. Version 8.5 or * 8.6 can be used for OCCT.
|
||||
We recommend installing a binary distribution that could be downloaded from
|
||||
http://www.activestate.com/activetcl.
|
||||
|
||||
Go to \"Free Downloads\" and pick the version of the Install Wizard
|
||||
that matches your target platform – 32 bit (x86) or 64 bit (x64).
|
||||
The version of Visual Studio you use is irrelevant when choosing the Install Wizard.
|
||||
|
||||
Run the Install Wizard you downloaded, and install Tcl/Tk products
|
||||
to 3rdparty\\tcltk-win32 folder (for 32-bit platform) or
|
||||
to 3rdparty\\tcltk-win64 folder (for 64-bit platform).
|
||||
|
||||
Further in this document, this folder is referred to as *tcltk*.
|
||||
|
||||
@subsection dev_guides__building_3rdparty_win_2_2 FreeType 2.4.10
|
||||
|
||||
FreeType is required for display of text in 3D viewer.
|
||||
You can download its sources from http://sourceforge.net/projects/freetype/files/
|
||||
|
||||
The building process is the following:
|
||||
|
||||
* 1. Unpack the downloaded archive of FreeType 2.4.10 product into the *3rdparty* folder.
|
||||
|
||||
As a result, you should have a folder named *3rdparty\\freetype-2.4.10*. Further in this document, this folder is referred to as *freetype*.
|
||||
|
||||
* 2. Open the solution file *freetype\\builds\\win32\\vc20xx\\freetype.sln* in Visual Studio, where vc20xx stands for the version of Visual Studio you are using.
|
||||
* 3. Select a configuration to build: either Debug or Release.
|
||||
* 4. Build the *freetype* project.
|
||||
|
||||
As a result, you will get a freetype import library (.lib) in the *freetype\\obj\\win32\\vc20xx* folder.
|
||||
|
||||
* 5. If you are building for 64 bit platform, start the Configuration Manager (Build - Configuration Manager),
|
||||
and add *x64* platform to the solution configuration by copying the settings from Win32 platform:
|
||||
|
||||
@image html /dev_guides/building/3rdparty/images/3rdparty_image001.png
|
||||
@image latex /dev_guides/building/3rdparty/images/3rdparty_image001.png
|
||||
|
||||
Update the value of the Output File for x64 configuration:
|
||||
|
||||
@image html /dev_guides/building/3rdparty/images/3rdparty_image003.png
|
||||
@image latex /dev_guides/building/3rdparty/images/3rdparty_image003.png
|
||||
|
||||
Build the *freetype* project.
|
||||
|
||||
As a result, you should obtain a 64 bit import library (.lib) file in the *freetype\\x64\\vc20xx* folder.
|
||||
If you want to build freetype as an import library (.lib) and a dynamic library (.dll) you should follow items 6, 7 and 8 of this list.
|
||||
|
||||
* 6. Open Project-Properties-Configuration Properties-General and change option 'Configuration Type' to \"*Dynamic Library (.dll)*\".
|
||||
* 7. Edit file *freetype\\include\\freetype\\config\\ftoption.h*:
|
||||
|
||||
in line 255, uncomment the definition of macro FT_EXPORT and change it as follows:
|
||||
|
||||
@verbatim
|
||||
#define FT_EXPORT(x) __declspec(dllexport) x
|
||||
@endverbatim
|
||||
|
||||
* 8. Build the *freetype* project.
|
||||
|
||||
As a result, you should obtain import library (.lib) and dynamic library (.dll)
|
||||
files in *freetype \\objs\\release or \\objs\\debug folders.*
|
||||
If you are building for a 64 bit platform, follow item 5 of this list.
|
||||
|
||||
In order to facilitate use of the FreeType libraries in OCCT with minimal adjustment of its build procedures,
|
||||
it is recommended to copy the include files and libraries of FreeType to a separate folder, named according to the pattern:
|
||||
*freetype-compiler-bitness-building mode*
|
||||
where
|
||||
|
||||
* compiler is vc8 or vc9 or vc10 or vc11;
|
||||
* bitness is 32 or 64;
|
||||
* building mode is opt (for Release) or deb (for Debug)
|
||||
|
||||
The include subfolder should be copied as is, while libraries should be renamed to
|
||||
*freetype.lib* and *freetype.dll* (suffixes removed) and placed to subdirectories
|
||||
*lib *and *bin*, respectively. If Debug configuration is built,
|
||||
the Debug libraries should be put in subdirectories *libd* and *bind*.
|
||||
|
||||
@section dev_guides__building_3rdparty_win_3 Building Optional Third-party Products
|
||||
|
||||
@subsection dev_guides__building_3rdparty_win_3_1 TBB 3.x or 4.x
|
||||
|
||||
This third-party product is installed with binaries
|
||||
from the archive that can be downloaded from http://threadingbuildingblocks.org/.
|
||||
Go to \"Downloads page\", find the release version you need (e.g. tbb30_018oss) and pick the archive for Windows platform.
|
||||
Unpack the downloaded archive of TBB product into the *3rdparty* folder.
|
||||
Further in this document, this folder is referred to as *tbb*.
|
||||
|
||||
@subsection dev_guides__building_3rdparty_win_3_2 gl2ps * 1.3.5
|
||||
|
||||
This third-party product should be built as a dynamically loadable library (dll file).
|
||||
You can download its sources from http://geuz.org/gl2ps/src/
|
||||
|
||||
The building process is the following:
|
||||
|
||||
* 1. Unpack the downloaded archive of gl2ps * 1.3.5 product (*gl2ps-* 1.3.5.tgz*) into the *3rdparty* folder.
|
||||
As a result, you should have a folder named *3rdparty\\gl2ps-* 1.3.5-source*.
|
||||
Rename it according to the rule: gl2ps-platform-compiler-building mode, where
|
||||
platform is win32 or win64;
|
||||
compiler is vc8 or vc9 or vc10;
|
||||
building mode - opt (for release) or deb (for debug)
|
||||
Further in this document, this folder is referred to as *gl2ps*.
|
||||
|
||||
* 2. Download (from http://www.cmake.org/cmake/resources/software.html)
|
||||
and install the *CMake* build system.
|
||||
|
||||
* 3. Edit the file *gl2ps\\CMakeLists.txt*.
|
||||
After line 113 in CMakeLists.txt:
|
||||
|
||||
@verbatim
|
||||
set_target_properties(shared PROPERTIES COMPILE_FLAGS \"-DGL2PSDLL -DGL2PSDLL_EXPORTS\")
|
||||
@endverbatim
|
||||
|
||||
add the following line:
|
||||
|
||||
@verbatim
|
||||
add_definitions(-D_USE_MATH_DEFINES)
|
||||
@endverbatim
|
||||
|
||||
Attention: If cygwin was installed on your computer make sure that there is no path
|
||||
to the latter in the PATH variable in order to avoid possible conflicts during the configuration.
|
||||
|
||||
* 4. Launch CMake (cmake-gui.exe) using the Program menu.
|
||||
In CMake:
|
||||
|
||||
* Define where the source code is.
|
||||
This path must point to *gl2ps* folder.
|
||||
* Define where to build the binaries.
|
||||
This path must point to the folder where generated gl2ps project binaries will be placed
|
||||
(for example, *gl2ps\\bin*).
|
||||
Further in this document, this folder is referred to as *gl2ps_bin*.
|
||||
* Press the \"Configure\" button.
|
||||
@image html /dev_guides/building/3rdparty/images/3rdparty_image004.png
|
||||
@image latex /dev_guides/building/3rdparty/images/3rdparty_image004.png
|
||||
* Select the generator (the compiler and the target platform - 32 or 64 bit) in the pop-up window.
|
||||
@image html /dev_guides/building/3rdparty/images/3rdparty_image005.png
|
||||
@image latex /dev_guides/building/3rdparty/images/3rdparty_image005.png
|
||||
* Then press the \"Finish\" button to return to the main CMake window.
|
||||
Expand the ENABLE group and uncheck ENABLE_PNG and ENABLE_ZLIB check boxes.
|
||||
@image html /dev_guides/building/3rdparty/images/3rdparty_image006.png
|
||||
@image latex /dev_guides/building/3rdparty/images/3rdparty_image006.png
|
||||
* Expand the CMAKE group and define CMAKE_INSTALL_PREFIX
|
||||
(path where you want to install the build results, for example, *c:\\occ3rdparty\\gl2ps\-1.3.5*).
|
||||
@image html /dev_guides/building/3rdparty/images/3rdparty_image007.png
|
||||
@image latex /dev_guides/building/3rdparty/images/3rdparty_image007.png
|
||||
* Press the \"Configure\" button again, and then the \"Generate\" button in order to generate
|
||||
Visual Studio projects. After completion, close CMake application.
|
||||
|
||||
* 5. Open the solution file *gl2ps_bin\\gl2ps.sln* in Visual Studio.
|
||||
* Select a configuration to build
|
||||
* Choose \"*Release*\" if you are building Release binaries.
|
||||
* Choose \"*Debug*\" if you are building Debug binaries.
|
||||
* Select a platform to build.
|
||||
* Choose \"*Win32*\" if you are building for a 32 bit platform.
|
||||
* Choose \"*x64*\" if you are building for a 64 bit platform.
|
||||
* Build the solution.
|
||||
* Build the *INSTALL* project.
|
||||
|
||||
As a result, you should have the installed gl2ps product in the *CMAKE_INSTALL_PREFIX* path.
|
||||
|
||||
@subsection dev_guides__building_3rdparty_win_3_3 FreeImage 3.14.1
|
||||
|
||||
This third-party product should be built as a dynamically loadable library (.dll file).
|
||||
You can download its sources from
|
||||
http://sourceforge.net/projects/freeimage/files/Source%20Distribution/
|
||||
|
||||
The building process is the following:
|
||||
|
||||
* 1. Unpack the downloaded archive of FreeImage 3.14.1 product (*FreeImage314* 1.zip*) into *3rdparty* folder.
|
||||
|
||||
As a result, you should have a folder named *3rdparty\\FreeImage*.
|
||||
Rename it according to the rule: freeimage-platform-compiler-building mode, where
|
||||
platform is win32 or win64;
|
||||
compiler is vc8 or vc9 or vc10 or vc11;
|
||||
building mode is opt (for release) or deb (for debug)
|
||||
Further in this document, this folder is referred to as *freeimage*.
|
||||
|
||||
* 2. Open the solution file *freeimage\\FreeImage.*.sln* in Visual Studio that corresponds to the version of Visual Studio you use.
|
||||
|
||||
Since the version of Visual Studio you use is higher than VC++ 2008, apply conversion of the workspace.
|
||||
Such conversion should be suggested automatically by Visual Studio.
|
||||
|
||||
* 3. Select a configuration to build.
|
||||
Choose \" *Release* \" if you are building Release binaries.
|
||||
Choose \" *Debug* \" if you are building Debug binaries.
|
||||
*Note:*
|
||||
If you want to build a debug version of FreeImage binaries then you must rename
|
||||
the following files for projects FreeImage and FreeimagePlus:
|
||||
|
||||
Project-Properties-Configuration Properties-Linker-General-Output File
|
||||
|
||||
@verbatim
|
||||
from FreeImage*d*.dll to FreeImage.dll
|
||||
from FreeImagePlus*d*.dll to FreeImagePlus.dll
|
||||
@endverbatim
|
||||
|
||||
Project-Properties-Configuration Properties-Linker-Debugging-Generate Program Database File
|
||||
|
||||
@verbatim
|
||||
from FreeImage*d*.pdb to FreeImage.pdb
|
||||
from FreeImagePlus*d*.pdb to FreeImagePlus.pdb
|
||||
@endverbatim
|
||||
|
||||
Project-Properties-Configuration Properties-Linker-Advanced-Import Library
|
||||
|
||||
@verbatim
|
||||
from FreeImage*d*.lib to FreeImage.lib
|
||||
from FreeImagePlus*d*.lib to FreeImagePlus.lib
|
||||
@endverbatim
|
||||
|
||||
Project-Properties-Configuration Properties-Build Events-Post-Build Event-Comand Line
|
||||
|
||||
@verbatim
|
||||
from FreeImage*d*.dll to FreeImage.dll
|
||||
from FreeImage*d*.lib to FreeImage.lib
|
||||
from FreeImagePlus*d*.dll to FreeImagePlus.dll
|
||||
from FreeImagePlus*d*.lib to FreeImagePlus.lib
|
||||
@endverbatim
|
||||
|
||||
Additionally, for project FreeImagePlus rename:
|
||||
Project-Properties-Configuration Properties-Linker-Input-Additional Dependencies
|
||||
|
||||
@verbatim
|
||||
from FreeImage*d*.lib to FreeImage.lib
|
||||
@endverbatim
|
||||
|
||||
* 4. Select a platform to build.
|
||||
|
||||
Choose \" *Win32* \" if you are building for a 32 bit platform.
|
||||
Choose \" *x64* \" if you are building for a 64 bit platform.
|
||||
|
||||
* 5. Start the building process.
|
||||
|
||||
As a result, you should have the library files of FreeImage product in the *freeimage\\Dist*
|
||||
|
||||
@verbatim
|
||||
folder (FreeImage.dll and FreeImage.lib files) and in the *freeimage\\Wrapper\\FreeImagePlus\\dist*
|
||||
folder (FreeImagePlus.dll and FreeImagePlus.lib files).
|
||||
@endverbatim
|
||||
|
||||
@see http://www.opencascade.org for details
|
BIN
dox/dev_guides/building/3rdparty/images/3rdparty_image001.png
vendored
Normal file
After Width: | Height: | Size: 123 KiB |
BIN
dox/dev_guides/building/3rdparty/images/3rdparty_image003.png
vendored
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
dox/dev_guides/building/3rdparty/images/3rdparty_image004.png
vendored
Normal file
After Width: | Height: | Size: 106 KiB |
BIN
dox/dev_guides/building/3rdparty/images/3rdparty_image005.png
vendored
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
dox/dev_guides/building/3rdparty/images/3rdparty_image006.png
vendored
Normal file
After Width: | Height: | Size: 206 KiB |
BIN
dox/dev_guides/building/3rdparty/images/3rdparty_image007.png
vendored
Normal file
After Width: | Height: | Size: 236 KiB |
@@ -6,7 +6,7 @@ archive on Linux with GNU build system (Autotools).
|
||||
|
||||
If you are building OCCT from bare sources (as in Git repository), or do some
|
||||
changes affecting CDL files, you need to use WOK to re-generate header files
|
||||
and build scripts / projects. See file \ref wok "WOK" for instructions.
|
||||
and build scripts / projects. See \ref dev_guides__building__wok for instructions.
|
||||
|
||||
Before building OCCT, you need to install required third-party libraries; see
|
||||
OCCT_Build3rdParty_Linux.pdf for instructions.
|
||||
|
@@ -1,23 +1,23 @@
|
||||
Building OCCT Libraries {#dev_guides__building}
|
||||
Building OCCT from sources {#dev_guides__building}
|
||||
=========
|
||||
|
||||
The source package of the Open CASCADE Technology including the source files of samples
|
||||
and tools and the set of building procedures is available for self-dependent preparation
|
||||
binary files on UNIX and Windows platforms.
|
||||
|
||||
In order to build OCCT libraries from these sources for use in your program,
|
||||
you need to:
|
||||
|
||||
1. Install the required third-party libraries.
|
||||
1. Make sure you have all required third-party libraries installed (check
|
||||
software requirements in \ref OCCT_OVW_SECTION_5 "Overview").
|
||||
|
||||
Follow the instructions provided in the documents titled "Building 3rd party
|
||||
products for OCCT" on http://dev.opencascade.org/?q=home/resources for
|
||||
choice of the needed libraries, their installation and building.
|
||||
See the following documents for short guide to installation of
|
||||
third-party libraries on different platforms:
|
||||
- \subpage dev_guides__building_3rdparty_windows
|
||||
- \subpage dev_guides__building_3rdparty_linux
|
||||
- \subpage dev_guides__building_3rdparty_osx
|
||||
|
||||
2. If you use OCCT sources from Git repository or do come changes affecting
|
||||
CDL files or dependencies of OCCT toolkit, update header files generated
|
||||
from CDL, and regenerate build scripts for your environment using WOK.
|
||||
See \subpage dev_guides__building__wok "WOK" for details.
|
||||
|
||||
2. If you use bare OCCT sources from Git repository or made some changes affecting
|
||||
CDL files or dependencies of OCCT toolkits, you need to update header files generated
|
||||
from \ref dev_guides__cdl "CDL", and regenerate build scripts for your environment using WOK.
|
||||
See \subpage dev_guides__building__wok for details.
|
||||
|
||||
Skip to step 3 if you use complete source package (e.g. official OCCT
|
||||
release) without changes in CDL.
|
||||
@@ -26,7 +26,7 @@ you need to:
|
||||
- \subpage dev_guides__building__automake "Building on Linux with Autotools"
|
||||
- \subpage dev_guides__building__cmake "Building with CMake (cross-platform)"
|
||||
- \subpage dev_guides__building__code_blocks "Building on Mac OS X with Code::Blocks"
|
||||
- \subpage dev_guides__building__msvc "Building on Windows with MS Visual Studio 2005-2012"
|
||||
- \subpage dev_guides__building__msvc "Building on Windows with MS Visual Studio"
|
||||
- \subpage dev_guides__building__xcode "Building on Mac OS X with Xcode"
|
||||
|
||||
The current version of OCCT can be consulted in the file src/Standard/Standard_Version.hxx
|
@@ -1,77 +0,0 @@
|
||||
Building with CMake {#dev_guides__building__cmake}
|
||||
===================
|
||||
|
||||
This file describes steps to build OCCT libraries from complete source package
|
||||
with CMake. CMake is free software that can create GNU Makefiles, KDevelop,
|
||||
XCode, and Visual Studio project files. Version 2.6 or above of CMake is
|
||||
required.
|
||||
|
||||
If you are building OCCT from bare sources (as in Git repository), or do some
|
||||
changes affecting CDL files, you need to use WOK to re-generate header files
|
||||
and build scripts / projects. See file \ref wok "WOK" for instructions.
|
||||
|
||||
Before building OCCT, you need to install required third-party libraries; see
|
||||
instructions for your platform on Resources page at http://dev.opencascade.org
|
||||
|
||||
1. Decide on location of build and install directories.
|
||||
|
||||
The build directory is the one where intermediate files will be created
|
||||
(projects / makefiles, objects, binaries).
|
||||
The install directory is the one where binaries will be installed after
|
||||
build, along with header files and resources required for OCCT use in
|
||||
applications.
|
||||
|
||||
OCCT CMake scripts assume use of separate build and one install directories
|
||||
for each configuration (Debug or Release).
|
||||
|
||||
It is recommended to separate build and install directories from OCCT
|
||||
source directory, for example:
|
||||
|
||||
/user/home/occt/ros - sources
|
||||
/user/home/tmp/occt-build-release - intermediate files (release)
|
||||
/user/home/occt-install-release - installed binaries (release)
|
||||
|
||||
2. Run CMake indicating path to OCCT sources (ros subdirectory) and selected build directory.
|
||||
It is recommended to use GUI tools provided by CMake: cmake-gui on Windows
|
||||
and Mac, ccmake on Linux.
|
||||
|
||||
Example:
|
||||
|
||||
Linux> cd /user/home/occt-install-release
|
||||
Linux> ccmake /user/home/occt/ros
|
||||
|
||||
3. Run Configure
|
||||
|
||||
You will likely get CMake errors due to missing paths to 3rd-party
|
||||
libraries. This is normal; proceed with configuration as follows.
|
||||
|
||||
4. Check parameters shown by CMake, set them in accordance with your
|
||||
environment, and repeat Configure until it runs without error:
|
||||
|
||||
- 3RDPARTY_DIR: path to directory whethe 3rd-party libraries are installed
|
||||
(for the cases when they are not in default locations, or on Windows)
|
||||
- 3RDPARTY_USE_\<library\>: select to use optional libraries
|
||||
- Other options in 3RDPARTY group can be used to fine-tune paths to
|
||||
3rd-party libraries
|
||||
|
||||
- BUILD_TYPE: configuration to build (Debug or Release)
|
||||
- BUILD_BITNESS: bitness (32 or 64)
|
||||
- BUILD_TOOLKITS: optional string containing list of toolkits to be built
|
||||
in addition to those included in completely built modueles
|
||||
- BUILD_\<module\>: select to build corresponding OCCT module
|
||||
|
||||
- INSTALL_DIR: directory to install OCCT
|
||||
- INSTALL_\<library\>: select to copy corresponding 3rd-party library to OCCT
|
||||
install dir
|
||||
|
||||
5. Run Generate
|
||||
|
||||
This will create makefiles or project files for your build system.
|
||||
|
||||
6. Build OCCT:
|
||||
|
||||
- on Windows with MSVC: open solution OCCT.sln and build it, when build project INSTALL_ALL explicitly to have binaries and headers installed
|
||||
- on Linux with make files: run 'make install'
|
||||
|
||||
|
||||
|
208
dox/dev_guides/building/cmake/cmake.md
Normal file
@@ -0,0 +1,208 @@
|
||||
Building with CMake {#dev_guides__building__cmake}
|
||||
===================
|
||||
|
||||
@tableofcontents
|
||||
|
||||
This file describes steps to build OCCT libraries from complete source package
|
||||
with CMake. CMake is free software that can create GNU Makefiles, KDevelop,
|
||||
XCode, and Visual Studio project files. Version 2.6 or above of CMake is
|
||||
required.
|
||||
|
||||
If you are building OCCT from bare sources (as in Git repository), or do some
|
||||
changes affecting CDL files, you need to use WOK to re-generate header files
|
||||
and build scripts / projects. See \ref dev_guides__building__wok for instructions.
|
||||
|
||||
Before building OCCT, you need to install required third-party libraries; see
|
||||
instructions for your platform on Resources page at http://dev.opencascade.org
|
||||
and @ref dev_guides__building article for details.
|
||||
|
||||
## Decide on location of build and install directories.
|
||||
|
||||
The build directory is the one where intermediate files will be created (projects / makefiles, objects, binaries).
|
||||
The install directory is the one where binaries will be installed after build, along with header files and resources required for OCCT use in applications.
|
||||
|
||||
OCCT CMake scripts assume use of separate build and one install directories for each configuration (Debug or Release).
|
||||
|
||||
It is recommended to separate build and install directories from OCCT source directory, for example:
|
||||
|
||||
/user/home/occt/ - sources
|
||||
/user/home/tmp/occt-build-release - intermediate files (release)
|
||||
/user/home/occt-install-release - installed binaries (release)
|
||||
|
||||
## CMake usage
|
||||
|
||||
Run CMake indicating path to OCCT sources ($CASROOT; in previous example CASROOT equal to /user/home/occt in lin case, and d:/occt in win case) and selected build directory (in prev example build directory is /user/home/tmp/occt-build-release).
|
||||
|
||||
It is recommended to use GUI tools provided by CMake: cmake-gui on Windows and Mac, ccmake on Linux.
|
||||
|
||||
### Windows:
|
||||
|
||||
@image html /dev_guides/building/cmake/images/cmake_image001.png
|
||||
@image latex /dev_guides/building/cmake/images/cmake_image001.png
|
||||
|
||||
* Specify "main" CMakelists.txt meta-project location by clicking Browse Source (e.g., $CASROOT)
|
||||
* Specify location (build folder) for Cmake generated project files by clicking Browse Build (e.g., d:/occt/build/win32-vc9-debug) (each cmake configuration of the project uses a specific build directory and a specific directory for installed files. It is recommended to compose names of the binary and install directory from system, bitness, compiler and build type.)
|
||||
* Configure opens the window with a drop-down list of generators supported by CMake project. Select the required generator (e.g., Visual Studio 2008) and click Finish)
|
||||
|
||||
@image html /dev_guides/building/cmake/images/cmake_image002.png
|
||||
@image latex /dev_guides/building/cmake/images/cmake_image002.png
|
||||
|
||||
### Linux:
|
||||
|
||||
In the console, change to the build directory and call ccmake with the path to the source directory of the project:
|
||||
|
||||
> cd ~/occt/build/debug
|
||||
> ccmake ~/occt/adm/cmake
|
||||
|
||||
@image html /dev_guides/building/cmake/images/cmake_image003.png
|
||||
@image latex /dev_guides/building/cmake/images/cmake_image003.png
|
||||
|
||||
Press "c" to configure.
|
||||
|
||||
### Mac OS:
|
||||
|
||||
Use cmake-gui (Applications -> CMake 2.8-10.app) to generate project files for the chosen build environment (e.g., XCode).
|
||||
|
||||
@image html /dev_guides/building/cmake/images/cmake_image004.png
|
||||
@image latex /dev_guides/building/cmake/images/cmake_image004.png
|
||||
|
||||
## OCCT Configuration
|
||||
|
||||
The error message which appears at the end of configuration process, informs you about the required variables
|
||||
which need to be defined. This error will appear until all required variables are defined correctly.
|
||||
Note: In cmake-gui there is "grouped" option, which groups variables with a common prefix.
|
||||
|
||||
###The variables with BUILD_ prefix:
|
||||
|
||||
* BUILD_TYPE - defines build configuration of the future project (Release by default)
|
||||
* BUILD_<MODULE> - allows including the toolkit set of the specified module to the future project or excluding it from the project.
|
||||
* BUILD_TOOLKITS - allows including additional specified toolkits (list of items separated by a space or a semicolon) to the common set of the future project.
|
||||
|
||||
Check USE_\<PRODUCT\> variable (USE_FREEIMAGE, USE_GL2PS, USE_TBB and USE_OPENCL) if you want to use this 3rd-party product in the future project.
|
||||
|
||||
### 3rd-party configuration
|
||||
|
||||
If you have 3rd-party libraries in a non-default location
|
||||
(e.g., on Windows, binaries downloaded from "http://www.opencascade.org/getocc/download/3rdparty/"),
|
||||
specify 3RDPARTY_DIR variable that points to the folders of 3rdparty products (some or all).
|
||||
At the next configuration 3rd-party product paths stored in 3RDPARTY_\<PRODUCT\>_DIR variable
|
||||
will be searched for in 3RDPARTY_DIR directory. If the structure of 3RDPARTY_DIR directory
|
||||
is the same as adopted in the OCCT, the directory will contain product dir, lib and header files.
|
||||
Press "Configure" ("c" key for ccmake)
|
||||
Important: The names of searched libraries and header files are hardcoded.
|
||||
The result of the 3rdparty product search will be recorded in the corresponding variables:
|
||||
|
||||
* 3RDPARTY_\<PRODUCT\>_DIR - path to the product directory (with directory name) (e.g., D:/3rdparty/Tcl-8.5.12.0-32)
|
||||
* 3RDPARTY_\<PRODUCT\>_LIBRARY - path to the .lib libraries (with the library name) (e.g., D:/3rdparty/Tcl-8.5.12.0-32/lib/tcl85.lib). In non-windows case, this variable is the same as 3RDPARTY_\<PRODUCT\>_DLL.
|
||||
* 3RDPARTY_\<PRODUCT\>_INCLUDE - path to the include directory that contains the required header file (with "include" name) (e.g., D:/3rdparty/Tcl-8.5.12.0-32/include including tcl.h)
|
||||
* 3RDPARTY_\<PRODUCT\>_DLL - path to the .dll/.so/.dylib library (with the library name) (e.g., D:/3rdparty/Tcl-8.5.12.0-32/bin/tcl85.dll)
|
||||
|
||||
The search process is as follows:
|
||||
|
||||
1 level:. 3RDPARTY_DIR
|
||||
2 level: 3RDPARTY_\<PRODUCT\>_DIR\
|
||||
3 level: 3RDPARTY_\<PRODUCT\>_LIBRARY
|
||||
3 level: 3RDPARTY_\<PRODUCT\>_INCLUDE
|
||||
3 level: 3RDPARTY_\<PRODUCT\>_DLL
|
||||
|
||||
If a variable of any level is not defined (empty or \<variable name\>-NOTFOUND)
|
||||
and the upper level variable is defined, the content of the non-defined variable
|
||||
will be searched for at the next configuration step. If search process in level 3
|
||||
doesn't find the required files, it searches in default places also.
|
||||
|
||||
*Note*: Freetype search process tries to find ft2build.h file in 3RDPARTY_FREETYPE INCLUDE dir
|
||||
and after that adds "3RDPARTY_FREETYPE_INCLUDE /freetype2" path to common includes if it exists.
|
||||
Important: If BUILD_TYPE or BITNESS variable is changed - at the next configuration
|
||||
3RDPARTY_ variables will be replaced by the search process result, except for the 3RDPARTY_DIR variable.
|
||||
|
||||
*Note*: CMake will produce an error after the configuration step until all required variables are defined correctly.
|
||||
If the search result (include path, or library path, or dll path) does not meet your expectations -
|
||||
you can change 3RDPARTY_\<PRODUCT\>_DIR variable, clear (if they are not empty)
|
||||
3RDPARTY_\<PRODUCT\>_DLL, 3RDPARTY_\<PRODUCT\>_INCLUDE_DIR and 3RDPARTY_\<PRODUCT\>_LIBRARY variables
|
||||
(or clear one of them) and run the configuration process again.
|
||||
At this time the search will be performed in the new identified directory
|
||||
and the result will be recorded to empty variables (non-empty variables will not be replaced).
|
||||
|
||||
For example, (Linux case) 3RDPARTY_FREETYPE_DIR variable
|
||||
|
||||
/PRODUCTS/maintenance/Mandriva2010/freetype-2.3.7
|
||||
|
||||
can be changed to
|
||||
|
||||
/PRODUCTS/maintenance/Mandriva2010/freetype-2.4.10
|
||||
|
||||
and the related variables: 3RDPARTY_FREETYPE_DLL, 3RDPARTY_FREETYPE_INCLUDE_DIR and 3RDPARTY_FREETYPE_LIBRARY will be cleared.
|
||||
|
||||
@image html /dev_guides/building/cmake/images/cmake_image005.png
|
||||
@image latex /dev_guides/building/cmake/images/cmake_image005.png
|
||||
|
||||
During configuration process the cleaned variables will be filled with new found values.
|
||||
|
||||
### Install path configuration
|
||||
|
||||
Define in INSTALL_DIR variable the path to the installed OCCT files (libraries, executables and headers).
|
||||
If INSTALL_\<PRODUCT\> variable is checked - 3rd-party products will be copied to the install directory.
|
||||
At the end of the configuration process "configuring done" message will be shown and the generation process can be started.
|
||||
|
||||
## OCCT Generation
|
||||
|
||||
This will create makefiles or project files for your build system.
|
||||
|
||||
### Windows
|
||||
|
||||
Click Generate button and wait until the generation process is finished.
|
||||
Then the project files will appear in the build folder (e.g., d:/occt/build/win32-vc9-release).
|
||||
|
||||
### Linux
|
||||
|
||||
When the configuration is complete, start the generation process by pressing "g".
|
||||
|
||||
@image html /dev_guides/building/cmake/images/cmake_image006.png
|
||||
@image latex /dev_guides/building/cmake/images/cmake_image006.png
|
||||
|
||||
### Mac OS X
|
||||
|
||||
Click Generate button and wait until the generation process is finished.
|
||||
Then the project files will appear in the build folder (e.g., /Developer/occt/build/XCode).
|
||||
|
||||
## OCCT Building
|
||||
|
||||
The install folder contains bin, inc, lib and res folders and a script to run DRAWEXE (draw.bat or draw.sh).
|
||||
"bin" contains executables, DLL (Windows) style shared libraries and pdb-files in OCCT debug version,.
|
||||
"lib" contains the import parts of DLL libraries.
|
||||
"inc" contains header files.
|
||||
"res" contains all required source files for OCCT.
|
||||
|
||||
### Windows (Visual studio)
|
||||
|
||||
Go to the build folder, start the Visual Studio solution (OCCT.sln) and build it by clicking Build - Build Solution.
|
||||
When the building process finished, build the INSTALL project
|
||||
(by default the build solution process skips the building of the INSTALL project) to move the above files to INSTALL_DIR.
|
||||
For this in the solution explorer right click on the INSTALL project and select Project Only - Build Only INSTALL.
|
||||
|
||||
### Linux (make)
|
||||
Change directory to binary dir and run make command
|
||||
|
||||
> make
|
||||
|
||||
To copy all libraries, executables and chosen 3rd-party libraries run "make" command with "install" argument
|
||||
|
||||
> make install
|
||||
|
||||
This command will move the above files to INSTALL_DIR.
|
||||
|
||||
### Mac OS X (XCode)
|
||||
|
||||
Go to the build folder, start the XCode solution (OCCT.xcodeproj)
|
||||
and build it by clicking Build -> Build.
|
||||
Please notice that XCode may have worst responsibility to user actions
|
||||
due to sources processing at first start.
|
||||
|
||||
When the building process finished, build the INSTALL project
|
||||
(by default the build solution process skips the building of the INSTALL project)
|
||||
to move the above files to INSTALL_DIR.
|
||||
Notice that env.sh (configure PATH and DYLD_LIBRARY_PATH environment variables
|
||||
as well as Draw Harness extra variables) and draw.sh (to launch DRAWEXE) will be created in target directory.
|
||||
|
||||
## OCCT project debugging for Visual Studio
|
||||
Run OCCT.bat from the build directory to start Visual Studio with required environment for debugging.
|
BIN
dox/dev_guides/building/cmake/images/cmake_image001.png
Normal file
After Width: | Height: | Size: 106 KiB |
BIN
dox/dev_guides/building/cmake/images/cmake_image002.png
Normal file
After Width: | Height: | Size: 100 KiB |
BIN
dox/dev_guides/building/cmake/images/cmake_image003.png
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
dox/dev_guides/building/cmake/images/cmake_image004.png
Normal file
After Width: | Height: | Size: 146 KiB |
BIN
dox/dev_guides/building/cmake/images/cmake_image005.png
Normal file
After Width: | Height: | Size: 230 KiB |
BIN
dox/dev_guides/building/cmake/images/cmake_image006.png
Normal file
After Width: | Height: | Size: 188 KiB |
@@ -6,7 +6,7 @@ on Mac OS X with Code::Blocks.
|
||||
|
||||
If you are building OCCT from bare sources (as in Git repository), or do some
|
||||
changes affecting CDL files, you need to use WOK to re-generate header files
|
||||
and build scripts / projects. See file \ref wok "WOK" for instructions.
|
||||
and build scripts / projects. See \ref dev_guides__building__wok for instructions.
|
||||
|
||||
Before building OCCT, you need to install required third-party libraries; see
|
||||
OCCT_Build3rdParty_OSX.pdf for details.
|
||||
|
@@ -6,7 +6,7 @@ archive on Windows with MS Visual C++.
|
||||
|
||||
If you are building OCCT from bare sources (as in Git repository), or do some
|
||||
changes affecting CDL files, you need to use WOK to re-generate header files
|
||||
and build scripts / projects. See file \ref wok "WOK" for instructions.
|
||||
and build scripts / projects. See \ref dev_guides__building__wok for instructions.
|
||||
|
||||
Before building OCCT, you need to install required third-party libraries; see
|
||||
OCCT_Build3rdParty_Windows.pdf for instructions.
|
||||
|
Before Width: | Height: | Size: 43 KiB |
BIN
dox/dev_guides/building/wok/images/wok_image001.png
Normal file
After Width: | Height: | Size: 168 KiB |
Before Width: | Height: | Size: 72 KiB |
BIN
dox/dev_guides/building/wok/images/wok_image002.png
Normal file
After Width: | Height: | Size: 270 KiB |
Before Width: | Height: | Size: 43 KiB |
BIN
dox/dev_guides/building/wok/images/wok_image003.png
Normal file
After Width: | Height: | Size: 157 KiB |
Before Width: | Height: | Size: 50 KiB |
BIN
dox/dev_guides/building/wok/images/wok_image004.png
Normal file
After Width: | Height: | Size: 194 KiB |
@@ -1,16 +1,21 @@
|
||||
WOK {#dev_guides__building__wok}
|
||||
Using WOK {#dev_guides__building__wok}
|
||||
=========
|
||||
|
||||
WOK is a legacy build environment for Open CASCADE Technology. It is required
|
||||
for generation of header files for classes defined with @ref ug_cdl "CDL"
|
||||
("Cascade Definition Language"). Also tools for generation of project files
|
||||
for other build systems, and OCCT documentation, are integrated to WOK.
|
||||
@tableofcontents
|
||||
|
||||
\ref dev_guides__wok "WOK" is a legacy build environment for Open CASCADE Technology.
|
||||
It is required for generation of header files for classes defined with
|
||||
@ref dev_guides__cdl "CDL" ("Cascade Definition Language").
|
||||
Also tools for generation of project files for other build systems, and OCCT
|
||||
documentation, are integrated to WOK.
|
||||
|
||||
WOK thus is needed in the following situations:
|
||||
- Building from OCCT sources from Git repository (do not contain generated files)
|
||||
- Building after some changes made in CDL files
|
||||
|
||||
Before installing and using WOK, make sure that you have installed a compiler (it is assumed that it is Visual Studio on Windows or gcc on Linux and MacOS) and third-party components required for building OCCT.
|
||||
Before installing and using WOK, make sure that you have installed a compiler
|
||||
(it is assumed that it is Visual Studio on Windows or gcc on Linux and MacOS)
|
||||
and third-party components required for building OCCT.
|
||||
|
||||
@section wok1 Installing WOK
|
||||
|
||||
@@ -20,14 +25,14 @@ Before installing and using WOK, make sure that you have installed a compiler (i
|
||||
|
||||
Run the installer. You will be prompted to read and accept the OCCT Public License to proceed:
|
||||
|
||||
@image html /dev_guides/building/wok/images/wok_image001.jpg
|
||||
@image latex /dev_guides/building/wok/images/wok_image001.jpg
|
||||
@image html /dev_guides/building/wok/images/wok_image001.png
|
||||
@image latex /dev_guides/building/wok/images/wok_image001.png
|
||||
|
||||
Click Next and proceed with the installation.
|
||||
At the end of the installation you will be prompted to specify the version and the location of Visual Studio to be used, and the location of third-party libraries:
|
||||
|
||||
@image html /dev_guides/building/wok/images/wok_image002.jpg
|
||||
@image latex /dev_guides/building/wok/images/wok_image002.jpg
|
||||
@image html /dev_guides/building/wok/images/wok_image002.png
|
||||
@image latex /dev_guides/building/wok/images/wok_image002.png
|
||||
|
||||
You can change these settings at any time later. For this click on the item "Customize environment (GUI tool)" in the WOK group in the Windows Start menu.
|
||||
|
||||
@@ -39,52 +44,52 @@ Before installing and using WOK, make sure that you have installed a compiler (i
|
||||
|
||||
@subsection wok12 Linux
|
||||
|
||||
* Unpack the .tgz archive containing WOK distributive into an installation directory <WOK_INSTALL_DIR>.
|
||||
* Unpack the .tgz archive containing WOK distributive into an installation directory \<WOK_INSTALL_DIR\>.
|
||||
|
||||
* Perform the following commands assuming that you have unpacked WOK distributive archive into <WOK_INSTALL_DIR>:
|
||||
* Perform the following commands assuming that you have unpacked WOK distributive archive into \<WOK_INSTALL_DIR\>:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
cd <WOK_INSTALL_DIR>/site
|
||||
cd \<WOK_INSTALL_DIR\>/site
|
||||
wok_confgui.sh
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Define all necessary paths to third-party products in the dialog window:
|
||||
|
||||
@image html /dev_guides/building/wok/images/wok_image003.jpg
|
||||
@image latex /dev_guides/building/wok/images/wok_image003.jpg
|
||||
@image html /dev_guides/building/wok/images/wok_image003.png
|
||||
@image latex /dev_guides/building/wok/images/wok_image003.png
|
||||
|
||||
* Run the following commands to create WOK LOC factory:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
cd <WOK_INSTALL_DIR>/site
|
||||
cd \<WOK_INSTALL_DIR\>/site
|
||||
wok_init.sh
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
* Your installation procedure is over. To run WOK use one the following commands:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
cd <WOK_INSTALL_DIR>/site
|
||||
cd \<WOK_INSTALL_DIR\>/site
|
||||
wok_emacs.sh
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
or
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
cd <WOK_INSTALL_DIR>/site
|
||||
cd \<WOK_INSTALL_DIR\>/site
|
||||
wok_tclsh.sh
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@subsection wok13 Mac OS X
|
||||
|
||||
* In the Finder double click on wokSetup.dmg file. This will open a new window. Drag and drop "wokSetup" folder from this window at the location in the Finder where you want to install WOK, i.e. <WOK_INSTALL_DIR>.
|
||||
* In the Finder double click on wokSetup.dmg file. This will open a new window. Drag and drop "wokSetup" folder from this window at the location in the Finder where you want to install WOK, i.e. \<WOK_INSTALL_DIR\>.
|
||||
|
||||
* Browse in the Finder to the folder <WOK_INSTALL_DIR>/site and double click on WokConfig. This will open a window with additional search path settings. Define all necessary paths to third-party products in the dialog window:
|
||||
* Browse in the Finder to the folder \<WOK_INSTALL_DIR\>/site and double click on WokConfig. This will open a window with additional search path settings. Define all necessary paths to third-party products in the dialog window:
|
||||
|
||||
@image html /dev_guides/building/wok/images/wok_image004.jpg
|
||||
@image latex /dev_guides/building/wok/images/wok_image004.jpg
|
||||
@image html /dev_guides/building/wok/images/wok_image004.png
|
||||
@image latex /dev_guides/building/wok/images/wok_image004.png
|
||||
|
||||
* Run the following commands to create WOK LOC factory:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
cd <WOK_INSTALL_DIR>/site
|
||||
cd \<WOK_INSTALL_DIR\>/site
|
||||
wok_init.sh
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
* Your installation procedure is over. To run WOK in Emacs navigate in the Finder to the folder <WOK_INSTALL_DIR>/site and double click on WokEmacs.
|
||||
* Your installation procedure is over. To run WOK in Emacs navigate in the Finder to the folder \<WOK_INSTALL_DIR\>/site and double click on WokEmacs.
|
||||
|
||||
|
||||
@section wok2 Initialization of Workbench
|
||||
@@ -100,7 +105,7 @@ Before installing and using WOK, make sure that you have installed a compiler (i
|
||||
|
||||
Note: $CASROOT is equal to D:/occt now
|
||||
|
||||
Then you can work with this workbench using normal WOK functionality (wprocess, umake, etc.; see WOK User<EFBFBD>s Guide for details) or use it only for generation of derived sources and project files, and build OCCT with Visual Studio on Windows or make command on Linux, as described below.
|
||||
Then you can work with this workbench using normal WOK functionality (wprocess, umake, etc.; see WOK User's Guide for details) or use it only for generation of derived sources and project files, and build OCCT with Visual Studio on Windows or make command on Linux, as described below.
|
||||
|
||||
@section wok3 Generation of building projects
|
||||
|
||||
@@ -134,10 +139,10 @@ The generated building project has been placed into $CASROOT/adm folder:
|
||||
* for vc9 - $CASROOT/adm/msvc/vc9
|
||||
* for vc10 - $CASROOT/adm/msvc/vc10
|
||||
* for vc11 - $CASROOT/adm/msvc/vc11
|
||||
* for cbp - $CASROOT/adm/<OS> /cbp
|
||||
* for cbp - $CASROOT/adm/\<OS\>/cbp
|
||||
* for cmake - $CASROOT/adm/cmake
|
||||
* for amk - $CASROOT/adm/lin/amk
|
||||
* xcd - $CASROOT/adm/<OS>/xcd
|
||||
* xcd - $CASROOT/adm/\<OS\>/xcd
|
||||
|
||||
@section wok4 Generation of documentation
|
||||
|
||||
|
@@ -6,7 +6,7 @@ on Mac OS X with Xcode.
|
||||
|
||||
If you are building OCCT from bare sources (as in Git repository), or do some
|
||||
changes affecting CDL files, you need to use WOK to re-generate header files
|
||||
and build scripts / projects. See file \ref wok "WOK" for instructions.
|
||||
and build scripts / projects. See \ref dev_guides__building__wok for instructions.
|
||||
|
||||
Before building OCCT, you need to install required third-party libraries; see
|
||||
OCCT_Build3rdParty_OSX.pdf for details.
|
||||
|
@@ -1,6 +1,12 @@
|
||||
Component Definition Language (CDL) {#dev_guides__cdl}
|
||||
==============================
|
||||
|
||||
@tableofcontents
|
||||
|
||||
@section occt_cdl_0 DEPRECATION WARNING
|
||||
|
||||
Please note that CDL is considered as obsolete and is to be removed in one of future releases of OCCT.
|
||||
|
||||
@section occt_1819379591_354121062 CDL and Application Architecture
|
||||
|
||||
CDL is the component definition language of the Open CASCADE Technology (**OCCT**) programming platform. Some components, which CDL allows you to create, are specific to OCCT application architecture. These and other components, which you can define using CDL include the following:
|
||||
@@ -10,7 +16,7 @@ CDL is the component definition language of the Open CASCADE Technology (**OCCT
|
||||
* Schema
|
||||
* Executable
|
||||
* Client.
|
||||
A** class** is the fundamental software component in object-oriented development. Because of a very large number of resources used in large-scale applications, the **class **itself is too small to be used as a basic management unit.
|
||||
A **class** is the fundamental software component in object-oriented development. Because of a very large number of resources used in large-scale applications, the **class** itself is too small to be used as a basic management unit.
|
||||
|
||||
So, while the class is the basic data component defined in CDL, this language also provides a way to group classes, **enumerations**, and **exceptions **together – the **package**. A package groups together a number of classes, which have semantic links. For example, a geometry package would contain Point, Line, and Circle classes. A package can also contain enumerations, exceptions, and package methods. In practice, a class name is prefixed with the name of its package e.g. Geom_Circle.
|
||||
|
||||
@@ -19,18 +25,18 @@ Using the services described in the **packages**, you can construct an **execut
|
||||
To save data in a file, you need to define persistent classes. Then, you group these classes in a schema, which provides the necessary read/write tools.
|
||||
|
||||
|
||||
@image html /dev_guides/cdl/images/cdl_image003.jpg
|
||||
@image latex /dev_guides/cdl/images/cdl_image003.jpg
|
||||
@image html /dev_guides/cdl/images/cdl_image003.png
|
||||
@image latex /dev_guides/cdl/images/cdl_image003.png
|
||||
|
||||
Figure 1. Building an Open CASCADE Technology application
|
||||
@section occt_1819379591_986437237 2. Introduction to CDL
|
||||
@subsection occt_1819379591_98643723721 Purposes of the Language
|
||||
You can use CDL to **define data **in the Open CASCADE Technology environment. CDL allows you to define various kinds of data types supporting the application architecture and development methodology, which you envision. CDL is neither an analysis formalism (e.g. Booch methodology) nor a data manipulation language (e.g. C++).
|
||||
You can use CDL to **define** **data** in the Open CASCADE Technology environment. CDL allows you to define various kinds of data types supporting the application architecture and development methodology, which you envision. CDL is neither an analysis formalism (e.g. Booch methodology) nor a data manipulation language (e.g. C++).
|
||||
|
||||
You use CDL in the **design phase **of a development process to define a set of software components which best model the concepts stated in the application specification.
|
||||
You use CDL in the **design** **phase** of a development process to define a set of software components which best model the concepts stated in the application specification.
|
||||
|
||||
@image html /dev_guides/cdl/images/cdl_image004.jpg
|
||||
@image latex /dev_guides/cdl/images/cdl_image004.jpg
|
||||
@image html /dev_guides/cdl/images/cdl_image004.png
|
||||
@image latex /dev_guides/cdl/images/cdl_image004.png
|
||||
|
||||
Figure 2. The Development Process
|
||||
|
||||
@@ -97,8 +103,8 @@ You declare the variables of a **data manipulation language **as being of certa
|
||||
* Data types manipulated by handle (or reference)
|
||||
* Data types manipulated by value
|
||||
|
||||
@image html /dev_guides/cdl/images/cdl_image005.jpg
|
||||
@image latex /dev_guides/cdl/images/cdl_image005.jpg
|
||||
@image html /dev_guides/cdl/images/cdl_image005.png
|
||||
@image latex /dev_guides/cdl/images/cdl_image005.png
|
||||
|
||||
Figure 3. Manipulation of data types
|
||||
|
||||
@@ -399,8 +405,8 @@ Two types are manipulated by handle:
|
||||
* Types defined using classes inheriting from the **Transient **class.
|
||||
These types are not storable as such in a file.
|
||||
|
||||
@image html /dev_guides/cdl/images/cdl_image006.jpg
|
||||
@image latex /dev_guides/cdl/images/cdl_image006.jpg
|
||||
@image html /dev_guides/cdl/images/cdl_image006.png
|
||||
@image latex /dev_guides/cdl/images/cdl_image006.png
|
||||
|
||||
Figure 4. Manipulation of a data type by reference
|
||||
|
||||
@@ -411,8 +417,8 @@ Types, which are manipulated by value, behave in a more direct fashion than tho
|
||||
|
||||
You can store types known to the schema (i.e. either primitives or inheriting from Storable) and manipulated by value inside a persistent object as part of the representation. This is the only way for you to store objects “manipulated by value” in a file.
|
||||
|
||||
@image html /dev_guides/cdl/images/cdl_image007.jpg
|
||||
@image latex /dev_guides/cdl/images/cdl_image007.jpg
|
||||
@image html /dev_guides/cdl/images/cdl_image007.png
|
||||
@image latex /dev_guides/cdl/images/cdl_image007.png
|
||||
|
||||
Figure 5. Manipulation of a data type by value
|
||||
Three types are manipulated by value:
|
||||
@@ -475,8 +481,8 @@ The elements, which make up the definition of a class, are divided into four pa
|
||||
* the internal representation
|
||||
* the friend methods and friend classes.
|
||||
|
||||
@image html /dev_guides/cdl/images/cdl_image009.jpg
|
||||
@image latex /dev_guides/cdl/images/cdl_image009.jpg
|
||||
@image html /dev_guides/cdl/images/cdl_image009.png
|
||||
@image latex /dev_guides/cdl/images/cdl_image009.png
|
||||
|
||||
**Figure 7. Contents of a class**
|
||||
*** a deferred class does not have to contain a constructor**
|
||||
@@ -570,8 +576,8 @@ Grouped behind the keyword **uses **are the names of all the packages containin
|
||||
|
||||
The methods you declare in a package do not belong to any particular class. **Package methods ***must *carry a name different from the data types contained in the package. Like any other method, they can be overloaded. With the exception of the keyword **me **and the visibility (a package method can *only *be either public or private) package methods are described in the same way as **instance methods**.
|
||||
|
||||
@image html /dev_guides/cdl/images/cdl_image010.jpg
|
||||
@image latex /dev_guides/cdl/images/cdl_image010.jpg
|
||||
@image html /dev_guides/cdl/images/cdl_image010.png
|
||||
@image latex /dev_guides/cdl/images/cdl_image010.png
|
||||
Figure 8. Contents of a package
|
||||
|
||||
The example of the package below includes some of the basic data structures:
|
||||
@@ -1549,8 +1555,8 @@ friends Distance from Line (me; P : Point)
|
||||
|
||||
A method can be a friend to many classes. The class to which the method belongs does *not *need to appear in the **uses **clause of other classes of which it is a friend.
|
||||
|
||||
@image html /dev_guides/cdl/images/cdl_image011.jpg
|
||||
@image latex /dev_guides/cdl/images/cdl_image011.jpg
|
||||
@image html /dev_guides/cdl/images/cdl_image011.png
|
||||
@image latex /dev_guides/cdl/images/cdl_image011.png
|
||||
|
||||
When the methods of a class are all friends of another class, you can establish the friendship at the level of the class.
|
||||
|
||||
@@ -1786,8 +1792,8 @@ identifier **as**** **type-constraint
|
||||
|
||||
|
||||
|
||||
@subsection occt_1819379591_213955286151 Comparison of CDL & C++ Syntax for Data Types manipulated by Handle and by Value
|
||||
@subsection occt_1819379591_213955286151 Comparison of CDL & C++ Syntax for Data Types manipulated by Handle and by Value
|
||||
|
||||
@image html /dev_guides/cdl/images/cdl_image012.jpg
|
||||
@image latex /dev_guides/cdl/images/cdl_image012.jpg
|
||||
@image html /dev_guides/cdl/images/cdl_image012.png
|
||||
@image latex /dev_guides/cdl/images/cdl_image012.png
|
||||
|
Before Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 45 KiB |
BIN
dox/dev_guides/cdl/images/cdl_image003.png
Normal file
After Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 17 KiB |
BIN
dox/dev_guides/cdl/images/cdl_image004.png
Normal file
After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 16 KiB |
BIN
dox/dev_guides/cdl/images/cdl_image005.png
Normal file
After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 22 KiB |
BIN
dox/dev_guides/cdl/images/cdl_image006.png
Normal file
After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 20 KiB |
BIN
dox/dev_guides/cdl/images/cdl_image007.png
Normal file
After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 17 KiB |
BIN
dox/dev_guides/cdl/images/cdl_image008.png
Normal file
After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 27 KiB |
BIN
dox/dev_guides/cdl/images/cdl_image009.png
Normal file
After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 50 KiB |
BIN
dox/dev_guides/cdl/images/cdl_image010.png
Normal file
After Width: | Height: | Size: 91 KiB |
Before Width: | Height: | Size: 60 KiB |
BIN
dox/dev_guides/cdl/images/cdl_image011.png
Normal file
After Width: | Height: | Size: 138 KiB |
Before Width: | Height: | Size: 42 KiB |
BIN
dox/dev_guides/cdl/images/cdl_image012.png
Normal file
After Width: | Height: | Size: 77 KiB |
@@ -1,79 +1,17 @@
|
||||
Developer Guides {#dev_guides}
|
||||
================
|
||||
|
||||
## Source Repository
|
||||
The following documents provide information on OCCT building, development and testing:
|
||||
|
||||
This directory contains sources of Open CASCADE Technology (OCCT), a collection
|
||||
of C++ libraries providing services for 3D surface and solid modeling, CAD data
|
||||
exchange, and visualization. OCCT can be best applied in development of
|
||||
software dealing with 3D modeling (CAD), manufacturing / measuring (CAM) or
|
||||
numerical simulation (CAE).
|
||||
* @subpage dev_guides__building "Building OCCT from sources"
|
||||
* @subpage dev_guides__documentation "Documentation system"
|
||||
* Coding Rules
|
||||
* Contribution Workflow
|
||||
* Guide to installing and using Git for OCCT development
|
||||
* @subpage dev_guides__tests "Automatic Testing system"
|
||||
|
||||
The OCCT code is subject to the Open CASCADE Technology Public License Version
|
||||
6.6 (the "License"). You may not use the content of the relevant files except in
|
||||
compliance with the License. Please see the LICENSE file or obtain a copy of the
|
||||
License at http://www.opencascade.org and read it completely before using this
|
||||
software.
|
||||
Two other documents provide details on obsolete technologies used by OCCT,
|
||||
to be removed in future releases:
|
||||
|
||||
## Automatic tests
|
||||
|
||||
OCCT automatic testing system is integrated with @ref draw "DRAW Test Harness",
|
||||
a console application based on Tcl (a scripting language).
|
||||
All tests are run from DRAW command prompt (run **draw.bat** or
|
||||
**draw.sh** to start it).
|
||||
|
||||
Standard OCCT tests are located in subdirectory **tests** of the OCCT root
|
||||
folder. This location is set as default at DRAW start (see environment variable
|
||||
_CSF_TestScriptsPath_ defined in **src/DrawResources/DrawDefaults**).
|
||||
|
||||
The tests are organized in three levels:
|
||||
- Group: a group of related test grids, usually testing a particular subset of OCCT functionality (e.g. *blend*).
|
||||
- Grid: a set of test cases within a group, usually aimed at testing a particular aspect or mode of execution of the relevant functionality (e.g. *buildevol*).
|
||||
- Test case: a script implementing an individual test (e.g. *K4*).
|
||||
|
||||
To run all tests, type command *testgrid*:
|
||||
|
||||
Draw[]\> testgrid
|
||||
|
||||
For running only a group or a grid of tests, give additional arguments indicating the group and (if needed) the grid name:
|
||||
|
||||
Draw[]\> testgrid blend simple
|
||||
|
||||
As the tests progress, the result of each test case is reported.
|
||||
At the end of the log a summary of test cases is output, including the list of
|
||||
detected regressions and improvements, if any.
|
||||
The tests are considered as non-regressive if only OK, BAD (i.e. known problem),
|
||||
and SKIPPED (i.e. not executed, typically because of lack of a data file)
|
||||
statuses are reported.
|
||||
|
||||
To run a single test, type command 'test' followed by the names of
|
||||
group, grid, and test case.
|
||||
|
||||
Draw[1]\> test blend simple A1
|
||||
CASE blend simple A1: OK
|
||||
|
||||
To see intermediate commands and their output during the test execution,
|
||||
add one more argument '-echo' at the end of the command line, or type 'dlog get'
|
||||
after test completion.
|
||||
|
||||
For more information consult \subpage dev_guides__tests
|
||||
|
||||
## docs
|
||||
**short description**
|
||||
|
||||
\subpage dev_guides__documentation
|
||||
|
||||
## wok
|
||||
**short description**
|
||||
|
||||
\subpage dev_guides__wok
|
||||
|
||||
## building
|
||||
**short description**
|
||||
|
||||
\subpage dev_guides__building
|
||||
|
||||
## cdl
|
||||
**short description**
|
||||
|
||||
\subpage dev_guides__cdl
|
||||
* @subpage dev_guides__wok "Workshop Organization Kit (WOK)"
|
||||
* @subpage dev_guides__cdl "Component Definition Language (CDL)"
|
||||
|
@@ -1,5 +1,7 @@
|
||||
Documentation {#dev_guides__documentation}
|
||||
=================
|
||||
Documentation System {#dev_guides__documentation}
|
||||
======================
|
||||
|
||||
@tableofcontents
|
||||
|
||||
@section OCCT_DM_SECTION_1 Introduction
|
||||
|
||||
@@ -8,20 +10,27 @@ This document provides practical guidenes for generation and editing of OCCT use
|
||||
@section OCCT_DM_SECTION_2 Prerequisites
|
||||
|
||||
<b>Tcl/Tk</b>
|
||||
The lates version: http://www.tcl.tk/software/tcltk/download.html
|
||||
Version 8.5 or 8.6: http://www.tcl.tk/software/tcltk/download.html
|
||||
|
||||
<b>Doxygen</b> ( >= 1.8.4 )
|
||||
The latest version: http://www.stack.nl/~dimitri/doxygen/download.html
|
||||
<b>Doxygen</b>
|
||||
Version 1.8.4 or above: http://www.stack.nl/~dimitri/doxygen/download.html
|
||||
|
||||
<b>MathJax</b> (used for rendering math formulas in browser). Download it for local installation or use the MathJax Content Delivery Network. \(read
|
||||
@htmlonly <a href="#OCCT_DM_SECTION_A_9">Formulas</a> @endhtmlonly paragraph for more detailed description\).
|
||||
<b>MathJax</b> (used for rendering math formulas in browser).
|
||||
See \ref OCCT_DM_SECTION_A_9 paragraph for more detailed description.
|
||||
The latest version: http://www.mathjax.org/download/
|
||||
|
||||
<b>MiKTeX</b> or equivalent tool (used for PDF document creation)
|
||||
|
||||
Latest version: http://miktex.org/download
|
||||
|
||||
**Note**: to generate pdf documentation with MiKTeX you should execute gen.bat with MiKTeX environment
|
||||
(e.g. into MiKTeX command promt)
|
||||
**Note**: to generate pdf documentation with MiKTeX you should execute gendoc.bat within MiKTeX environment
|
||||
(run gendoc.bat in MiKTeX command promt or update PATH for MiKTeX bin folder). Also in process of pdf generation
|
||||
MiKTeX can request you to download missing packages if MiKTeX was installed with option below:
|
||||
|
||||
@image html /dev_guides/documentation/images/documentation_image002.png
|
||||
@image latex /dev_guides/documentation/images/documentation_image002.png
|
||||
|
||||
If this option is set to "Yes", MiKTeX will download missing packages automatically.
|
||||
|
||||
@section OCCT_DM_SECTION_2_1 Documentation Generation
|
||||
|
||||
@@ -31,8 +40,8 @@ gendoc.bat options:
|
||||
|
||||
* -html : To generate HTML files (cannot be used with -pdf);
|
||||
* -pdf : To generate PDF files (cannot be used with -html);
|
||||
* -m=<modules_list> : Specifies list of articles to generate. If it is not specified, all files, mentioned in FILES.txt are processed;
|
||||
* -l=<document_name> : Specifies the article caption for a single document;
|
||||
* -m=\<modules_list\> : Specifies list of articles to generate. If it is not specified, all files, mentioned in FILES.txt are processed;
|
||||
* -l=\<document_name\> : Specifies the article caption for a single document;
|
||||
* -h : Prints help message;
|
||||
* -v : Specifies the Verbose mode (info on all script actions is shown).
|
||||
|
||||
@@ -55,19 +64,19 @@ where documentation .md is name of article and devs_guid/documentation/ is relat
|
||||
* use this name with -m option in the generation process:
|
||||
|
||||
@verbatim
|
||||
% gen.bat -html -m=devs_guid/documentation/documentation.md
|
||||
% gendoc.bat -html -m=devs_guid/documentation/documentation.md
|
||||
@endverbatim
|
||||
|
||||
Multiple files are separated with comma:
|
||||
|
||||
@verbatim
|
||||
% gen.bat -html -m=MD_FILE_1,MD_FILE_2
|
||||
% gendoc.bat -html -m=MD_FILE_1,MD_FILE_2
|
||||
@endverbatim
|
||||
|
||||
To sepcify a article name with -l option, use tcl list to prevent whitespaces incorrect interpretation:
|
||||
To sepcify a article name with -l option, use quotes to prevent incorrect interpretation of whitespaces:
|
||||
|
||||
@verbatim
|
||||
% gen.bat -pdf -m=MD_FILE_1 -l=[list MD File 1 Label]
|
||||
% gendoc.bat -pdf -m=MD_FILE_1 -l="Label of MD_FILE_1 document"
|
||||
@endverbatim
|
||||
|
||||
@section OCCT_DM_SECTION_3 Documentation Conventions
|
||||
@@ -133,3 +142,304 @@ http://en.wikipedia.org/wiki/Help:Displaying_a_formula
|
||||
|
||||
More information on MarkDown and Doxygen syntax can be found at:
|
||||
http://www.stack.nl/~dimitri/doxygen/manual
|
||||
|
||||
@section OCCT_DM_SECTION_A Appendix 1: Document Syntax
|
||||
|
||||
Each OCCT document file in *.md format has a simple structure.
|
||||
It can contain:
|
||||
|
||||
| Content type | Obligation |
|
||||
| :---------------- | :-------------------: |
|
||||
| Header | M |
|
||||
| Footer | M |
|
||||
| Plain text | O |
|
||||
| List | O |
|
||||
| Table | O |
|
||||
| Code | O |
|
||||
| Formula | O |
|
||||
| Image | O |
|
||||
| Page numbers | M (auto generation) |
|
||||
| Table of contents | M (auto generation) |
|
||||
|
||||
The legend:
|
||||
|
||||
* M is for Mandatory
|
||||
* O is for Optional
|
||||
|
||||
@subsection OCCT_DM_SECTION_A_1 Text Caption (a header)
|
||||
|
||||
headings of different levels can be specified with the following code:
|
||||
|
||||
@verbatim
|
||||
Header 1 {#header1}
|
||||
=======
|
||||
@endverbatim
|
||||
|
||||
to get
|
||||
|
||||
Header 1
|
||||
=========
|
||||
|
||||
and with the following code:
|
||||
|
||||
@verbatim
|
||||
Header 2 {#header2}
|
||||
--------
|
||||
@endverbatim
|
||||
|
||||
to get
|
||||
|
||||
Header 2
|
||||
---------
|
||||
|
||||
Where a word in curly braces is a MarkDown-style reference, which can be used in table of contents.
|
||||
If you would like to have the table of contents, it is recommended to use \@section,
|
||||
\@subsection and \@subsubsection pages instead of MarkDown headers as follows:
|
||||
|
||||
@verbatim
|
||||
@section Section_Name Section Header
|
||||
@subsection SubSection_Name SubSection Header
|
||||
@subsubsection SubSubSection_Name SubSubSection Header
|
||||
@endverbatim
|
||||
|
||||
@subsection OCCT_DM_SECTION_A_2 Plain Text
|
||||
|
||||
Plain text is a text in a notepad-like format. To insert special symbols,
|
||||
like \< , \> or \\, prepend them with \\ character: \\\<, \\\>, \\\\
|
||||
To emphasize some words, write one pair of asterisks ( * ) or underscores ( _ ) across the word
|
||||
to make it *italic* and two pairs of these symbols to make a word **Bold**.
|
||||
|
||||
@subsection OCCT_DM_SECTION_A_3 Lists
|
||||
|
||||
To create a bulleted list, start each line with a hyphen or an asterisk,
|
||||
followed by a space. List items can be nested. This code:
|
||||
|
||||
@verbatim
|
||||
* Bullet 1
|
||||
* Bullet 2
|
||||
* Bullet 2a
|
||||
* Bullet 2b
|
||||
* Bullet 3
|
||||
@endverbatim
|
||||
|
||||
produces this list:
|
||||
|
||||
* Bullet 1
|
||||
* Bullet 2
|
||||
* Bullet 2a
|
||||
* Bullet 2b
|
||||
* Bullet 3
|
||||
|
||||
To create a numbered list, start each line with number and a period, then a space. Thus this code
|
||||
|
||||
@verbatim
|
||||
1. ListItem_1
|
||||
2. ListItem_2
|
||||
3. ListItem_3
|
||||
@endverbatim
|
||||
|
||||
produces this list:
|
||||
|
||||
1. ListItem_1
|
||||
2. ListItem_2
|
||||
3. ListItem_3
|
||||
|
||||
It is recommended to indent lists with 2 spaces.
|
||||
|
||||
@subsection OCCT_DM_SECTION_A_4 Tables
|
||||
|
||||
A table consists of a header line, a separator line, and at least one row line.
|
||||
Table columns are separated by the pipe (|) character. The following example:
|
||||
|
||||
@verbatim
|
||||
First Header | Second Header
|
||||
------------- | -------------
|
||||
Content Cell | Content Cell
|
||||
Content Cell | Content Cell
|
||||
@endverbatim
|
||||
|
||||
will produce the following table:
|
||||
|
||||
First Header | Second Header
|
||||
------------ | -------------
|
||||
Content Cell | Content Cell
|
||||
Content Cell | Content Cell
|
||||
|
||||
Column alignment can be controlled via one or two colons at the header separator line:
|
||||
|
||||
@verbatim
|
||||
| Right | Center | Left |
|
||||
| ----: | :----: | :---- |
|
||||
| 10 | 10 | 10 |
|
||||
| 1000 | 1000 | 1000 |
|
||||
@endverbatim
|
||||
|
||||
which will looks as follows:
|
||||
|
||||
| Right | Center | Left |
|
||||
| ----: | :----: | :---- |
|
||||
| 10 | 10 | 10 |
|
||||
| 1000 | 1000 | 1000 |
|
||||
|
||||
@subsection OCCT_DM_SECTION_A_5 Code Blocks
|
||||
|
||||
It is recommended to indent a code lines with 4 spaces.
|
||||
A fenced code block does not require indentation, and is defined by a pair of "fence lines".
|
||||
Such line consists of 3 or more tilde (~) characters on a line.
|
||||
The end of the block should have the same number of tildes. Here is an example:
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
a one-line code block
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
By default the output is the same as for a normal code block.
|
||||
To highlight the code, the developer has to indicate the typical file extension,
|
||||
which corresponds to the programming language, after the opening fence.
|
||||
For highlighting according to the C++ language, for instance, write the following code (the curly braces and dot are optional):
|
||||
|
||||
@verbatim
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
|
||||
int func(int a,int b) { return a*b; }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@endverbatim
|
||||
|
||||
which will produce:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
|
||||
int func(int a,int b) { return a*b; }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Verbatim content can be written by using framing \@verbatim \@endverbatim . For instance
|
||||
|
||||
@verbatim
|
||||
verbatim text
|
||||
@endverbatim
|
||||
|
||||
@subsection OCCT_DM_SECTION_A_6 References
|
||||
|
||||
To insert a reference to a website, it is proposed to write a URL. For example: http://en.wikipedia.org
|
||||
To insert a reference to another part of the same document, the developer can write:
|
||||
|
||||
@verbatim
|
||||
@htmlonly
|
||||
<a href="#OCCT_DOC_SECTION_5">Doxygen Configuration file</a>
|
||||
@endhtmlonly
|
||||
@endverbatim
|
||||
|
||||
to get a link to paragraph : @htmlonly <a href="#OCCT_DOC_SECTION_5">Doxygen configuration</a> @endhtmlonly
|
||||
|
||||
@subsection OCCT_DM_SECTION_A_7 Images
|
||||
|
||||
To insert image into document the developer can write the following code(in Doxygen-style):
|
||||
@verbatim
|
||||

|
||||
@endverbatim
|
||||
|
||||
This code tells Doxygen to insert a picture right in the place this code was written. Like this:
|
||||
@verbatim
|
||||

|
||||
@endverbatim
|
||||
|
||||

|
||||
|
||||
@subsection OCCT_DM_SECTION_A_8 Table Of Contents
|
||||
|
||||
To get the table of contents at the beginning of the document, write \@tableofcontents tag.
|
||||
But it is not needed now because TreeView option for HTML is used.
|
||||
The TOC in the PDF document will be generated automatically.
|
||||
|
||||
@subsection OCCT_DM_SECTION_A_9 Formulas
|
||||
|
||||
Formulas within documents will be generated using MathJax tool.
|
||||
|
||||
A developer has to specify these parameters in Doxyfile to enable support of MathJax in Doxygen:
|
||||
|
||||
USE_MATHJAX = YES
|
||||
MATHJAX_FORMAT = HTML-CSS
|
||||
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
|
||||
MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
|
||||
|
||||
To use MathJax tool with the HTML page, it's \<head\> block has to contain
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.html}
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]},
|
||||
displayAlign: "left"
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript"
|
||||
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
|
||||
</script>
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
First script configures MathJax to understand separator types and to left allign formulas.
|
||||
The second script inserts reference to MathJax tool.
|
||||
This tool will always be used when the HTML output will be shown.
|
||||
|
||||
Equations can be written by several ways:
|
||||
|
||||
1.Unnumbered displayed formulas that are centered on a separate line.
|
||||
These formulas should be put between \@f\[ and \@f\] tags. An example:
|
||||
|
||||
@verbatim
|
||||
@f$[
|
||||
|I_2|=\left| \int_{0}^T \psi(t)
|
||||
\left\{
|
||||
u(a,t)-
|
||||
\int_{\gamma(t)}^a
|
||||
\frac{d\theta}{k(\theta,t)}
|
||||
\int_{a}^\theta c(\xi)u_t(\xi,t)\,d\xi
|
||||
\right\} dt
|
||||
\right|
|
||||
@f$]
|
||||
@endverbatim
|
||||
|
||||
gives the following result:
|
||||
|
||||
@f$
|
||||
|I_2|=\left| \int_{0}^T \psi(t)
|
||||
\left\{
|
||||
u(a,t)-
|
||||
\int_{\gamma(t)}^a
|
||||
\frac{d\theta}{k(\theta,t)}
|
||||
\int_{a}^\theta c(\xi)u_t(\xi,t)\,d\xi
|
||||
\right\} dt
|
||||
\right|
|
||||
@f$
|
||||
|
||||
2.Formulas can also be put between @verbatim \begin{align} @endverbatim and @verbatim \end{align} @endverbatim tags. An example:
|
||||
|
||||
@verbatim
|
||||
\begin{align}
|
||||
\dot{x} & = \sigma(y-x) \\
|
||||
\dot{y} & = \rho x - y - xz \\
|
||||
\dot{z} & = -\beta z + xy
|
||||
\end{align}
|
||||
@endverbatim
|
||||
|
||||
gives the following result:
|
||||
@latexonly
|
||||
\begin{align}
|
||||
\dot{x} & = \sigma(y-x) \\
|
||||
\dot{y} & = \rho x - y - xz \\
|
||||
\dot{z} & = -\beta z + xy
|
||||
\end{align}
|
||||
@endlatexonly
|
||||
|
||||
@htmlonly
|
||||
\begin{align}
|
||||
\dot{x} & = \sigma(y-x) \\
|
||||
\dot{y} & = \rho x - y - xz \\
|
||||
\dot{z} & = -\beta z + xy
|
||||
\end{align}
|
||||
@endhtmlonly
|
||||
|
||||
3.Inline formulas can be specified using this syntax:
|
||||
|
||||
@verbatim
|
||||
@f$ \sqrt{3x-1}+(1+x)^2 @f$
|
||||
@endverbatim
|
||||
|
||||
that leads to the following result: @f$ \sqrt{3x-1}+(1+x)^2 @f$
|
||||
|
BIN
dox/dev_guides/documentation/images/documentation_image002.png
Normal file
After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 12 KiB |
@@ -1,6 +1,8 @@
|
||||
Automated Testing System {#dev_guides__tests}
|
||||
======================================
|
||||
|
||||
@tableofcontents
|
||||
|
||||
@section testmanual_1 Introduction
|
||||
|
||||
This document provides overview and practical guidelines for work with OCCT automatic testing system.
|
||||
@@ -10,11 +12,13 @@ more in-depth description of the test system, required for modifying the tests a
|
||||
|
||||
@subsection testmanual_1_1 Basic Information
|
||||
|
||||
OCCT automatic testing system is organized around DRAW Test Harness [1],
|
||||
OCCT automatic testing system is organized around DRAW Test Harness @ref user_guides__test_harness "DRAW Test Harness",
|
||||
a console application based on Tcl (a scripting language) interpreter extended by OCCT-related commands.
|
||||
|
||||
Standard OCCT tests are included with OCCT sources and are located in subdirectory *tests*
|
||||
of the OCCT root folder. Other test folders can be included in the scope of the test system,
|
||||
e.g. for testing applications based on OCCT.
|
||||
|
||||
Logically the tests are organized in three levels:
|
||||
|
||||
* Group: group of related test grids, usually relating to some part of OCCT functionality (e.g. blend)
|
||||
@@ -257,8 +261,8 @@ which will be added to the test report when this status is detected.
|
||||
Example:
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
FAILED /\b[Ee]xception\b/ exception
|
||||
FAILED /\bError\b/ error
|
||||
FAILED /\\b[Ee]xception\\b/ exception
|
||||
FAILED /\\bError\\b/ error
|
||||
SKIPPED /Cannot open file for reading/ data file is missing
|
||||
SKIPPED /Could not read file .*, abandon/ data file is missing
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -273,7 +277,7 @@ with status IGNORE to ignore messages that would otherwise be treated as errors
|
||||
Example:
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
FAILED /\bFaulty\b/ bad shape
|
||||
FAILED /\\bFaulty\\b/ bad shape
|
||||
IGNORE /^Error [23]d = [\d.-]+/ debug output of blend command
|
||||
IGNORE /^Tcl Exception: tolerance ang : [\d.-]+/ blend failure
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -431,7 +435,7 @@ Example:
|
||||
Make sure that file parse.rules in the grid or group directory contains
|
||||
regular expression to catch possible messages indicating failure of the test.
|
||||
For instance, for catching errors reported by *checkshape* command
|
||||
relevant grids define a rule to recognize its report by the word *Faulty*: FAILED /\bFaulty\b/ bad shape
|
||||
relevant grids define a rule to recognize its report by the word *Faulty*: FAILED /\\bFaulty\\b/ bad shape
|
||||
For the messages generated in the script the most natural way is to use the word *Error* in the message.
|
||||
Example:
|
||||
|
||||
@@ -499,7 +503,8 @@ The new test created for a fixed problem should return FAILED without the fix, a
|
||||
@subsection testmanual_3_5 Marking BAD Cases
|
||||
|
||||
If the test produces invalid result at a certain moment then the corresponding bug
|
||||
should be created in the OCCT issue tracker [3], and the problem should be marked as TODO in the test script.
|
||||
should be created in the OCCT issue tracker http://tracker.dev.opencascade.org,
|
||||
and the problem should be marked as TODO in the test script.
|
||||
The following statement should be added to such test script:
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
|
||||
@@ -586,9 +591,3 @@ Example:
|
||||
d:/occt/test-data[_path_separator]d:/MyOCCTProject/tests
|
||||
return ;# this is to avoid an echo of the last command above in cout
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@section testmanual_5 References
|
||||
|
||||
-# DRAW Test Harness User’s Guide
|
||||
-# Perl regular expressions, http://perldoc.perl.org/perlre.html
|
||||
-# OCCT MantisBT issue tracker, http://tracker.dev.opencascade.org
|
||||
|
Before Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 7.0 KiB |
BIN
dox/dev_guides/wok/images/wok_image013.png
Normal file
After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 17 KiB |
BIN
dox/dev_guides/wok/images/wok_image014.png
Normal file
After Width: | Height: | Size: 61 KiB |
@@ -1,5 +1,17 @@
|
||||
Workshop Organisation Toolkit {#dev_guides__wok}
|
||||
==============================
|
||||
Workshop Organisation Kit {#dev_guides__wok}
|
||||
=========================
|
||||
|
||||
@tableofcontents
|
||||
|
||||
@section occt_wok_0 DEPRECATION WARNING
|
||||
|
||||
Please note that this document describes use of WOK as comprehensive
|
||||
build system. This use is outdated, and WOK is to be removed in
|
||||
one of future releases of OCCT.
|
||||
|
||||
Currently only small subset of WOK capabilities described in this document
|
||||
are actually necessary for building OCCT. See @ref dev_guides__building__wok
|
||||
for more practical guide.
|
||||
|
||||
@section occt_wok_1_ Introduction Glossary
|
||||
|
||||
@@ -2338,8 +2350,8 @@ Fetches the latest version of *File1.cxx* and *File2.hxx*.
|
||||
In the new WOK model:
|
||||
* each workbench can have its own database
|
||||
* the version control environment variables are relative to the workbench.
|
||||
@image html /dev_guides/wok/images/wok_image014.jpg "Workshop Installation Model"
|
||||
@image latex /dev_guides/wok/images/wok_image014.jpg "Workshop Installation Model"
|
||||
@image html /dev_guides/wok/images/wok_image014.png "Workshop Installation Model"
|
||||
@image latex /dev_guides/wok/images/wok_image014.png "Workshop Installation Model"
|
||||
|
||||
The following procedure explains how to set up the source management environment for a workshop.
|
||||
1. Open the factory and the workshop.
|
||||
|