Information about kbs packages
LES on 2022-10-29 Note: it took me some time to make this run on my Linux machine. I eventuallly realized it is biased towards Windows so I ran kbs.tcl through dos2unix and it finally worked.
Detailed information is available in the internal doc. The doc can be build with:
./kbs.tcl doc
and is located under './doc'.
(But only if you have Doxygen.)
A common 'Package' definition is like:
Package <name> { Require script Source script Configure script Make script Install script Clean script Test script }
In each script argument the 'Get' and 'Run' procedures could be used. Additionally per section the following proc's are available:
Require: Use Source: Link, Script, Http, Tgz, Zip, Cvs, Svn Configure: Kit, Patch, Config Make: Kit Install; Kit, Libdir, Tcl Test: Kit
Originally it is a Tcl extension based on the TEA system. but you can use whatever you want. It needs to build in the common configure/make/make install cycle.
A 'Package' definition in the "sources/kbskit-8.5/kbskit.kbs" file. The file will be sourced on startup. It contain the available package definitions.
See the documentation of 'kbs.tcl' for procedures matching '::kbs::config::*'
./kbs.tcl doc
The html documentation can then be found in the './doc' directory
(Doxygen is required.)
Use the '-builddir=..' switch. Do not mix different tcl versions in the build process!
./kbs.tcl -r -builddir=b85 install kbskit-8.5 ./kbs.tcl -r -builddir=b86 install kbskit-8.6
Create your own *.kbs p.e. './sources/z/z.kbs' with:
source [file join sources kbskit-8.5 kbskit.kbs] set ::kbs::config::_(THREADS) {--disable-threads} set ::kbs::config::_(64BIT) {--disable-64bit} set ::kbs::config::_(SYMBOLS) {--enable-symbols} Package z-0.1 { Require kbskit-8.5 Source link z Configure {} Install { Tcl z0.1 } }
and run it with:
./kbs.tcl -pkgfile=sources/z/z.kbs install z-0.1
Use the 'Kit' procedure in Make, Install, Clean and Test definitions. If you have a 'main.tcl' as startup file you can use
Package foo-0.1 { Require bar-0.1 Source link foo-0.1 Configure {} Make { Kit make foo bar0.1 } Install { Kit install foo -gui } }
and without 'main.tcl' you can create one with:
Configure { Kit configure foo {source $::starkit::topdir/foo.tcl} bar }
To create starkits just remove the '-gui' switch.
Package tcl { Require tcl-8.5 }
Source cvs tcllib.cvs.sourceforge.net:/cvsroot/tcllib -r tklib-0-4-1 tklib Source cvs tclx.cvs.sourceforge.net:/cvsroot/tclx
Source fetch http://www.sqlite.org/sqlite-3_3_17-tea.tar.gz
Source link itcl-3.3
See p.e. 'Package tksqlite-0.5.6 ..' in 'sources/kbskit-8.5/kbskit.kbs'
See p.e. 'Package tksqlite-0.5.6 ..' in 'sources/kbskit-8.5/kbskit.kbs'. Just remove the '-gui switch'.
To use an expanded starkit it with kbs, put your 'my.vfs/' under the kbs sources directory and create a package definition file like:
source [file join sources kbskit0.3.1 kbskit.kbs] Package my0.1 { Require { Use kbskit8.5 sdx.kit tcllib1.11 tklib0.5 } Source { Link my.vfs } Configure {} Make { Kit my tcllib1.11/cmdline tklib0.5/autoscroll tklib0.5/tooltip} Install { Kit my -vq-gui } Clean { Kit my } }
The given packages will be included in the final executable. You can see what happens with:
./kbs.tcl -v -pkgfile=your_package_file -r install my0.1