0024944: New custom-built Tcl is source of distribution problems
[occt.git] / dox / dev_guides / building / code_blocks.md
ba06f8bb 1Building with Code::Blocks on Mac OS X {#occt_dev_guides__building_code_blocks}
72b7576f 2======================================
576f8b11 4This file describes steps to build OCCT libraries from a complete source package
5on Mac OS X with **Code::Blocks**.
72b7576f 6
576f8b11 7If you build OCCT from bare sources (as in Git repository) or do some
72b7576f 8changes affecting CDL files, you need to use WOK to re-generate header files
ba06f8bb 9and build scripts / projects. See \ref occt_dev_guides__building_wok for instructions.
72b7576f 10
576f8b11 11Before building OCCT, you need to install the required third-party libraries; see
ba06f8bb 12paragraph 1 of \ref occt_dev_guides__building for details.
72b7576f 13
576f8b11 141. Add paths to the mandatory 3rd-party products (**Tcl/Tk** and **FreeType**) in file
15 *custom.sh* located in <i>\<OCCT_ROOT_DIR\></i>. For this:
72b7576f 16
576f8b11 17 1.1. Add paths to the includes in variable *CSF_OPT_INC*;
72b7576f 18
576f8b11 19 1.2. Add paths to the binary libraries in variable *CSF_OPT_LIB64*;
72b7576f 20
21 All paths should be separated by ":" symbol.
576f8b11 232. Add paths to the optional 3rd-party libraries (**TBB, gl2ps** and **FreeImage**)
24 in the aforementioned environment variables *CSF_OPT_INC* and
25 *CSF_OPT_LIB64* from file *custom.sh*.
72b7576f 26
27 If you want to build OCCT without the optional libraries perform the
28 following steps:
30 2.1 Disable unnecessary library in custom.sh by setting the corresponding
576f8b11 31 variable <i>HAVE_\<LIBRARY_NAME\></i> to *false*.
72b7576f 32
576f8b11 33~~~~~
34export HAVE_GL2PS=false
72b7576f 36
576f8b11 37 2.2 Remove this library from Linker settings in **Code::Blocks** for each project
38 that uses it: right click on the required project, choose **Build options**,
39 go to **Linker settings** tab in the opened window , select unnecessary
40 libraries and click **Delete** button.
72b7576f 41
423. Open Terminal application
576f8b11 444. Enter <i> \<OCCT_ROOT_DIR\></i>:
72b7576f 45
576f8b11 46~~~~~
72b7576f 47 cd \<OCCT_ROOT_DIR\>
576f8b11 48~~~~~
72b7576f 49
576f8b11 505. To start **Code::Blocks**, run the command <i>/codeblocks.sh</i>
72b7576f 51
576f8b11 526. To build all toolkits, click **Build->Build workspace** in the menu bar.
72b7576f 53
576f8b11 55To start *DRAWEXE*, which has been built with **Code::Blocks** on Mac OS X, perform
72b7576f 56the following steps:
576f8b11 581.Open Terminal application
72b7576f 59
576f8b11 602.Enter <i>\<OCCT_ROOT_DIR\></i>:
72b7576f 61
576f8b11 62~~~~~
72b7576f 63 cd \<OCCT_ROOT_DIR\>
576f8b11 64~~~~~
72b7576f 65
576f8b11 663.Run the script
72b7576f 68 ./draw_cbp.sh cbp [d]
576f8b11 69~~~~~
70 Option *d* is used if OCCT has been built in **Debug** mode.