0027193: Describe building OCCT with genproj tool
authorabv <abv@opencascade.com>
Thu, 3 Mar 2016 17:25:01 +0000 (20:25 +0300)
committerabv <abv@opencascade.com>
Fri, 4 Mar 2016 11:44:22 +0000 (14:44 +0300)
Description of building OCCT with WOK and automake scripts is removed from documentation.
Use of genproj utility is described in pages on building with MSVC, Code::Blocks, and XCode projects.

New script genconf allows starting configuration GUI explicitly; dialog is slightly revised.
Script genproj.sh is renamed to genproj; permissions for scripts are corrected for Linux.

Script env.bat does not set anymore environment required for Products.

25 files changed:
LICENSE_LGPL_21.txt [changed mode: 0755->0644]
adm/genconf.tcl
adm/templates/env.bat
dox/FILES_HTML.txt
dox/dev_guides/building/3rdparty/images/genconf_linux.png [new file with mode: 0644]
dox/dev_guides/building/3rdparty/images/genconf_osx.png [new file with mode: 0644]
dox/dev_guides/building/3rdparty/images/genconf_windows.png [new file with mode: 0644]
dox/dev_guides/building/automake.md [deleted file]
dox/dev_guides/building/building.md
dox/dev_guides/building/cmake/cmake.md
dox/dev_guides/building/code_blocks.md
dox/dev_guides/building/msvc.md
dox/dev_guides/building/wok/images/wok_image001.png [deleted file]
dox/dev_guides/building/wok/images/wok_image002.png [deleted file]
dox/dev_guides/building/wok/images/wok_image003.png [deleted file]
dox/dev_guides/building/wok/images/wok_image004.png [deleted file]
dox/dev_guides/building/wok/wok.md [deleted file]
dox/dev_guides/building/xcode.md
dox/dev_guides/upgrade/upgrade.md
genconf [new file with mode: 0755]
genconf.bat [new file with mode: 0644]
gendoc [changed mode: 0644->0755]
genproj [new file with mode: 0755]
genproj.bat
genproj.sh [deleted file]

old mode 100755 (executable)
new mode 100644 (file)
index 664059f..a9cf537 100644 (file)
@@ -363,7 +363,7 @@ proc wokdep:gui:Show64Bitness { theRowIter } {
 }
 
 # Header
 }
 
 # Header
-ttk::label    .myFrame.myVsFrame.myVsLbl       -text "Visual Studio configuration" -relief solid -padding {5 5 80 5}
+ttk::label    .myFrame.myVsFrame.myVsLbl       -text "Visual Studio configuration:" -padding {5 5 80 5}
 ttk::combobox .myFrame.myVsFrame.myVsCombo     -values $SYS_VS_LIST -state readonly -textvariable VSVER -width 30
 ttk::combobox .myFrame.myVsFrame.myArchCombo   -values { {32} {64} } -textvariable ARCH -state readonly -width 6
 entry         .myFrame.myVcEntry     -textvariable VCVER  -width 6
 ttk::combobox .myFrame.myVsFrame.myVsCombo     -values $SYS_VS_LIST -state readonly -textvariable VSVER -width 30
 ttk::combobox .myFrame.myVsFrame.myArchCombo   -values { {32} {64} } -textvariable ARCH -state readonly -width 6
 entry         .myFrame.myVcEntry     -textvariable VCVER  -width 6
@@ -371,12 +371,11 @@ entry         .myFrame.myVcVarsEntry -textvariable VCVARS -width 70
 ttk::button   .myFrame.myVcBrowseBtn -text "Browse" -command wokdep:gui:BrowseVcVars
 
 #
 ttk::button   .myFrame.myVcBrowseBtn -text "Browse" -command wokdep:gui:BrowseVcVars
 
 #
-ttk::label    .myFrame.myHxxChecks.myOcctBuildLbl -text "OCCT headers configuration" -relief solid -padding {5 5 80 5}
 checkbutton   .myFrame.myHxxChecks.myScutsCheck   -offvalue "false" -onvalue "true" -variable SHORTCUT_HEADERS
 checkbutton   .myFrame.myHxxChecks.myScutsCheck   -offvalue "false" -onvalue "true" -variable SHORTCUT_HEADERS
-ttk::label    .myFrame.myHxxChecks.myScutsLbl     -text "Short-cut headers instead original ones in inc"
+ttk::label    .myFrame.myHxxChecks.myScutsLbl     -text "Create short-cuts to headers in inc folder instead of copying"
 
 #
 
 #
-ttk::label    .myFrame.mySrchLbl       -text "3rd-parties search path" -relief solid -padding {5 5 80 5}
+ttk::label    .myFrame.mySrchLbl       -text "3rd-parties search path:" -padding {5 5 80 5}
 entry         .myFrame.mySrchEntry     -textvariable PRODUCTS_PATH -width 80
 ttk::button   .myFrame.mySrchBrowseBtn -text "Browse" -command wokdep:gui:BrowsePartiesRoot
 checkbutton   .myFrame.myChecks.myFImageCheck   -offvalue "false" -onvalue "true" -variable HAVE_FREEIMAGE -command wokdep:gui:UpdateList
 entry         .myFrame.mySrchEntry     -textvariable PRODUCTS_PATH -width 80
 ttk::button   .myFrame.mySrchBrowseBtn -text "Browse" -command wokdep:gui:BrowsePartiesRoot
 checkbutton   .myFrame.myChecks.myFImageCheck   -offvalue "false" -onvalue "true" -variable HAVE_FREEIMAGE -command wokdep:gui:UpdateList
@@ -397,7 +396,7 @@ checkbutton   .myFrame.myChecks.myJDKCheck      -offvalue "false" -onvalue "true
 ttk::label    .myFrame.myChecks.myJDKLbl        -text "Search JDK"
 
 # Additional headers search paths
 ttk::label    .myFrame.myChecks.myJDKLbl        -text "Search JDK"
 
 # Additional headers search paths
-ttk::label    .myFrame.myIncLbl    -text "Additional headers search paths" -relief solid -padding {5 5 80 5}
+ttk::label    .myFrame.myIncLbl    -text "Additional headers search paths:" -padding {5 5 80 5}
 scrollbar     .myFrame.myIncScrl   -command ".myFrame.myIncList yview"
 listbox       .myFrame.myIncList   -listvariable CSF_OPT_INC -width 80 -height 5 -yscrollcommand ".myFrame.myIncScrl set"
 ttk::button   .myFrame.myIncAdd    -text "Add"     -command wokdep:gui:AddIncPath
 scrollbar     .myFrame.myIncScrl   -command ".myFrame.myIncList yview"
 listbox       .myFrame.myIncList   -listvariable CSF_OPT_INC -width 80 -height 5 -yscrollcommand ".myFrame.myIncScrl set"
 ttk::button   .myFrame.myIncAdd    -text "Add"     -command wokdep:gui:AddIncPath
@@ -407,7 +406,7 @@ ttk::button   .myFrame.myIncClear  -text "Reset"   -command wokdep:gui:ResetIncP
 ttk::label    .myFrame.myIncErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
 
 # Additional libraries (32-bit) search paths
 ttk::label    .myFrame.myIncErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
 
 # Additional libraries (32-bit) search paths
-ttk::label    .myFrame.myLib32Lbl    -text "Additional libraries (32-bit) search paths" -relief solid -padding {5 5 80 5}
+ttk::label    .myFrame.myLib32Lbl    -text "Additional libraries (32-bit) search paths:" -padding {5 5 80 5}
 scrollbar     .myFrame.myLib32Scrl   -command ".myFrame.myLib32List yview"
 listbox       .myFrame.myLib32List   -listvariable CSF_OPT_LIB32 -width 80 -height 5 -yscrollcommand ".myFrame.myLib32Scrl set"
 ttk::button   .myFrame.myLib32Add    -text "Add"     -command wokdep:gui:AddLib32Path
 scrollbar     .myFrame.myLib32Scrl   -command ".myFrame.myLib32List yview"
 listbox       .myFrame.myLib32List   -listvariable CSF_OPT_LIB32 -width 80 -height 5 -yscrollcommand ".myFrame.myLib32Scrl set"
 ttk::button   .myFrame.myLib32Add    -text "Add"     -command wokdep:gui:AddLib32Path
@@ -417,7 +416,7 @@ ttk::button   .myFrame.myLib32Clear  -text "Reset"   -command wokdep:gui:ResetLi
 ttk::label    .myFrame.myLib32ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
 
 # Additional libraries (64-bit) search paths
 ttk::label    .myFrame.myLib32ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
 
 # Additional libraries (64-bit) search paths
-ttk::label    .myFrame.myLib64Lbl    -text "Additional libraries (64-bit) search paths" -relief solid -padding {5 5 80 5}
+ttk::label    .myFrame.myLib64Lbl    -text "Additional libraries (64-bit) search paths:" -padding {5 5 80 5}
 scrollbar     .myFrame.myLib64Scrl   -command ".myFrame.myLib64List yview"
 listbox       .myFrame.myLib64List   -listvariable CSF_OPT_LIB64 -width 80 -height 5 -yscrollcommand ".myFrame.myLib64Scrl set"
 ttk::button   .myFrame.myLib64Add    -text "Add"     -command wokdep:gui:AddLib64Path
 scrollbar     .myFrame.myLib64Scrl   -command ".myFrame.myLib64List yview"
 listbox       .myFrame.myLib64List   -listvariable CSF_OPT_LIB64 -width 80 -height 5 -yscrollcommand ".myFrame.myLib64Scrl set"
 ttk::button   .myFrame.myLib64Add    -text "Add"     -command wokdep:gui:AddLib64Path
@@ -427,7 +426,7 @@ ttk::button   .myFrame.myLib64Clear  -text "Reset"   -command wokdep:gui:ResetLi
 ttk::label    .myFrame.myLib64ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
 
 # Additional executables (32-bit) search paths
 ttk::label    .myFrame.myLib64ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
 
 # Additional executables (32-bit) search paths
-ttk::label    .myFrame.myBin32Lbl    -text "Additional executables (32-bit) search paths" -relief solid -padding {5 5 80 5}
+ttk::label    .myFrame.myBin32Lbl    -text "Additional executables (32-bit) search paths:" -padding {5 5 80 5}
 scrollbar     .myFrame.myBin32Scrl   -command ".myFrame.myBin32List yview"
 listbox       .myFrame.myBin32List   -listvariable CSF_OPT_BIN32 -width 80 -height 5 -yscrollcommand ".myFrame.myBin32Scrl set"
 ttk::button   .myFrame.myBin32Add    -text "Add"     -command wokdep:gui:AddBin32Path
 scrollbar     .myFrame.myBin32Scrl   -command ".myFrame.myBin32List yview"
 listbox       .myFrame.myBin32List   -listvariable CSF_OPT_BIN32 -width 80 -height 5 -yscrollcommand ".myFrame.myBin32Scrl set"
 ttk::button   .myFrame.myBin32Add    -text "Add"     -command wokdep:gui:AddBin32Path
@@ -437,7 +436,7 @@ ttk::button   .myFrame.myBin32Clear  -text "Reset"   -command wokdep:gui:ResetBi
 ttk::label    .myFrame.myBin32ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
 
 # Additional executables (64-bit) search paths
 ttk::label    .myFrame.myBin32ErrLbl -text "Error: " -foreground red -padding {5 5 5 5}
 
 # Additional executables (64-bit) search paths
-ttk::label    .myFrame.myBin64Lbl    -text "Additional executables (64-bit) search paths" -relief solid -padding {5 5 80 5}
+ttk::label    .myFrame.myBin64Lbl    -text "Additional executables (64-bit) search paths:" -padding {5 5 80 5}
 scrollbar     .myFrame.myBin64Scrl   -command ".myFrame.myBin64List yview"
 listbox       .myFrame.myBin64List   -listvariable CSF_OPT_BIN64 -width 80 -height 5 -yscrollcommand ".myFrame.myBin64Scrl set"
 ttk::button   .myFrame.myBin64Add    -text "Add"     -command wokdep:gui:AddBin64Path
 scrollbar     .myFrame.myBin64Scrl   -command ".myFrame.myBin64List yview"
 listbox       .myFrame.myBin64List   -listvariable CSF_OPT_BIN64 -width 80 -height 5 -yscrollcommand ".myFrame.myBin64Scrl set"
 ttk::button   .myFrame.myBin64Add    -text "Add"     -command wokdep:gui:AddBin64Path
@@ -466,9 +465,8 @@ if { "$tcl_platform(platform)" == "windows" } {
 
 #
 grid .myFrame.myHxxChecks -row $aRowIter -column 0 -columnspan 10 -sticky w
 
 #
 grid .myFrame.myHxxChecks -row $aRowIter -column 0 -columnspan 10 -sticky w
-grid .myFrame.myHxxChecks.myOcctBuildLbl -row 0 -column 0
-grid .myFrame.myHxxChecks.myScutsCheck   -row 0 -column 1
-grid .myFrame.myHxxChecks.myScutsLbl     -row 0 -column 2
+grid .myFrame.myHxxChecks.myScutsCheck   -row 0 -column 0
+grid .myFrame.myHxxChecks.myScutsLbl     -row 0 -column 1
 incr aRowIter
 #
 grid .myFrame.mySrchLbl       -row $aRowIter -column 0 -columnspan 10 -sticky w
 incr aRowIter
 #
 grid .myFrame.mySrchLbl       -row $aRowIter -column 0 -columnspan 10 -sticky w
index db1c722..e9171b9 100644 (file)
@@ -11,10 +11,9 @@ set "SCRIPTROOT=%~dp0"
 set "SCRIPTROOT=%SCRIPTROOT:~0,-1%"
 
 rem ----- Reset values to defaults -----
 set "SCRIPTROOT=%SCRIPTROOT:~0,-1%"
 
 rem ----- Reset values to defaults -----
-set "CASROOT=__CASROOT__"
 set "CASDEB="
 set "CASDEB="
-set "VCVER=vc8"
-set "ARCH=32"
+set "VCVER=vc10"
+set "ARCH=64"
 set "VCVARS="
 set "HAVE_TBB=false"
 set "HAVE_OPENCL=false"
 set "VCVARS="
 set "HAVE_TBB=false"
 set "HAVE_OPENCL=false"
@@ -49,19 +48,14 @@ if /I ["%3"]     == ["d"]     set "CASDEB=d"
 if /I ["%3"]     == ["i"]     set "CASDEB=i"
 if /I ["%3"]     == ["relwithdeb"] set "CASDEB=i"
 
 if /I ["%3"]     == ["i"]     set "CASDEB=i"
 if /I ["%3"]     == ["relwithdeb"] set "CASDEB=i"
 
-set "CSF_OPT_INC=%CSF_OPT_INC%;%CASROOT%\inc"
-set "CSF_OPT_LIB32D=%CSF_OPT_LIB32%;%CASROOT%\win32\%VCVER%\libd"
-set "CSF_OPT_LIB64D=%CSF_OPT_LIB64%;%CASROOT%\win64\%VCVER%\libd"
-set "CSF_OPT_BIN32D=%CSF_OPT_BIN32%;%CASROOT%\win32\%VCVER%\bind"
-set "CSF_OPT_BIN64D=%CSF_OPT_BIN64%;%CASROOT%\win64\%VCVER%\bind"
-set "CSF_OPT_LIB32I=%CSF_OPT_LIB32%;%CASROOT%\win32\%VCVER%\libi"
-set "CSF_OPT_LIB64I=%CSF_OPT_LIB64%;%CASROOT%\win64\%VCVER%\libi"
-set "CSF_OPT_BIN32I=%CSF_OPT_BIN32%;%CASROOT%\win32\%VCVER%\bini"
-set "CSF_OPT_BIN64I=%CSF_OPT_BIN64%;%CASROOT%\win64\%VCVER%\bini"
-set "CSF_OPT_LIB32=%CSF_OPT_LIB32%;%CASROOT%\win32\%VCVER%\lib"
-set "CSF_OPT_LIB64=%CSF_OPT_LIB64%;%CASROOT%\win64\%VCVER%\lib"
-set "CSF_OPT_BIN32=%CSF_OPT_BIN32%;%CASROOT%\win32\%VCVER%\bin"
-set "CSF_OPT_BIN64=%CSF_OPT_BIN64%;%CASROOT%\win64\%VCVER%\bin"
+set "CSF_OPT_LIB32D=%CSF_OPT_LIB32%"
+set "CSF_OPT_LIB64D=%CSF_OPT_LIB64%"
+set "CSF_OPT_BIN32D=%CSF_OPT_BIN32%"
+set "CSF_OPT_BIN64D=%CSF_OPT_BIN64%"
+set "CSF_OPT_LIB32I=%CSF_OPT_LIB32%"
+set "CSF_OPT_LIB64I=%CSF_OPT_LIB64%"
+set "CSF_OPT_BIN32I=%CSF_OPT_BIN32%"
+set "CSF_OPT_BIN64I=%CSF_OPT_BIN64%"
 
 rem ----- Optional 3rd-parties should be enabled by HAVE macros -----
 set "CSF_OPT_CMPL="
 
 rem ----- Optional 3rd-parties should be enabled by HAVE macros -----
 set "CSF_OPT_CMPL="
@@ -150,9 +144,6 @@ if exist "%CASROOT%\src\DrawResources" (
   set "DRAWHOME=%CASROOT%\src\DrawResources"
   set "CSF_DrawPluginDefaults=%DRAWHOME%"
 )
   set "DRAWHOME=%CASROOT%\src\DrawResources"
   set "CSF_DrawPluginDefaults=%DRAWHOME%"
 )
-if exist "%SCRIPTROOT%\src\DrawResourcesProducts" (
-  set "CSF_DrawPluginProductsDefaults=%SCRIPTROOT%\src\DrawResourcesProducts"
-)
 goto :eof
 
 :concatCmplInc
 goto :eof
 
 :concatCmplInc
index 60df2dc..b072f30 100644 (file)
@@ -47,8 +47,6 @@ dev_guides/building/building.md
 dev_guides/building/3rdparty/3rdparty_windows.md
 dev_guides/building/3rdparty/3rdparty_linux.md
 dev_guides/building/3rdparty/3rdparty_osx.md
 dev_guides/building/3rdparty/3rdparty_windows.md
 dev_guides/building/3rdparty/3rdparty_linux.md
 dev_guides/building/3rdparty/3rdparty_osx.md
-dev_guides/building/wok/wok.md
-dev_guides/building/automake.md
 dev_guides/building/cmake/cmake.md
 dev_guides/building/android/android.md
 dev_guides/building/code_blocks.md
 dev_guides/building/cmake/cmake.md
 dev_guides/building/android/android.md
 dev_guides/building/code_blocks.md
diff --git a/dox/dev_guides/building/3rdparty/images/genconf_linux.png b/dox/dev_guides/building/3rdparty/images/genconf_linux.png
new file mode 100644 (file)
index 0000000..298c32f
Binary files /dev/null and b/dox/dev_guides/building/3rdparty/images/genconf_linux.png differ
diff --git a/dox/dev_guides/building/3rdparty/images/genconf_osx.png b/dox/dev_guides/building/3rdparty/images/genconf_osx.png
new file mode 100644 (file)
index 0000000..f7b53fd
Binary files /dev/null and b/dox/dev_guides/building/3rdparty/images/genconf_osx.png differ
diff --git a/dox/dev_guides/building/3rdparty/images/genconf_windows.png b/dox/dev_guides/building/3rdparty/images/genconf_windows.png
new file mode 100644 (file)
index 0000000..81a4ec3
Binary files /dev/null and b/dox/dev_guides/building/3rdparty/images/genconf_windows.png differ
diff --git a/dox/dev_guides/building/automake.md b/dox/dev_guides/building/automake.md
deleted file mode 100644 (file)
index 98a4d43..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-Building with Automake {#occt_dev_guides__building_automake}
-======================
-
-This file describes steps to build OCCT libraries from a complete source
-archive on Linux with **Autotools** GNU build system.
-
-If you build 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 paragraph 1 \ref occt_dev_guides__building_wok for instructions.
-
-Before building OCCT, you need to install the required third-party libraries; see paragraph 1 of 
-\ref occt_dev_guides__building for instructions.
-
-Note that during compilation by makefiles on Linux station with 
-NVIDIA video card you may experience problems because the installation 
-procedure of NVIDIA video driver removes library *libGL.so* included in package 
-*libMesaGL* from directory <i>/usr/X11R6/lib</i> and places this library *libGL.so* in 
-directory <i>/usr/lib</i>. However, *libtool* expects to find the library in directory 
-<i>/usr/X11R6/lib</i>, which causes compilation crash (See <i>/usr/X11R6/lib/libGLU.la </i>). 
-
-To prevent this, it is suggested to make links: 
-
-
-       ln -s /usr/lib/libGL.so /usr/X11R6/lib/libGL.so 
-       ln -s /usr/lib/libGL.la /usr/X11R6/lib/libGL.la 
-
-
-  1.In OCCT root folder, launch *build_configure* script to generate files *configure* and *Makefile.in* for your system.
-
-  2.Go to the directory, where OCCT will be built, and run *configure* to generate makefiles.
-
-       $CASROOT/configure \<FLAGS\>
-
-   Where <i> \<FLAGS\> </i> is a set of options.
-   The following flags are mandatory:
-
-   * <i> --with-tcl= </i> defines the location of *tclConfig.sh*;
-   * <i> --with-tk= </i> defines location of *tkConfig.sh*;
-   * <i> --with-freetype= </i> defines location of installed **FreeType** product
-   * <i> --prefix= </i> defines the location for installation of OCCT binaries
-
-   Additional flags:
-
-   * <i> --with-gl2ps= </i> defines the location of installed **gl2ps** product;
-   * <i> --with-freeimage= </i> defines the location of installed **FreeImage** product;
-   * <i> --with-tbb-include= </i> defines the location of *tbb.h*;
-   * <i> --with-tbb-library= </i> defines the location of *libtbb.so*;
-   * <i> --with-vtk-include= </i> defines the location of VTK includes;
-   * <i> --with-vtk-library= </i> defines the location of VTK libraries;
-   * <i> --enable-debug=   yes: </i>  includes debug information, no: does not include debug information;
-   * <i> --enable-production=   yes: </i> switches code optimization, no: switches off code optimization;
-   * <i> --disable-draw </i> allows OCCT building without Draw.
-
-   If location of **FreeImage, TBB, gl2ps** or **VTK** is not specified, OCCT will be built without these optional libraries.
-
-   
-  Attention: 64-bit platforms are detected automatically.
-
-  Example:
-   
-
-  \>  ./configure -prefix=/PRODUCTS/occt-6.5.5 --with-tcl=/PRODUCTS/tcltk-8.5.8/lib --with-tk=/PRODUCTS/tcltk-8.5.8/lib --with-freetype=/PRODUCTS/freetype-2.4.10 --with-gl2ps=/PRODUCTS/gl2ps-1.3.5 --with-freeimage=/PRODUCTS/freeimage-3.14.1 --with-tbb-include=/PRODUCTS/tbb30_018oss/include --with-tbb-library=/PRODUCTS/tbb30_018oss/lib/ia32/cc4.1.0_libc2.4_kernel2.6.16.21 --with-vtk-include=/PRODUCTS/VTK-6.1.0/include/vtk-6.1 -with-vtk-library=/PRODUCTS/ /VTK-6.1.0//lib
-
-
-  3.If configure exits successfully, you can build OCCT with *make* command.
-
-  \> make -j8 install
-
-  4.To start *DRAW*, launch
-
-  \> draw.sh
index bc54a24..cd4d669 100644 (file)
@@ -1,25 +1,24 @@
 Building OCCT from sources {#occt_dev_guides__building}
 =========
 
 Building OCCT from sources {#occt_dev_guides__building}
 =========
 
-In order to build OCCT libraries from these sources for use in your program, 
-you need to:
+Before building OCCT, make sure to have all the required third-party libraries installed.
+The list of required libraries depends on what OCCT modules will be used, and your preferences.
+The typical minimum is **Freetype** (necessary for Visualization) and **Tcl/Tk** (for DRAW Test Harness).
+See "Third-party libraries" section in \ref OCCT_OVW_SECTION_5 "Overview" for a full list.
 
 
-1. Make sure you have all required third-party libraries installed (check 
-   software requirements in \ref OCCT_OVW_SECTION_5 "Overview").
+On Windows, the easiest way to install third-party libraries is to download archive with pre-built binaries from http://www.opencascade.com/content/3rd-party-components.
+On Linux and OS X, it is recommended to use the version installed in the system natively.
 
 
-   See the following documents for short guide to installation of 
-   third-party libraries on different platforms:
-   - \subpage occt_dev_guides__building_3rdparty_windows
-   - \subpage occt_dev_guides__building_3rdparty_linux
-   - \subpage occt_dev_guides__building_3rdparty_osx
+You can also build third-party libraries from their sources:
+* \subpage occt_dev_guides__building_3rdparty_windows
+* \subpage occt_dev_guides__building_3rdparty_linux
+* \subpage occt_dev_guides__building_3rdparty_osx
 
 
-
-2. Build using your preferred build tool.
-   - \subpage occt_dev_guides__building_automake "Building on Linux with Autotools"
-   - \subpage occt_dev_guides__building_cmake "Building with CMake (cross-platform)"
-   - \subpage occt_dev_guides__building_android "Building with CMake for Android (cross-platform)"
-   - \subpage occt_dev_guides__building_code_blocks "Building on Mac OS X with Code::Blocks"
-   - \subpage occt_dev_guides__building_msvc "Building on Windows with MS Visual Studio"
-   - \subpage occt_dev_guides__building_xcode "Building on Mac OS X with Xcode"
+Build OCCT using your preferred build tool.
+* \subpage occt_dev_guides__building_cmake "Building with CMake (cross-platform)"
+* \subpage occt_dev_guides__building_android "Building with CMake for Android (cross-platform)"
+* \subpage occt_dev_guides__building_msvc "Building on Windows with MS Visual Studio projects"
+* \subpage occt_dev_guides__building_code_blocks "Building on Mac OS X with Code::Blocks projects"
+* \subpage occt_dev_guides__building_xcode "Building on Mac OS X with Xcode projects"
 
 The current version of OCCT can be consulted in the file src/Standard/Standard_Version.hxx
\ No newline at end of file
 
 The current version of OCCT can be consulted in the file src/Standard/Standard_Version.hxx
\ No newline at end of file
index fccda7c..13bb98f 100644 (file)
@@ -3,39 +3,23 @@ Building with CMake {#occt_dev_guides__building_cmake}
 
 @tableofcontents
 
 
 @tableofcontents
 
-This article describes **CMake**-based build process which is now suggested as a standard way to produce the binaries of Open CASCADE Technology from sources. *OCCT requires CMake version 2.8.12 or later*.
-
-**Note**: Comparing to the previous (6.x) releases of Open CASCADE Technology, OCCT 7.0 comes with a complete set of CMake scripts and projects, so that there is no need to use WOK anymore. Moreover, CMake gives you a powerful configuration tool which allows to control many aspects of OCCT deployment. At the same time this tool is quite intuitive which is a significant advantage over the legacy WOK utilities.
-
-**Note**: We discuss the build procedure on example of Windows platform. However, the workflow is almost the same for *nix and Mac operating systems.
-
-All the examples in the article will be based on Windows x64 platform and Visual Studio 2010 solution will be the target IDE. The solution will be generated by CMake from the OCCT sources, the one will be built by an user and ready-to-go OCCT binaries will be deployed into a user specified directory by building *INSTALL* project.
-
-You can get all the required 3-rd party products visiting [the official download page](http://www.opencascade.org/getocc/download/loadocc); see @ref occt_dev_guides__building for more detailed information also.
+@section build_cmake_intro General
 
 
-## Get sources
-
-The sources of OCCT can be obtained from [the official development web-site](http://dev.opencascade.org) by either downloading the universal source package (available at [the official download page](http://www.opencascade.org/getocc/download/loadocc)) or by cloning the Git repository:
+This article describes **CMake**-based build process which is now suggested as a standard way to produce the binaries of Open CASCADE Technology from sources. *OCCT requires CMake version 2.8.12 or later*.
 
 
-    git clone ssh://gitolite@git.dev.opencascade.org/occt occt
+@note Comparing to the previous (6.x) releases of Open CASCADE Technology, OCCT 7.0 comes with a complete set of CMake scripts and projects, so that there is no need to use WOK anymore. Moreover, CMake gives you a powerful configuration tool which allows to control many aspects of OCCT deployment. At the same time this tool is quite intuitive which is a significant advantage over the legacy WOK utilities.
 
 
-As a result, you obtain the following directory structure in your filesystem (d:\ name is used for example):
-    
-    d:\occt\adm
-           \data
-           \dox
-           \samples
-           \src
-           \tests
-           ...
+Here we describe the build procedure on example of Windows platform with Visual Studio 2010. 
+However, CMake is cross-platform and can be used to build OCCT on Linux and OS X in essentially the same way.
 
 
-The bare sources distribution contains not only the sources of Open CASCADE Technology, but also documentation, samples and non-regression test scripts.
+@note Before you start, make sure to have installed all the 3-rd party products that you are going to use with OCCT; see @ref occt_dev_guides__building.
 
 
-## The usage of CMake
+@section build_cmake_start Start CMake
 
 
-Now it is time to run a CMake tool which will generate the actual project files for the target IDE (e.g., Visual Studio 2010 solution).
+CMake is a tool that generates the actual project files for the selected target build system (e.g. Unix makefiles) or IDE (e.g. Visual Studio 2010).
 
 
-It is recommended to use *cmake-gui* -- cross-platform GUI tool provided by CMake on Windows, Mac and Linux. As a command-line alternative, *ccmake* also can be used.
+For unexpericnced users we recommend to start with *cmake-gui* -- cross-platform GUI tool provided by CMake on Windows, Mac and Linux.
+A command-line alternative, *ccmake* also can be used.
 
 CMake deals with three directories: source, build or binary and install.
 
 
 CMake deals with three directories: source, build or binary and install.
 
@@ -43,9 +27,9 @@ CMake deals with three directories: source, build or binary and install.
 * The build or binary directory is where all the files created during CMake configuration and generation process will be located. The mentioned process will be described below.
 * The installation directory is where binaries will be installed after build the *INSTALL* project that is created by CMake generation process, along with header files and resources required for OCCT use in applications. 
 
 * The build or binary directory is where all the files created during CMake configuration and generation process will be located. The mentioned process will be described below.
 * The installation directory is where binaries will be installed after build the *INSTALL* project that is created by CMake generation process, along with header files and resources required for OCCT use in applications. 
 
-**Note**: It is possible to choose one installation directory for several configurations of OCCT (differentiated by platform, bitness, compiler and build type).
-
-**Note**: The good practice is not to mix up different build configurations in a single directory and not to use the source directory as a build one, for example:
+The good practice is not to use the source directory as a build one.
+Different configurations should be built in different build directories to avoid conflicts. 
+It is however possible to choose one installation directory for several configurations of OCCT (differentiated by platform, bitness, compiler and build type), for example:
       
     d:/occt/                   -- the source directory
     d:/tmp/occt-build-vc10-x64 -- the build directory with the generated
       
     d:/occt/                   -- the source directory
     d:/tmp/occt-build-vc10-x64 -- the build directory with the generated
@@ -53,7 +37,7 @@ CMake deals with three directories: source, build or binary and install.
     d:/occt-install            -- the installation directory that is
                                   able to contain several OCCT configuratoion
 
     d:/occt-install            -- the installation directory that is
                                   able to contain several OCCT configuratoion
 
-## Configuration process
+@section build_cmake_conf Configuration process
 
 If the command-line tool is used, run the tool from the build directory with a single argument indicating the source (relative or absolute path) directory:
 
 
 If the command-line tool is used, run the tool from the build directory with a single argument indicating the source (relative or absolute path) directory:
 
@@ -124,9 +108,9 @@ The following table enumerates the full list of environment variables used at co
 
 **Note:** In those CMake options defining paths only the forward slashes ("/") are acceptable.
 
 
 **Note:** In those CMake options defining paths only the forward slashes ("/") are acceptable.
 
-### 3rd party search mechanism (The variables with <i>3RDPARTY_</i> prefix)
+@section build_cmake_3rdparty 3rd party search mechanism
 
 
-If *3RDPARTY_DIR* directory is defined, required 3rd party binaries are sought in it, default system folders are ignored.
+If *3RDPARTY_DIR* directory is defined, then required 3rd party binaries are sought in it, and default system folders are ignored.
 
 The procedure expects to find binary and header files of each 3rd party product in its own sub-directory: *bin*, *lib* and *include*.
 
 
 The procedure expects to find binary and header files of each 3rd party product in its own sub-directory: *bin*, *lib* and *include*.
 
@@ -167,11 +151,11 @@ During the configuration process the related variables (*3RDPARTY_FREETYPE_DLL_D
 
 **Note**: The names of searched libraries and header files are hard-coded. If there is the need to change their names, change appropriate cmake variables (edit CMakeCache.txt file or edit in cmake-gui in advance mode) without reconfiguration: *3RDPARTY_\<PRODUCT\>_INCLUDE* for include, *3RDPARTY_\<PRODUCT\>_LIB* for library and *3RDPARTY_\<PRODUCT\>_DLL* for shared library.
 
 
 **Note**: The names of searched libraries and header files are hard-coded. If there is the need to change their names, change appropriate cmake variables (edit CMakeCache.txt file or edit in cmake-gui in advance mode) without reconfiguration: *3RDPARTY_\<PRODUCT\>_INCLUDE* for include, *3RDPARTY_\<PRODUCT\>_LIB* for library and *3RDPARTY_\<PRODUCT\>_DLL* for shared library.
 
-### OCCT Generation
+@section build_cmake_gen Projects generation
 
 Once the configuration process is done, "Generate" button is used to prepare project files for the target IDE. In our exercise the Visual Studio solution will be automatically created in the buid directory.
 
 
 Once the configuration process is done, "Generate" button is used to prepare project files for the target IDE. In our exercise the Visual Studio solution will be automatically created in the buid directory.
 
-### OCCT Building
+@section build_cmake_build Building
 
 Go to the build folder, start the Visual Studio solution *OCCT.sln* and build it by clicking **Build -> Build Solution**.
 
 
 Go to the build folder, start the Visual Studio solution *OCCT.sln* and build it by clicking **Build -> Build Solution**.
 
@@ -185,7 +169,7 @@ When the building process is finished build:
 
 For this, right-click on the *Overview/INSTALL* project and select **Project Only -> Build Only** -> *Overview/INSTALL* in the solution explorer. 
 
 
 For this, right-click on the *Overview/INSTALL* project and select **Project Only -> Build Only** -> *Overview/INSTALL* in the solution explorer. 
 
-## Installation process
+@section build_cmake_install Installation
 
 Installation is a process of extracting redistributable resources (binaries,include files etc) from the build directory into the installation one. The installation directory will be free of project files, intermediate object files and any other information related to the build routines. 
 
 
 Installation is a process of extracting redistributable resources (binaries,include files etc) from the build directory into the installation one. The installation directory will be free of project files, intermediate object files and any other information related to the build routines. 
 
index be7e8ea..571382a 100644 (file)
@@ -1,70 +1,58 @@
-Building with Code::Blocks on Mac OS X {#occt_dev_guides__building_code_blocks}
-======================================
+Building with Code::Blocks {#occt_dev_guides__building_code_blocks}
+==========================
 
 
-This file describes steps to build OCCT libraries from a complete source package
-on Mac OS X with **Code::Blocks**.
+@tableofcontents
 
 
-If you build 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 occt_dev_guides__building_wok for instructions.
+@section build_codeblocks_intro General
 
 
-Before building OCCT, you need to install the required third-party libraries; see
-paragraph 1 of \ref occt_dev_guides__building for details.
+This file describes steps to build OCCT libraries from sources using **Code::Blocks**, a cross-platform IDE, using project files generated by OCCT legacy tool **genproj**.
+It can be an alternative to use of CMake build system (see @ref occt_dev_guides__building_cmake) for all supported platforms.
 
 
-1. Add paths to the mandatory 3rd-party products (**Tcl/Tk** and **FreeType**) in file 
-   *custom.sh* located in <i>\<OCCT_ROOT_DIR\></i>. For this:
+@section build_codeblocks_3rdparty Third-party libraries
 
 
-   1.1. Add paths to the includes in variable *CSF_OPT_INC*;
+Before building OCCT, make sure to have all the needed third-party libraries installed, see @ref occt_dev_guides__building.
 
 
-   1.2. Add paths to the binary libraries in variable  *CSF_OPT_LIB64*;
-   
-   All paths should be separated by ":" symbol. 
+@section build_codeblocks_conf Configuration
 
 
-2. Add paths to the optional 3rd-party libraries (**TBB, gl2ps** and **FreeImage**) 
-   in the aforementioned environment variables *CSF_OPT_INC* and 
-   *CSF_OPT_LIB64* from file *custom.sh*.
+Before building it is necessary to set up build environment.
 
 
-   If you want to build OCCT without the optional libraries perform the 
-   following steps:
+The environment is defined in the file *custom.sh* (on Linux and OS X) or *custom.bat* (on Windows) which can be edited directly:
 
 
-   2.1 Disable unnecessary library in custom.sh by setting the corresponding 
-       variable <i>HAVE_\<LIBRARY_NAME\></i> to *false*. 
-
-~~~~~     
-export HAVE_GL2PS=false
+* Add paths to includes of used third-party libraries in variable *CSF_OPT_INC*. 
+* Add paths to their binary libraries in variable  *CSF_OPT_LIB64*.
+* Set variable *SHORTCUT_HEADERS* to "true" to have folder *inc* populated by short-cut files pointing to actual headers located in *src*; otherwise, header files will be copied to *inc*.
+* For optional  third-party libraries, set corresponding environment variable <i>HAVE_<LIBRARY_NAME></i> to either *false*,  e.g.:
+~~~~~
+       export HAVE_GL2PS=false
 ~~~~~
 
 ~~~~~
 
-   2.2 Remove this library from Linker settings in **Code::Blocks** for each project 
-       that uses it: right click on the required project, choose **Build options**, 
-       go to **Linker settings** tab in the opened window , select unnecessary 
-       libraries and click **Delete** button.
+Alternatively, or when *custom.sh* or *custom.bat* does not exist, you can launch **genconf** tool to configure environment interactively:
 
 
-3. Open Terminal application
+@figure{/dev_guides/building/3rdparty/images/genconf_linux.png}
 
 
-4. Enter <i> \<OCCT_ROOT_DIR\></i>:
+Click "Save" to store the specified configuration in *custom.sh* or *custom.bat* file.
+  
+@section build_codeblocks_gen Projects generation
+
+Launch **genproj** tool with option *-target=cbp* to update content of *inc* folder and generate project files after changes in OCCT code affecting layout or composition of source files:
 
 ~~~~~
 
 ~~~~~
-   cd \<OCCT_ROOT_DIR\>
+  $ cd /dev/OCCT/opencascade-7.0.0
+  $ ./genproj.sh -target=cbp
 ~~~~~
 
 ~~~~~
 
-5. To start **Code::Blocks**, run the command <i>/codeblocks.sh</i>
-
-6. To build all toolkits, click **Build->Build workspace** in the menu bar.
+The generated Code::Blocks project are placed into subfolder *adm/&lt;OS&gt;/cbp*.
 
 
+@note To use **genproj** and **genconf** tools you need to have Tcl installed and accessible by PATH.
 
 
-To start *DRAWEXE*, which has been built with **Code::Blocks** on Mac OS X, perform 
-the following steps:
+@section build_codeblocks_build Building
 
 
-1.Open Terminal application
+To start **Code::Blocks**, launch script *codeblocks.sh*.
 
 
-2.Enter <i>\<OCCT_ROOT_DIR\></i>:
-
-~~~~~
-   cd \<OCCT_ROOT_DIR\>
-~~~~~
+To build all toolkits, click **Build->Build workspace** in the menu bar.
 
 
-3.Run the script
+To start *DRAWEXE*, which has been built with **Code::Blocks** on Mac OS X, run the script
 ~~~~~
    ./draw_cbp.sh cbp [d]
 ~~~~~
 ~~~~~
    ./draw_cbp.sh cbp [d]
 ~~~~~
-   Option *d* is used if OCCT has been built in **Debug** mode.
+Option *d* is used if OCCT has been built in **Debug** mode.
index 7f0572d..8a7cd95 100644 (file)
@@ -1,35 +1,68 @@
 Building with MS Visual C++ {#occt_dev_guides__building_msvc}
 ===========================
 
 Building with MS Visual C++ {#occt_dev_guides__building_msvc}
 ===========================
 
-This file describes steps to build OCCT libraries from a complete source
-archive on Windows with <b>MS Visual C++</b>. 
+@tableofcontents
 
 
-If you build 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 occt_dev_guides__building_wok for instructions.
+@section build_msvc_intro General
 
 
-Before building OCCT, you need to install the required third-party libraries; see
-paragraph 1 of \ref occt_dev_guides__building for instructions.
+This page describes steps to build OCCT libraries from a complete source archive on Windows with <b>MS Visual C++</b> using projects generated by **genproj** tool. 
+It is an alternative to use of CMake build system (see @ref occt_dev_guides__building_cmake).
 
 
-1. Edit file *custom.bat* to define the environment: 
+**genproj** is a legacy tool (originated from command "wgenproj" in WOK) for generation of Visual Studio, Code.Blocks, and XCode project files used for building Open CASCADE Technology.
+These project files are placed inside OCCT directory (in *adm* subfolder) and use relative paths, thus can be moved together with sources.
 
 
-   - *VCVER* -- version of Visual Studio (vc8, vc9, vc10, vc11 or vc12), 
-             and relevant *VCVARS* path
-   - *ARCH* -- architecture (32 or 64), affects only *PATH* variable for execution
-   - <i>HAVE_*</i> -- flags to enable or disable use of optional third-party products
-   - CSF_OPT_* -- paths to search for includes and binaries of all used 
-                 third-party products
+The project files included in official distribution of OCCT are generated by this tool.
+If you have official distribution with project files included, you can use them directly without a need to call **genproj**.
 
 
-2. Launch *msvc.bat* to start Visual Studio with all necessary environment 
-   variables defined.
+@section build_msvc_3rdparty Third-party libraries
 
 
-   Note: the MSVC project files are located in folders <i>adm\\msvc\\vc[9-12]</i>.
-   Binaries are produced in *win32* or *win64* folders.
+Before building OCCT, make sure to have all the required third-party libraries installed.
 
 
-3. Build with Visual Studio
+The easiest way to install third-party libraries is to download archive with pre-built binaries, corresponding to version of Visual Studio you are using, from http://www.opencascade.com/content/3rd-party-components.
 
 
-   Note: If VTK was not installed on you computer and you are not interested in usage of 
-            OCCT VTK Integration Services (VIS) component you should exclude TKIVtk and TKIVtkDraw 
-            projects from process of compilation in the main menu  <b>Build / Configuration Manager</b>. 
+You can also build third-party libraries from their sources, see @ref occt_dev_guides__building_3rdparty_windows for instructions.
+
+@section build_msvc_conf Configuration
+
+If you have Visual Studio projects already available (pre-installed or generated), you can edit file *custom.bat* manually to adjust the environment:
+
+* *VCVER* -- version of Visual Studio (vc10, vc11, vc12, or vc14), and relevant *VCVARS* path
+* *ARCH* -- architecture (32 or 64), affects only *PATH* variable for execution
+* <i>HAVE_*</i> -- flags to enable or disable use of optional third-party products
+* <i>CSF_OPT_*</i> -- paths to search for includes and binaries of all used  third-party products
+* *SHORTCUT_HEADERS* -- if set to "true", folder *inc* will be populated by short-cut files pointing to actual headers located in *src*; otherwise, header files will be copied to *inc*.
+
+Alternatively, you can launch **genconf**, a GUI tool allowing to configure build options interactively.
+That tool will analyze your environment and propose you to choose available options:
+
+* Version of Visual Studio to be used (from the list of installed ones, detected by presence of environment variables like *VS100COMNTOOLS*)
+* Option to use short-cuts to header files in folder *inc* (enabled by default).
+* Location of third-party libraries (usually downloaded from OCCT web site, see above).
+* Path to common directory where third-party libraries are located (optional)
+* Paths to headers and binaries of the third-party libraries (found automatically basing on previous options; click button "Reset" to update).
+
+@figure{/dev_guides/building/3rdparty/images/genconf_windows.png}
+
+Click "Save" to store the specified configuration in *custom.bat* file.
+  
+@section build_msvc_generate Projects generation
+
+Launch **genproj** to update content of *inc* folder and generate project files after changes in OCCT code affecting layout or composition of source files.
+
+@note To use **genproj** and **genconf** tools you need to have Tcl installed and accessible by PATH.
+If Tcl is not found, the tool may prompt you to enter the path to directory where Tcl can be found.
+~~~~~
+  $ genproj.bat
+~~~~~
+
+Note that if *custom.bat* is not present, **genproj** will start **genconf** to configure environment.
+
+@section build_msvc_build Building
+
+Launch *msvc.bat* to start Visual Studio with all necessary environment variables defined, and build the whole solution or required toolkits.
+
+Note: the MSVC project files are located in folders <i>adm\\msvc\\vc...</i>.
+Binaries are produced in *win32* or *win64* folders.
 
 To start DRAW, launch *draw.bat*.
 
 To start DRAW, launch *draw.bat*.
diff --git a/dox/dev_guides/building/wok/images/wok_image001.png b/dox/dev_guides/building/wok/images/wok_image001.png
deleted file mode 100644 (file)
index e1d685a..0000000
Binary files a/dox/dev_guides/building/wok/images/wok_image001.png and /dev/null differ
diff --git a/dox/dev_guides/building/wok/images/wok_image002.png b/dox/dev_guides/building/wok/images/wok_image002.png
deleted file mode 100644 (file)
index c5d11ca..0000000
Binary files a/dox/dev_guides/building/wok/images/wok_image002.png and /dev/null differ
diff --git a/dox/dev_guides/building/wok/images/wok_image003.png b/dox/dev_guides/building/wok/images/wok_image003.png
deleted file mode 100644 (file)
index 298c32f..0000000
Binary files a/dox/dev_guides/building/wok/images/wok_image003.png and /dev/null differ
diff --git a/dox/dev_guides/building/wok/images/wok_image004.png b/dox/dev_guides/building/wok/images/wok_image004.png
deleted file mode 100644 (file)
index f7b53fd..0000000
Binary files a/dox/dev_guides/building/wok/images/wok_image004.png and /dev/null differ
diff --git a/dox/dev_guides/building/wok/wok.md b/dox/dev_guides/building/wok/wok.md
deleted file mode 100644 (file)
index bb9219c..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-Using WOK {#occt_dev_guides__building_wok}
-=========
-
-@tableofcontents
-
-WOK is a legacy build environment for Open CASCADE Technology. 
-It is required for generation of header files for classes defined with 
-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.
-
-@section wok1 Installing WOK
-
-  Download the latest version of binary distribution WOK from http://dev.opencascade.org/index.php?q=home/resources
-
-@subsection wok11 Windows
-
-  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.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.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.
-  
-  The shortcuts from this group provide two ways to run WOK: 
-  * In command prompt window using option *WOK TCL shell*. 
-  * In Emacs editor using option *WOK Emacs*. Using Emacs is convenient if you need to work within WOK environment. 
-
-  By default WOK installer creates a WOK factory with name *LOC* within workshop *dev*. I.e. the WOK path is <i>:LOC:dev</i>. 
-
-@subsection wok12 Linux
-
-  * Unpack the .tgz archive containing WOK distributive into the installation directory <i>\<WOK_INSTALL_DIR\></i>.
-
-  * Perform the following commands assuming that you have unpacked WOK distributive archive into <i>\<WOK_INSTALL_DIR\></i>:
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
-  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.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
-  wok_init.sh
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  
-  * Your installation procedure is over. To run WOK use one the following commands:
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
-  cd \<WOK_INSTALL_DIR\>/site
-  wok_emacs.sh
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  or
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
-  cd \<WOK_INSTALL_DIR\>/site
-  wok_tclsh.sh
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-@subsection wok13 Mac OS X
-
-  * Double click on file *wokSetup.dmg* in the Finder. This opens 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. <i>\<WOK_INSTALL_DIR\></i>.
-  
-  * Browse to the folder <i>\<WOK_INSTALL_DIR\>/site</i> and double click on *WokConfig*. This opens 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.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
-  wok_init.sh
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  
-  * Your installation procedure is over. To run WOK in Emacs navigate in the Finder to the folder <i>\<WOK_INSTALL_DIR\>/site</i> and double click on *WokEmacs*.
-
-
-@section wok2 Initialization of Workbench
-
-  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. 
-  
-  Then create a WOK workbench (command *wcreate*) setting its Home to the directory, where the repository is created (<i>$CASROOT</i> variable). The workbench should have the same name as that directory. 
-  
-  For example, assuming that OCCT repository has been cloned into *D:/occt* folder: 
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
-  LOC:dev> wcreate occt -DHome=D:/occt
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-  Note that <i>$CASROOT</i> is equal to *D:/occt* now.
-
-  Then you can work with this workbench using normal WOK functionality (*wprocess, umake*, etc.) 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
-
-  Use command *wgenproj* in WOK to generate derived headers, source and building projects files: 
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
-  LOC:dev> wokcd occt
-  LOC:dev:occt> wgenproj [ -target=<TARGET> ] [ -no_wprocess ]
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-TARGET:
-  * *vc8* -- Visual Studio 2005;
-  * *vc9* -- Visual Studio 2008;
-  * *vc10* -- Visual Studio 2010;
-  * *vc11* -- Visual Studio 2012;
-  * *cbp* -- CodeBlocks;
-  * *cmake* -- CMake;
-  * *amk* -- AutoMake;
-  * *xcd* -- Xcode;
-  * <i>-no_wprocess</i> option skips generation of derived headers and source files.
-
-Note that this command takes several minutes to complete at the first call. 
-
-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 <i>.adm</i> and repeat the command. 
-
-To regenerate derived headers and source files without regeneration of projects use command:
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
-  LOC:dev> wokcd occt
-  LOC:dev:occt> wprocess -DGroups=Src,Xcpp
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The generated building project has been placed into <i>$CASROOT/adm</i> folder:
-  * for vc8 -- <i>$CASROOT/adm/msvc/vc8</i>;
-  * for vc9 -- <i>$CASROOT/adm/msvc/vc9</i>;
-  * for vc10 -- <i>$CASROOT/adm/msvc/vc10</i>;
-  * for vc11 -- <i>$CASROOT/adm/msvc/vc11</i>;
-  * for cbp -- <i>$CASROOT/adm/\<OS\>/cbp</i>;
-  * for cmake -- <i>$CASROOT/adm/cmake</i>;
-  * for amk -- <i>$CASROOT/adm/lin/amk</i>;
-  * xcd -- <i>$CASROOT/adm/\<OS\>/xcd</i>
-
-@section wok4  Generation of documentation
-
-  Use command *wgendoc* in WOK to generate reference documentation: 
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
-  :LOC:dev> wokcd occt
-  :LOC:dev:occt> wgendoc 
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The following options can be used: 
-  * <i>-wb=\<workbench name\></i> -- the name of OCCT workbench (the current one by default);
-  * <i>-m=\<list of modules\></i> -- the list of modules that will be contained in the documentation;
-  * <i>-outdir=\<path\></i> -- the output directory for the documentation;
-  * <i>-chm</i> -- the option to generate CHM file;
-  * <i>-hhc=\<path\></i> -- the path to HTML Help Compiler *hhc.exe* or equivalent;
-  * <i>-qthelp=\<path\></i> -- the option to generate Qt Help file, where <i>\<path\></i> is the required path to *qthelpgenerator* executable;
-  * <i>-doxygen=\<path\></i> -- the path to Doxygen executable;
-  * <i>-dot=\<path\></i> -- the path to GraphViz dot executable.
index b7d3be6..cf98ae8 100644 (file)
@@ -1,58 +1,65 @@
 Building with Xcode {#occt_dev_guides__building_xcode}
 ===================
 
 Building with Xcode {#occt_dev_guides__building_xcode}
 ===================
 
-This file describes steps to build OCCT libraries from a complete source package
-on Mac OS X with **Xcode**.
+@tableofcontents
 
 
-If you build 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 occt_dev_guides__building_wok for instructions.
+@section build_xcode_intro General
 
 
-Before building OCCT, you need to install the required third-party libraries; see
-paragraph 1 of \ref occt_dev_guides__building for details.
+This file describes steps to build OCCT libraries from sources on Mac OS X with **Xcode** projects, generated by OCCT legacy tool **genproj**.
 
 
-1. Add paths to the mandatory 3rd-party products (**Tcl/Tk** and **FreeType**) 
-   in file *custom.sh* located in <i>\<OCCT_ROOT_DIR\> </i>. For this:
+@section build_xcode_3rdparty Third-party libraries
 
 
-   1.1. Add paths to the includes in variable *CSF_OPT_INC*;
+Before building OCCT, make sure to have all the needed third-party libraries installed.
+On OS X we recommend to use native libraries.
+You can also build third-party libraries from their sources, see @ref occt_dev_guides__building_3rdparty_osx for instructions.
 
 
-   1.2. Add paths to the binary libraries in variable  *CSF_OPT_LIB64*;
+@section build_xcode_conf Configuration
 
 
-   All paths should be separated by ":" symbol. 
+Before building it is necessary to set up build environment.
 
 
-2. Add paths to the optional 3rd-party libraries (**TBB, gl2ps** and **FreeImage**) 
-   in the aforementioned environment variables *CSF_OPT_INC* and *CSF_OPT_LIB64* from file *custom.sh*.
+The environment is defined in the file *custom.sh* which can be edited directly:
 
 
-   If you want to build OCCT without the optional libraries perform the following steps:
-
-   2.1 Disable unnecessary library in *custom.sh* by setting the corresponding 
-       variable <i>HAVE_<LIBRARY_NAME></i> to *false*. 
+* Add paths to includes of used third-party libraries in variable *CSF_OPT_INC* (use colon ":" as path separator).
+* Add paths to their binary libraries in variable  *CSF_OPT_LIB64*.
+* Set variable *SHORTCUT_HEADERS* to "true" to have folder *inc* populated by short-cut files pointing to actual headers located in *src*; otherwise, header files will be copied to *inc*.
+* For optional  third-party libraries, set corresponding environment variable <i>HAVE_<LIBRARY_NAME></i> to either *false*,  e.g.:
 ~~~~~
        export HAVE_GL2PS=false
 ~~~~~
 ~~~~~
        export HAVE_GL2PS=false
 ~~~~~
-   2.2 Remove this library from Project navigator in Xcode for each project that 
-       uses it: choose the required project, right click on the unnecessary 
-       library and select **Delete** button.
 
 
-3. Open Terminal application.
+Alternatively, or when *custom.sh* does not exist, you can launch *genconf.sh* to configure environment interactively:
+
+@figure{/dev_guides/building/3rdparty/images/genconf_osx.png}
+
+Click "Save" to store the specified configuration in *custom.sh* file.
+  
+@section build_xcode_gen Projects generation
+
+Launch **genproj** tool to update content of *inc* folder and generate project files after changes in OCCT code affecting layout or composition of source files.
+
+@note To use **genproj** and **genconf** tools you need to have Tcl installed and accessible by PATH.
+
+For instance, in Terminal application:
 
 
-4. Enter <i>\<OCCT_ROOT_DIR\></i>:
 ~~~~~
 ~~~~~
-   cd \<OCCT_ROOT_DIR\>
+  $ cd /dev/OCCT/opencascade-7.0.0
+  $ ./genproj.sh
 ~~~~~
 ~~~~~
-5. To start **Xcode**, run command  <i>/xcode.sh</i>
 
 
-6. To build a certain toolkit, select it in **Scheme** drop-down list in Xcode 
-   toolbar, press **Product** in the menu and click **Build** button. 
+@section build_xcode_build Building
+
+To start **Xcode**, launch script *xcode.sh*.
+
+To build a certain toolkit, select it in **Scheme** drop-down list in Xcode toolbar, press **Product** in the menu and click **Build** button. 
 
 
-   To build the entire OCCT, create a new empty project (select **File -> 
-   New -> Project -> "Empty project** in the menu. Input the project name, 
-   e.g. *OCCT*, click **Next** and **Create** buttons). Drag and drop the *OCCT* 
-   folder in the created *OCCT* project in the Project navigator. Select 
-   **File -> New -> Target -> Aggregate** in the menu. Enter the project name 
-   (e.g. <i>OCCT</i>) and click **Finish**. The **Build Phases** tab will open.  
-   Click "+" button to add the necessary toolkits to the target project. 
-   It is possible to select all toolkits by pressing **Command+A** combination. 
+To build the entire OCCT:
+* Create a new empty project (select **File -> New -> Project -> Empty project** in the menu; input the project name, e.g. *OCCT*; then click **Next** and **Create**).
+* Drag and drop the *OCCT* folder in the created *OCCT* project in the Project navigator.
+* Select **File -> New -> Target -> Aggregate** in the menu. 
+* Enter the project name (e.g. *OCCT*) and click **Finish**. The **Build Phases** tab will open.  
+* Click "+" button to add the necessary toolkits to the target project. It is possible to select all toolkits by pressing **Command+A** combination. 
+
+@section build_xcode_draw Launching DRAW
 
 To start *DRAWEXE*, which has been built with Xcode on Mac OS X, perform the following steps:
 
 
 To start *DRAWEXE*, which has been built with Xcode on Mac OS X, perform the following steps:
 
@@ -67,4 +74,5 @@ To start *DRAWEXE*, which has been built with Xcode on Mac OS X, perform the fol
 ~~~~~
    ./draw_cbp.sh xcd [d]
 ~~~~~
 ~~~~~
    ./draw_cbp.sh xcd [d]
 ~~~~~
-   Option *d* is used if OCCT has been built in **Debug** mode.
+
+Option *d* is used if OCCT has been built in **Debug** mode.
index 0a3cb46..17055a0 100644 (file)
@@ -84,7 +84,7 @@ However, due to redesign of basic mechanisms (CDL generic classes, Handles and R
 
 WOK is not necessary anymore for building OCCT from sources, though it still can be used in a traditional way -- auxiliary files required for that are preserved.
 The recommended method for building OCCT 7.x is CMake, see @ref occt_dev_guides__building_cmake.
 
 WOK is not necessary anymore for building OCCT from sources, though it still can be used in a traditional way -- auxiliary files required for that are preserved.
 The recommended method for building OCCT 7.x is CMake, see @ref occt_dev_guides__building_cmake.
-The alternative solution is to use legacy generator of project files (extracted from WOK), see @ref occt_dev_guides__building_wok.
+The alternative solution is to use project files generated by OCCT legacy tool **genproj**, see @ref occt_dev_guides__building_msvc, @ref occt_dev_guides__building_code_blocks, and @ref occt_dev_guides__building_xcode.
 
 @subsubsection upgrade_occt700_cdl_auto Automatic upgrade
 
 
 @subsubsection upgrade_occt700_cdl_auto Automatic upgrade
 
diff --git a/genconf b/genconf
new file mode 100755 (executable)
index 0000000..a90a3f5
--- /dev/null
+++ b/genconf
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# Helper script to configure environment for genproj tool.
+# Running it requires that Tcl should be in the PATH
+
+# initialize environment
+aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
+if [ ! -e "${aScriptPath}/env.sh" ]; then 
+cat ${aScriptPath}/adm/templates/env.sh | sed -e '/__CASROOT__/d' > ${aScriptPath}/env.sh
+fi
+
+# run GUI tool
+tclsh "${aScriptPath}/adm/genconf.tcl"
diff --git a/genconf.bat b/genconf.bat
new file mode 100644 (file)
index 0000000..21536a8
--- /dev/null
@@ -0,0 +1,59 @@
+@echo off
+
+rem Helper script to configure environment for building with genproj tool.
+rem Running it requires that Tcl should be in the PATH
+
+SET "OLD_PATH=%PATH%"
+
+rem create env.bat if it does not exist yet
+if exist "%~dp0env.bat" (
+  call "%~dp0env.bat"
+) else (
+  type "%~dp0adm\templates\env.bat" | findstr /i /v "__CASROOT__" > "%~dp0env.bat"
+)
+
+rem  find Tcl
+set "TCL_EXEC=tclsh.exe"
+for %%X in (%TCL_EXEC%) do (set TCL_FOUND=%%~$PATH:X)
+
+set "TCL_EXEC2=tclsh86.exe"
+if not defined TCL_FOUND (
+  for %%X in (%TCL_EXEC2%) do (
+    set TCL_FOUND=%%~$PATH:X
+    set TCL_EXEC=%TCL_EXEC2%
+  )
+)
+
+rem Prompt the user to specify location of Tcl if not found in PATH
+if not defined TCL_FOUND (
+  set /P TCL_PATH=This script requires Tcl, but tclsh.exe cannot be found in PATH.^
+
+Please enter path to folder containing tclsh.exe^
+
+^: 
+  rem NOTE: KEEP LINE AFTER "set" ABOVE EMPTY !
+)
+
+if exist %TCL_PATH%\tclsh.exe (
+  set "TCL_FOUND=%TCL_PATH%\tclsh.exe"
+) else if exist %TCL_PATH%\tclsh86.exe (
+  set "TCL_FOUND=%TCL_PATH%\tclsh86.exe"
+) else (
+  set "TCL_EXEC=%TCL_PATH%\tclsh.exe"
+)
+
+rem Initialize custom.bat if it does not exist yet
+rem if not exist %%dp0custom.bat (
+rem   echo set "PATH=%%PATH%%;%TCL_PATH%" >%~dp0custom.bat
+rem )
+
+rem fail if Tcl is not found
+if not defined TCL_FOUND (
+  echo Error: "%TCL_EXEC%" is not found. Please update PATH variable ^(use custom.bat^)
+  goto :eof
+) 
+
+:: run GUI tool
+%TCL_FOUND% %~dp0adm/genconf.tcl
+
+SET "PATH=%OLD_PATH%"
diff --git a/gendoc b/gendoc
old mode 100644 (file)
new mode 100755 (executable)
index 3fb2d61..2d77ea9
--- a/gendoc
+++ b/gendoc
@@ -12,7 +12,7 @@ anOldDyLd="$DYLD_LIBRARY_PATH"
 aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
 if [ -e "${aScriptPath}/env.sh" ]; then source "${aScriptPath}/env.sh"; fi
 
 aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
 if [ -e "${aScriptPath}/env.sh" ]; then source "${aScriptPath}/env.sh"; fi
 
-tclsh "${aScriptPath}/adm/start.tcl" $anArgs
+tclsh "${aScriptPath}/adm/start.tcl" gendoc $anArgs
 
 export PATH="$anOldPath"
 export LD_LIBRARY_PATH="$anOldLd"
 
 export PATH="$anOldPath"
 export LD_LIBRARY_PATH="$anOldLd"
diff --git a/genproj b/genproj
new file mode 100755 (executable)
index 0000000..dff8537
--- /dev/null
+++ b/genproj
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+# Helper script to run generation of CBP/XCode projects on Linux / OS X.
+# Running it requires that Tcl should be in the PATH
+
+anOldPath="$PATH"
+anOldLd="$LD_LIBRARY_PATH"
+anOldDyLd="$DYLD_LIBRARY_PATH"
+
+# go to the script directory
+aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
+if [ ! -e "${aScriptPath}/env.sh" ]; then 
+cat ${aScriptPath}/adm/templates/env.sh | sed -e '/__CASROOT__/d' > ${aScriptPath}/env.sh
+fi
+
+aSystem=`uname -s`
+aTarget="$1"
+anOpt2=$2
+anOpt3=$3
+anOpt4=$4
+anOpt5=$5
+if [ "$aTarget" == "" ]; then
+  aTarget="cbp"
+  if [ "$aSystem" == "Darwin" ]; then aTarget="xcd"; fi;
+fi
+
+if [ ! -e "${aScriptPath}/custom.sh" ]; then
+  tclsh "${aScriptPath}/adm/genconf.tcl"
+fi
+
+if [ ! -e "${aScriptPath}/custom.sh" ]; then
+  echo "Error: custom.sh is not present."
+  echo "Run the script again to generate custom.sh, or create it manually"
+  exit 1
+fi
+source "${aScriptPath}/custom.sh"
+
+if [ -e "${aScriptPath}/env.sh" ]; then source "${aScriptPath}/env.sh"; fi
+
+tclsh "${aScriptPath}/adm/start.tcl" genproj -path="${aScriptPath}" -target=${aTarget} $anOpt2 $anOpt3 $anOpt4 $anOpt5
+
+export PATH="$anOldPath"
+export LD_LIBRARY_PATH="$anOldLd"
+export DYLD_LIBRARY_PATH="$anOldDyLd"
index 79eec0e..f931114 100644 (file)
@@ -5,33 +5,38 @@ rem Running it requires that Tcl should be in the PATH
 
 SET "OLD_PATH=%PATH%"
 
 
 SET "OLD_PATH=%PATH%"
 
+rem run GUI configurator if custom.bat is missing
+if not exist "%~dp0custom.bat" (
+  call %~dp0genconf.bat
+)
+
+if not exist "%~dp0custom.bat" (
+  echo Error: custom.bat is not present.
+  echo Run the script again to generate custom.bat, or create it manually
+  goto :eof
+)
+
 if exist "%~dp0env.bat" (
   call "%~dp0env.bat"
 if exist "%~dp0env.bat" (
   call "%~dp0env.bat"
-) else (
-   type "%~dp0adm\templates\env.bat" | findstr /i /v "__CASROOT__" > "%~dp0env.bat"
 )
 
 )
 
+rem  find Tcl
 set "TCL_EXEC=tclsh.exe"
 set "TCL_EXEC=tclsh.exe"
-
 for %%X in (%TCL_EXEC%) do (set TCL_FOUND=%%~$PATH:X)
 
 for %%X in (%TCL_EXEC%) do (set TCL_FOUND=%%~$PATH:X)
 
+set "TCL_EXEC2=tclsh86.exe"
 if not defined TCL_FOUND (
 if not defined TCL_FOUND (
-  echo "Error. %TCL_EXEC% is not found. Please update PATH variable"
-  goto :eof
+  for %%X in (%TCL_EXEC2%) do (
+    set TCL_FOUND=%%~$PATH:X
+    set TCL_EXEC=%TCL_EXEC2%
+  )
 )
 
 )
 
-if not exist "%~dp0custom.bat" (
-  %TCL_EXEC% %~dp0adm/genconf.tcl
-)
-
-if not exist "%~dp0custom.bat" (
-  echo custom.bat is not created. Run the script again or create custom.bat manually
+rem fail if Tcl is not found
+if not defined TCL_FOUND (
+  echo Error: "%TCL_EXEC%" is not found. Please update PATH variable ^(use custom.bat^)
   goto :eof
   goto :eof
-)
-
-if exist "%~dp0env.bat" (
-  call "%~dp0env.bat"
-)
+) 
 
 cd %~dp0
 %TCL_EXEC% %~dp0adm/start.tcl genproj -path=. -target=%VCVER%
 
 cd %~dp0
 %TCL_EXEC% %~dp0adm/start.tcl genproj -path=. -target=%VCVER%
diff --git a/genproj.sh b/genproj.sh
deleted file mode 100755 (executable)
index 2800bde..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-
-# Helper script to run generation of CBP/XCode projects on Linux / OS X.
-# Running it requires that Tcl should be in the PATH
-
-anOldPath="$PATH"
-anOldLd="$LD_LIBRARY_PATH"
-anOldDyLd="$DYLD_LIBRARY_PATH"
-
-# go to the script directory
-aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
-if [ ! -e "${aScriptPath}/env.sh" ]; then 
-cat ${aScriptPath}/adm/templates/env.sh | sed -e '/__CASROOT__/d' > ${aScriptPath}/env.sh
-fi
-
-aSystem=`uname -s`
-aTarget="$1"
-anOpt2=$2
-anOpt3=$3
-anOpt4=$4
-anOpt5=$5
-if [ "$aTarget" == "" ]; then
-  aTarget="cbp"
-  if [ "$aSystem" == "Darwin" ]; then aTarget="xcd"; fi;
-fi
-
-if [ ! -e "${aScriptPath}/custom.sh" ]; then
-  tclsh "${aScriptPath}/adm/genconf.tcl"
-fi
-
-if [ ! -e "${aScriptPath}/custom.sh" ]; then
-  echo custom.sh is not created. Run the script again and generate custom.sh
-  exit 1
-fi
-source "${aScriptPath}/custom.sh"
-
-if [ -e "${aScriptPath}/env.sh" ]; then source "${aScriptPath}/env.sh"; fi
-
-tclsh "${aScriptPath}/adm/start.tcl" genproj -path="${aScriptPath}" -target=${aTarget} $anOpt2 $anOpt3 $anOpt4 $anOpt5
-
-export PATH="$anOldPath"
-export LD_LIBRARY_PATH="$anOldLd"
-export DYLD_LIBRARY_PATH="$anOldDyLd"