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 Tcl/Tk, TEA compliant packages or Tclkits.
  - Otherwise Visual Studio or Visual Studio Express.
    Versions 2008, 2010, 2012, 2013, 2015 are currently supported.
    If Visual Studio is not installed in the standard location, you have to adapt procedure GetVcvarsProg. 
 
Downloads:
  - BAWT framework (appr. 10 MB)

  - MSys/MinGW distribution(s) (appr. 110 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
    Note, that MSys/MinGW with gcc 4.9.2 is set as default (use option --gccversion to change)
 
Actions:
  - Extract BAWT-Framework Bawt-0.7.2.zip in a folder of choice, ex. C:\Bawt
  - Copy MSys/MinGW distribution(s) into C:\Bawt\Bawt-0.7.2\Bootstrap-Windows 
  - Open command shell window and go into folder C:\Bawt\Bawt-0.7.2

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

  - Create Tcl distribution for 64-bit (using VisualStudio 2013 to build libraries Mpexpr and tkdnd):
    > Build-Windows.bat x64 vs2013 Setup\Tcl.bawt complete all

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. 10 MB)

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

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

Build instructions for Mac

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

Downloads:
  - BAWT framework (appr. 10 MB)

Actions:
  - Extract BAWT-Framework Bawt-0.7.2.zip in a folder of choice.
  - Open shell (Terminal window), go into created folder Bawt-0.7.2 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.bawt complete all
Top of page

Command line usage

Output of option --help

> tclkit Build.bawt --help

Usage: Build.bawt [Options] BuildFile LibraryName [LibraryNameN]

Start the BAWT automatic library build process.
When using "all" as library name, all libraries specified
in the build configuration 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.
--loglevel <int>: Specify log message verbosity.
                  Choices: 0 - 4. Default: 3.

List action options:
--list          : Print all available library names and versions and exit.
--platforms     : Additionally print supported platforms.
--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 sources from ZIP files or sub-directories.

--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, distribution, finalize.

--update    : Perform necessary stages depending on modification times.
              Note: Global stage finalize is always executed.
--simulate  : Simulate update action without actually building libraries.

Build configuration options:
--architecture <string>: Build for specified processor architecture.
                         Choices: x86 x64.
                         Default: x64.
--compiler <string>    : Build with specified compiler version.
                         Using gcc: Windows Linux Darwin.
                         Using Visual Studio: vs2008 vs2010 vs2012 vs2013 vs2015 vs2017.
                         Default: Windows.
--gccversion <string>  : Build with specified MinGW gcc version. Windows only.
                         Choices: 4.9.2 5.2.0.
                         Default: 4.9.2.
--tclversion <string>  : Build Tcl, Tk and Tclkit for specified version.
                         Choices: 8.6.5 8.6.6 8.6.7 8.7.0.
                         Default: 8.6.7.
--buildtype <string>   : Use specified build type.
                         Choices: Release Debug.
                         Default: Specified in build configuration file.

--url <string>         : Specify BAWT download server.
                         Default: http://www.bawt.tcl3d.org/download.
--toolsdir <string>    : Specify directory containing MSys/MinGW.
                         Default: C:/poSoft/Bawt/Tools.
--builddir <string>    : Specify build root directory.
                         Default: C:/poSoft/Bawt/Windows/x64.
--libdir <string>      : Specify directory containing libraries.
                         Default: C:/poSoft/Bawt/InputLibs.
--distdir <string>     : Specify distribution root directory.
                         Default: C:/poSoft/Bawt/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.
--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.

--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

Example output of option --dependencies

> tclkit Build.bawt Setup\Tcl.bawt all --dependencies

 #: Name           Version Dependencies                                                  
----------------------------------------------------------------------------------------
 1: CMake          3.9.2                                                                 
 2: CMakeWin32     3.9.2                                                                 
 3: InnoSetup      5.5.9                                                                 
 4: Tcl            8.6.7                                                                 
 5: TclStubs       8.6.7                                                                 
 6: Tcladdressbook 1.2.4   Tcl                                                           
 7: Tclapplescript 2.2     Tcl                                                           
 8: Tclkit         8.6.7                                                                 
 9: Tk             8.6.7   Tcl                                                           
10: TkStubs        8.6.7   TclStubs                                                      
11: Tktable        2.11    Tk                                                            
12: ZLib           1.2.8                                                                 
13: critcl         3.1.15  Tcl                                                           
14: imgtools       0.3     Tcl Tk                                                        
15: libressl       2.5.4                                                                 
16: memchan        2.3     Tcl                                                           
17: nacl           1.0     Tcl                                                           
18: oratcl         4.6     Tcl                                                           
19: parse_args     0.2.2   Tcl Tk                                                        
20: pdf4tcl        0.9.1   Tk                                                            
21: photoresize    0.1     Tcl Tk                                                        
22: poImg          2.0.1   Tk                                                            
23: rbc            0.2     Tk                                                            
24: rl_json        0.9.6   Tk                                                            
25: ruff           0.4     Tcl                                                           
26: shellicon      0.1     Tk TkStubs                                                    
27: tablelist      5.18    Tk                                                            
28: tbcload        1.7     Tcl                                                           
29: tclAE          2.0.7   Tcl                                                           
30: tcllib         1.18    Tcl critcl                                                    
31: tcltls         1.7.12  Tcl libressl                                                  
32: tdom           0.9.0   Tcl                                                           
33: tkchat         1.482   Tclkit                                                        
34: tkcon          2.5     Tk                                                            
35: tkdnd          2.9     CMake CMakeWin32 Tk                                           
36: tklib          0.6     Tk                                                            
37: tkpath         0.3.3   Tk                                                            
38: tksvg          0.1     Tk                                                            
39: treectrl       2.4.1   Tk                                                            
40: trofs          0.4.9   Tk                                                            
41: tserialport    1.1     Tcl                                                           
42: twapi          4.2b9   Tcl                                                           
43: udp            1.0.11  Tcl                                                           
44: ukaz           2.0a3   Tk                                                            
45: vectcl         0.2     Tk                                                            
46: BWidget        1.9.11  Tk                                                            
47: Canvas3d       1.2.2   Tk                                                            
48: Img            1.4.6   Tk                                                            
49: Mpexpr         1.2     Tcl                                                           
50: PNG            1.6.17  CMake CMakeWin32 ZLib                                         
51: SWIG           3.0.12  Tcl                                                           
52: cawt           2.4.0   Tcl twapi                                                     
53: poApps         2.3.0   Tclkit tcllib tklib tablelist Img poImg cawt twapi tkdnd tksvg
54: tcl3dBasic     0.9.0   CMake CMakeWin32 Tk SWIG                                      
55: tksqlite       0.5.13  Tclkit tablelist Tktable treectrl Img                         
56: tzint          1.1     Tcl PNG                                                       
57: SetupTcl               All                                                           
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.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% Build.bawt %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.7  0
CALL UpdateTclVersion x64  8.6.7  0

CALL UpdateTclVersion x86  8.6.6  0
CALL UpdateTclVersion x64  8.6.6  0

CALL UpdateTclVersion x86  8.6.5  0
CALL UpdateTclVersion x64  8.6.5  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\All.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% Build.bawt %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
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
Top of page