4 WOK is a legacy build environment for Open CASCADE Technology. It is required
5 for generation of header files for classes defined with @ref ug_cdl "CDL"
6 ("Cascade Definition Language"). Also tools for generation of project files
7 for other build systems, and OCCT documentation, are integrated to WOK.
9 WOK thus is needed in the following situations:
10 - Building from OCCT sources from Git repository (do not contain generated files)
11 - Building after some changes made in CDL files
13 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.
15 @section wok1 Installing WOK
17 Download the latest version of binary distribution WOK from http://dev.opencascade.org/index.php?q=home/resources
19 @subsection wok11 Windows
21 Run the installer. You will be prompted to read and accept the OCCT Public License to proceed:
23 ![](/devs_guide/wok/images/wok_image001.jpg "")
25 Click Next and proceed with the installation.
26 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:
28 ![](/devs_guide/wok/images/wok_image002.jpg "")
30 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.
32 The shortcuts from this group provide two ways to run WOK:
33 * In command prompt window ("WOK TCL shell").
34 * In Emacs editor ("WOK Emacs"). Using Emacs is convenient if you need to work within WOK environment.
36 By default WOK installer creates a WOK factory with name "LOC" within workshop "dev" (WOK path :LOC:dev).
38 @subsection wok12 Linux
40 * Unpack the .tgz archive containing WOK distributive into an installation directory <WOK_INSTALL_DIR>.
42 * Perform the following commands assuming that you have unpacked WOK distributive archive into <WOK_INSTALL_DIR>:
43 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
44 cd <WOK_INSTALL_DIR>/site
46 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
48 Define all necessary paths to third-party products in the dialog window:
50 ![](/devs_guide/wok/images/wok_image003.jpg "")
52 * Run the following commands to create WOK LOC factory:
53 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
54 cd <WOK_INSTALL_DIR>/site
56 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
58 * Your installation procedure is over. To run WOK use one the following commands:
59 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
60 cd <WOK_INSTALL_DIR>/site
62 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
64 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
65 cd <WOK_INSTALL_DIR>/site
67 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 @subsection wok13 Mac OS X
71 * 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>.
73 * 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:
75 ![](/devs_guide/wok/images/wok_image004.jpg "")
77 * Run the following commands to create WOK LOC factory:
78 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
79 cd <WOK_INSTALL_DIR>/site
81 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
83 * 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.
86 @section wok2 Initialization of Workbench
88 To start working with OCCT, clone the OCCT Git repository from the server (see http://dev.opencascade.org/index.php?q=home/resources for details) or unpack the source archive.
90 Then create a WOK workbench (command wcreate) setting its Home to the directory, where the repository is created ($CASROOT variable). The workbench should have the same name as that directory.
92 For example, assuming that OCCT repository has been cloned into D:/occt folder:
93 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
94 LOC:dev> wcreate occt -DHome=D:/occt
95 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
97 Note: $CASROOT is equal to D:/occt now
99 Then you can work with this workbench using normal WOK functionality (wprocess, umake, etc.; see WOK User
\92s 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.
101 @section wok3 Generation of building projects
103 Use command wgenproj in WOK to generate derived headers, source and building projects files:
104 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
106 LOC:dev:occt> wgenproj [ -target=<TARGET> ] [ -no_wprocess ]
107 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
109 * vc8 - Visual Studio 2005
110 * vc9 - Visual Studio 2008
111 * vc10 - Visual Studio 2010
112 * vc11 - Visual Studio 2012
117 -no_wprocess - skip generation of derived headers and source files
119 Note that this command takes several minutes to complete at the first call.
121 Re-execute this step to generate derived headers, source and building projects files if some CDL files in OCCT have been modified (either by you directly, or due to updates in the repository). Note that in some cases WOK may fail to update correctly; in such case remove sub-directories drv and .adm and repeat the command.
123 To regenerate derived headers and source files without regeneration of projects use command:
124 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
126 LOC:dev:occt> wprocess -DGroups=Src,Xcpp
127 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
128 The generated building project has been placed into $CASROOT/adm folder:
129 * for vc8 - $CASROOT/adm/msvc/vc8
130 * for vc9 - $CASROOT/adm/msvc/vc9
131 * for vc10 - $CASROOT/adm/msvc/vc10
132 * for vc11 - $CASROOT/adm/msvc/vc11
133 * for cbp - $CASROOT/adm/<OS> /cbp
134 * for cmake - $CASROOT/adm/cmake
135 * for amk - $CASROOT/adm/lin/amk
136 * xcd - $CASROOT/adm/<OS>/xcd
138 @section wok4 Generation of documentation
140 Use command wgendoc in WOK to generate reference documentation:
141 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
143 :LOC:dev:occt> wgendoc
144 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
145 The following options can be used:
146 * -wb=< workbench name > the name of OCCT workbench (the current one by default);
147 * -m=< list of modules > the list of modules that will be contained in the documentation;
148 * -outdir=< path > the output directory for the documentation;
149 * -chm the option to generate CHM file;
150 * -hhc=< path > the path to HTML Help Compiler (hhc.exe) or equivalent;
151 * -qthelp=< path > the option to generate Qt Help file, it is necessary to specify the path to qthelpgenerator executable;
152 * -doxygen=< path > the path to Doxygen executable
153 * -dot=< path > the path to GraphViz dot executable