BAWT Logo
Overview
Currently selected Documentation
Downloads
History
Related links
Contact
Valid XHTML 1.0 Transitional

Documentation

General information
Getting started
Command line usage
Example batch scripts

General information

Top of page

Getting started

Build instructions for Windows

Prerequisites:
  - None for building libraries using configure and gcc like Tcl/Tk, TEA compliant packages or Tclkits.
  - Otherwise Visual Studio or Visual Studio Express.
    Versions 2008, 2010, 2012, 2013, 2015, 2017, 2019 are currently supported.
    If Visual Studio is not installed in the standard location, you have to adapt procedure GetVcvarsProg in file Bawt.tcl. 
 
Downloads:
  - BAWT framework (appr. 15 MB)

  - MSys/MinGW distribution(s) (appr. 100 MB per distribution)
    MSys/MinGW 4.9.2 32-bit
    MSys/MinGW 4.9.2 64-bit
    MSys/MinGW 5.2.0 32-bit
    MSys/MinGW 5.2.0 64-bit
    MSys/MinGW 7.2.0 32-bit
    MSys/MinGW 7.2.0 64-bit
    Note, that MSys/MinGW with gcc 7.2.0 is set as default (use option --gccversion to change)
 
Actions:
  - Extract BAWT-Framework Bawt-1.0.0.zip in a folder of choice, ex. C:\Bawt
  - Copy MSys/MinGW distribution(s) into C:\Bawt\Bawt-1.0.0\Bootstrap-Windows 
  - Open command shell window and go into folder C:\Bawt\Bawt-1.0.0

  - Create Tcl distribution for 32-bit (without using Visual Studio):
    > Build-Windows.bat x86 gcc Setup\Tcl_Basic.bawt update
  - Create Tcl distribution for 64-bit (without using Visual Studio):
    > Build-Windows.bat x64 gcc Setup\Tcl_Basic.bawt update

  - Create Tcl distribution for 64-bit (using VisualStudio 2013 to build libraries, which do not work with gcc):
    > Build-Windows.bat x64 vs2013 Setup\Tcl_Extended.bawt update

Build instructions for Linux

Prerequisites:
  - C/C++ development 
  - curl (should be available by default on Linux)
  - Package  p7zip (for 7z program)
  - Package  glu-devel (Optional: Needed by library Gl2ps)
  - Packages mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libxmu-dev (Optional: Needed by library tcl3dBasic)

Downloads:
  - BAWT framework (appr. 15 MB)

Actions:
  - Extract BAWT-Framework Bawt-1.0.0.zip in a folder of choice.
  - Open shell (Terminal window), go into created folder Bawt-1.0.0 and execute:
    > chmod u+x Build*.sh
    > chmod u+x tclkit*

  - Create Tcl distribution for 32-bit:
    > ./Build-Linux.sh x86 Setup/Tcl_Basic.bawt update
  - Create Tcl distribution for 64-bit:
    > ./Build-Linux.sh x64 Setup/Tcl_Basic.bawt update

Build instructions for Mac

Prerequisites:
  - XCode
  - curl (should be available by default on Mac)

Downloads:
  - BAWT framework (appr. 15 MB)

Actions:
  - Extract BAWT-Framework Bawt-1.0.0.zip in a folder of choice.
  - Open shell (Terminal window), go into created folder Bawt-1.0.0 and execute:
    > chmod u+x Build*.sh
    > chmod u+x tclkit*

  - 32-bit not supported 
  - Create Tcl distribution for 64-bit:
    > ./Build-Darwin.sh Setup/Tcl_Basic.bawt update
Top of page

Command line usage

Output of option --help

> tclkit Bawt.tcl --help

Usage: Bawt.tcl [Options] SetupFile LibraryName [LibraryNameN]

Start the BAWT automatic library build process.
When using "all" as library name, all libraries specified
in the setup file are built.
It is also possible to specify the numbers of the libraries as printed
by option "--list" or specify a range of numbers (e.g: 2-5).
Note, that at least either a list or build action option must be specified.

General options:
--help          : Print this help message and exit.
--version       : Print version number and exit.
--procs         : Print all available procedures and exit.
--proc <string> : Print documentation of specified procedure and exit.
--loglevel <int>: Specify log message verbosity.
                  Choices: 0 - 4. Default: 3.
--nologtime     : Do not write time strings with log messages.
                  Default: Write time strings.
--logviewer     : Start graphical log viewer program BawtLogViewer.
                  Only working, if log level is greater than 1. Default: No.

List action options:
--list          : Print all available library names and versions and exit.
--platforms     : Additionally print supported platforms.
--wincompilers  : Additionally print supported Windows compilers.
--dependencies  : Additionally print library dependencies.
--authors       : Additionally print script authors.
--homepages     : Additionally print library homepages.

Build action options:
--clean     : Clean library specific build and install directories.
--extract   : Extract library source from a ZIP file or a directory.

--configure : Perform the configure stage of the build process.
--compile   : Perform the compile stage of the build process.
--distribute: Perform the distribution stage of the build process.

--finalize  : Generate environment file and call user supplied Finalize procedure.
--complete  : Perform the following stages in order:
              clean, extract, configure, compile, distribute, finalize.

--update    : Perform necessary stages depending on modification times.
              Note: Global stage finalize is always executed.
--simulate  : Simulate update action without actually building libraries.
--touch     : Set modification times of library build directories to current time.

Build configuration options:
--architecture <string>: Build for specified processor architecture.
                         Choices: x86 x64.
                         Default: x64.
--compiler <string>    : Build with specified compiler version.
                         Choices: gcc vs2008 vs2010 vs2012 vs2013 vs2015 vs2017 vs2019.
                         Default: gcc.
--gccversion <string>  : Build with specified MinGW gcc version. Windows only.
                         Choices: 4.9.2 5.2.0 7.2.0.
                         Default: 7.2.0.
--tclversion <string>  : Build Tcl, Tk and Tclkit for specified version.
                         Choices: 8.6.6 8.6.7 8.6.8 8.6.9 8.7.0.
                         Default: 8.6.9.
--osgversion <string>  : Build OpenSceneGraph for specified version.
                         Choices: 3.4.1 3.6.3.
                         Default: 3.6.3.
--buildtype <string>   : Use specified build type.
                         Choices: Release Debug.
                         Default: Specified in setup file.
--forcevs <string>     : Force using VisualStudio for specified library name,
                         if supported by build script.
--exclude <string>     : Force exclusion of build for specified library name.

--url <string>         : Specify BAWT download server.
                         Default: http://www.bawt.tcl3d.org/download.
--toolsdir <string>    : Specify directory containing MSys/MinGW.
                         Default: C:/poSoft/Bawt/BawtBuild/Tools.
--rootdir <string>     : Specify build output root directory.
                         Default: C:/poSoft/Bawt/BawtBuild.
--libdir <string>      : Add a directory containing library source and build files.
                         Default: C:/poSoft/Bawt/InputLibs.
--distdir <string>     : Specify distribution root directory.
                         Default: C:/poSoft/Bawt/BawtBuild/Windows/x64/NA/Distribution.
--finalizefile <string>: Specify file with user supplied Finalize procedure.
                         Default: None.

--sort <string>        : Sort libraries according to specified sorting mode.
                         Choices: dependencies dictionary none.
                         Default: dependencies.
--noversion            : Do not use version number for Tcl package directories.
                         Default: Library name and version number.
--noexit               : Do not exit build process after fatal error, but try to continue.
                         Default: Exit build process after a fatal error.
--noimportlibs         : Do not create import libraries on Windows.
                         Default: Create import libraries. Needs Visual Studio.
--noruntimelibs        : Do not copy VisualStudio runtime libraries.
                         Default: Copy runtime libraries. Needs Visual Studio.
--nostrip              : Do not strip libraries in distribution directory.
                         Default: Strip libraries.
--noonline             : Do not check or download from online repository.
                         Default: Use http://www.bawt.tcl3d.org/download.
--norecursive          : Do not check recursive dependencies.
                         Default: Use recursive dependencies.
--nosubdirs            : Do not create compiler and architecture sub directories.
                         Default: Create compiler and architecture sub directories.

--iconfile <string>    : Use specified icon file for tclkits and starpacks.
                         Default: Standard tclkit icon. Windows only.
--resourcefile <string>: Use specified resource file for tclkits and starpacks.
                         Default: Standard tclkit resource file. Windows only.

--numjobs <int>        : Number of parallel compile jobs.
                         Default: 1
--timeout <float>      : Number of seconds to try renaming or deleting directories.
                         Default: 30.0

--copt <lib> <string>  : Specify library specific configuration option.

Example output of option --dependencies

> tclkit Bawt.tcl Setup\Tcl_Extended.bawt all --dependencies

 #: Name           Version  Dependencies                                                  
-----------------------------------------------------------------------------------------
 1: CMake          3.14.5                                                                 
 2: JPEG           9.c                                                                    
 3: SWIG           4.0.0                                                                  
 4: Tcl            8.6.9                                                                  
 5: TclStubs       8.6.9                                                                  
 6: Tcladdressbook 1.2.4    Tcl                                                           
 7: Tclapplescript 2.2      Tcl                                                           
 8: Tclkit         8.6.9                                                                  
 9: Tk             8.6.9    Tcl                                                           
10: TkStubs        8.6.9    TclStubs                                                      
11: Tktable        2.11     Tk                                                            
12: ZLib           1.2.11                                                                 
13: critcl         3.1.17   Tcl                                                           
14: gdi            0.9.9.15 Tcl                                                           
15: giflib         5.1.9                                                                  
16: gorilla        1.6.0    Tcl Tclkit                                                    
17: hdc            0.2.0.1  Tcl                                                           
18: imgtools       0.3      Tcl Tk                                                        
19: itk            4.1.0    Tk                                                            
20: iwidgets       4.1.1    Tk                                                            
21: libffi         3.2.1                                                                  
22: libressl       2.9.2                                                                  
23: memchan        2.3      Tcl                                                           
24: mqtt           2.0      Tcl                                                           
25: nacl           1.0      Tcl                                                           
26: nsf            2.3.0    Tcl                                                           
27: oratcl         4.6      Tcl                                                           
28: parse_args     0.2.2    Tcl Tk                                                        
29: pdf4tcl        0.9.2    Tk                                                            
30: photoresize    0.1      Tcl Tk                                                        
31: poImg          2.0.1    Tk                                                            
32: printer        0.9.6.15 Tcl                                                           
33: rbc            0.2      Tk                                                            
34: rl_json        0.9.11   Tcl                                                           
35: ruff           0.4      Tcl                                                           
36: shellicon      0.1      Tk TkStubs                                                    
37: tablelist      6.5      Tk                                                            
38: tbcload        1.7      Tcl                                                           
39: tcl3dBasic     0.9.3    CMake Tk SWIG                                                 
40: tclAE          2.0.7    Tcl                                                           
41: tclargp        0.2      Tcl                                                           
42: tclcompiler    1.7.1    Tcl                                                           
43: tclcsv         2.3      Tcl                                                           
44: tcllib         1.19     Tcl critcl                                                    
45: tclparser      1.8      Tcl                                                           
46: tcltls         1.7.18   Tcl libressl                                                  
47: tclvfs         1.4.2    Tcl                                                           
48: tdom           0.9.1    Tcl                                                           
49: tkchat         1.482    Tclkit                                                        
50: tkcon          2.5      Tk                                                            
51: tkdnd          2.9.2    Tk                                                            
52: tklib          0.6      Tk                                                            
53: tkpath         0.3.3    Tk                                                            
54: tksvg          0.1      Tk                                                            
55: treectrl       2.4.1    Tk                                                            
56: trofs          0.4.9    Tk                                                            
57: tserialport    1.1      Tcl                                                           
58: twapi          4.3.5    Tcl                                                           
59: udp            1.0.11   Tcl                                                           
60: ukaz           2.0a3    Tk                                                            
61: vectcl         0.2      Tk                                                            
62: yasm           1.3.0                                                                  
63: BWidget        1.9.13   Tk                                                            
64: Canvas3d       1.2.2    Tk                                                            
65: DiffUtil       0.4.1    Tcl                                                           
66: Ffidl          0.8.0    Tcl libffi                                                    
67: Img            1.4.9    Tk                                                            
68: Mpexpr         1.2      Tcl                                                           
69: PNG            1.6.37   CMake ZLib                                                    
70: TIFF           4.0.10   JPEG ZLib                                                     
71: Tix            8.4.3    Tk                                                            
72: cawt           2.4.4    Tcl twapi                                                     
73: ffmpeg         4.1.3    yasm                                                          
74: mawt           0.2.0    Tk SWIG CMake Img ffmpeg                                      
75: poApps         2.4.2    Tclkit tcllib tklib tablelist Img poImg cawt twapi tkdnd tksvg
76: tksqlite       0.5.13   Tcl Tclkit tablelist Tktable treectrl Img                     
77: tzint          1.1      Tcl PNG                                                       
78: BawtLogViewer  1.0.0    Tclkit tablelist tkdnd poApps                                 
79: Freetype       2.10.0   PNG                                                           
80: libgd          2.2.5    ZLib TIFF JPEG PNG Freetype                                   
81: tclgd          1.2      Tcl libgd                                                     

Top of page

Example batch scripts

This section contains example batch scripts to generate the Tcl-BI distributions and to test the BAWT libraries with different Visual Studio versions.

Build Tcl distributions

The following batch scripts can be used to create the Tcl-BI distributions for all supported Tcl versions.
A separate directory (BawtBuild-X.Y.Z) is created for each Tcl version containing both the x86 and x64 versions.
The needed MSYS/MinGW versions are located in directory BawtBuildTools (using option --toolsdir) to avoid extracting these for each Tcl version.

UpdateTclVersions

Note:You may need to adapt the pathes specified in BUILDLDIR and TOOLSDIR as well as the used Visual Studio version specified in VSVERS.

Batch script UpdateTclVersion.bat

@echo off

rem Architecture, Tcl version and Finalize flag are mandatory parameters
if "%1" == "" goto ERROR
if "%2" == "" goto ERROR
if "%3" == "" goto ERROR

set ARCH=%1
set TCLVERS=%2
set FINALIZE=%3
shift
shift
shift

rem If no target is given, use target "all".
if "%1"=="" goto BUILDALL

rem Loop through the rest of the parameter list for targets.
set TARGETS=
:PARAMLOOP
rem There is a trailing space in the next line. It's there for formatting.
set TARGETS=%TARGETS%%1 
shift
if not "%1"=="" goto PARAMLOOP
goto BUILD

:BUILDALL
set TARGETS=all

:BUILD

set BUILDFILE=Setup\Tcl_Basic.bawt
set FINALIZEFILE=Setup\UserFinalize.bawt
set BUILDDIR=E:/BawtBuild-%TCLVERS%
set TOOLSDIR=E:/BawtBuildTools
set VSVERS=vs2013
set TCLKIT=tclkit-win32.exe
set NUMJOBS=%NUMBER_OF_PROCESSORS%
set ACTION=--update

set OPTS=--builddir %BUILDDIR% ^
         --toolsdir %TOOLSDIR% ^
         --architecture %ARCH% ^
         --compiler %VSVERS% ^
         --numjobs %NUMJOBS% ^
         --noonline ^
         --iconfile poSoft.ico ^
         --resourcefile poSoft.rc ^
         --tclversion %TCLVERS% ^
         --nostrip

set FINALIZEOPT=
if "%FINALIZE%"=="0" goto NOFINALIZE
set FINALIZEOPT=--finalizefile %FINALIZEFILE%
:NOFINALIZE

rem Build all libraries as listed in build configuration file.
CALL %TCLKIT% Bawt.tcl %OPTS% %FINALIZEOPT% %ACTION% %BUILDFILE% %TARGETS%

goto EOF

:ERROR
echo.
echo Usage: %0 Architecture TclVersion UseFinalizeScript [Target1] [TargetN]
echo   Architecture     : x86 x64
echo   TclVersion       : 8.6.5 8.6.6 8.6.7 8.7.0
echo   UseFinalizeScript: 0 1
echo   Default target   : all
echo   Build directory  : %BUILDDIR%
echo.

:EOF

Batch script UpdateTclVersions.bat

@echo off

CALL UpdateTclVersion x86  8.7.0  0
CALL UpdateTclVersion x64  8.7.0  0

CALL UpdateTclVersion x86  8.6.8  0
CALL UpdateTclVersion x64  8.6.8  0

Build Visual Studio versions

The following batch scripts can be used to build all BAWT libraries with different Visual Studio versions.
The different versions are created in directory BawtBuild containing both the x86 and x64 versions.
The needed MSYS/MinGW versions are located in directory BawtBuildTools (using option --toolsdir) to avoid extracting these for each Tcl version.

UpdateVisualStudioVersions

Note:You may need to adapt the pathes specified in BUILDLDIR and TOOLSDIR as well as the used Tcl version specified in TCLVERS.

Batch script UpdateVisualStudioVersion.bat

@echo off

rem Architecture, VisualStudio version and Finalize flag are mandatory parameters
if "%1" == "" goto ERROR
if "%2" == "" goto ERROR
if "%3" == "" goto ERROR

set ARCH=%1
set VSVERS=%2
set FINALIZE=%3
shift
shift
shift

rem If no target is given, use target "all".
if "%1"=="" goto BUILDALL

rem Loop through the rest of the parameter list for targets.
set TARGETS=
:PARAMLOOP
rem There is a trailing space in the next line. It's there for formatting.
set TARGETS=%TARGETS%%1 
shift
if not "%1"=="" goto PARAMLOOP
goto BUILD

:BUILDALL
set TARGETS=all

:BUILD

set BUILDFILE=Setup\AllLibs.bawt
set FINALIZEFILE=Setup\UserFinalize.bawt
set BUILDDIR=E:/BawtBuild
set TOOLSDIR=E:/BawtBuildTools
set GCC=5.2.0
set TCLVERS=8.6.7
set TCLKIT=tclkit-win32.exe
set NUMJOBS=%NUMBER_OF_PROCESSORS%
set ACTION=--update

set OPTS=--builddir %BUILDDIR% ^
         --toolsdir %TOOLSDIR% ^
         --architecture %ARCH% ^
         --compiler %VSVERS% ^
         --gccversion %GCC% ^
         --numjobs %NUMJOBS% ^
         --noonline ^
         --tclversion %TCLVERS% ^
         --nostrip

set FINALIZEOPT=
if "%FINALIZE%"=="0" goto NOFINALIZE
set FINALIZEOPT=--finalizefile %FINALIZEFILE%
:NOFINALIZE

rem Build all libraries as listed in build configuration file.
CALL %TCLKIT% Bawt.tcl %OPTS% %FINALIZEOPT% %ACTION% %BUILDFILE% %TARGETS%

goto EOF

:ERROR
echo.
echo Usage: %0 Architecture TclVersion UseFinalizeScript [Target1] [TargetN]
echo   Architecture     : x86 x64
echo   VisualStudio     : vs2008 vs2010 vs2012 vs2013 vs2015 vs2017 vs2019
echo   UseFinalizeScript: 0 1
echo   Default target   : all
echo   Build directory  : %BUILDDIR%
echo.

:EOF

Batch script UpdateVisualStudioVersions.bat

@echo off

CALL UpdateVisualStudioVersion x86  vs2008  0

CALL UpdateVisualStudioVersion x86  vs2010  0

CALL UpdateVisualStudioVersion x86  vs2012  0
CALL UpdateVisualStudioVersion x64  vs2012  0

CALL UpdateVisualStudioVersion x86  vs2013  0
CALL UpdateVisualStudioVersion x64  vs2013  0

CALL UpdateVisualStudioVersion x86  vs2015  0
CALL UpdateVisualStudioVersion x64  vs2015  0

CALL UpdateVisualStudioVersion x86  vs2017  0
CALL UpdateVisualStudioVersion x64  vs2017  0

CALL UpdateVisualStudioVersion x86  vs2019  0
CALL UpdateVisualStudioVersion x64  vs2019  0
Top of page