Current version 0.4.3 uses tcl/tk 8.5.12 and tcl/tk 8.6b3 For additional information please use the following links: * [kbs packages] how to use, change, update and even include own extensions * [kbs todo] open issues * [kbs bugs and comments] you can also use the tracker under http://sourceforge.net/projects/kbskit/ * [kbs discussion] for discussion of further development * [kbs examples] for command line examples of different builds The system can generate [Tclkit] and [Tclkit Lite] executables and Tcl packages for different operating systems. Tested are Linux, SunOS, Windows and Irix. [Tclkit]: http://www.equi4.com/tclkit/tclkitlite.html [Tclkit Lite]: http://www.equi4.com/tclkit/tclkitlite.html **Sources and precompiled binaries** are available from * kbs.tcl - single source file, all you need Metakit tclkit interpreter, read/write of kitfiles, C++ libs necessary: * kbsmk*cli* - shell application * kbsmk*dyn* - tk dynamic loadable * kbsmk*gui* - tk static inserted Vlerq tclkit lite interpreter, readonly kitfiles: * kbsvq*cli* - shell application * kbsvq*dyn* - tk dynamic loadable * kbsvq*gui* - tk static inserted Batteries included interpreter: * kbsvq*bi with: ======none bwidget1.9.5 gridplus2.9 icons1.2 img1.4.1 itcl3.4 itk3.4 iwidgets4.0.2 memchan2.2.1 mentry3.6 nsf2.0b3 ral0.10 rbc0.1 sqlite3.7.14 tablelist5.6 tcllib1.14 tclx8.4 thread2.6.7 tkcon tkdnd2.6 tklib0.5 tktable2.10 treectrl2.4.1 trofs0.4.6 udp1.0.8 wcb3.4 xotcl1.6.7 ====== Sqlite table editor: * *_tksqlite **Quick start** * Get the script ======none wget -O kbs.tcl http://sourceforge.net/projects/kbskit/files/kbs/0.4/kbs.tcl/download ====== or the following on OS X (where 'wget' is a link to 'curl') ======none curl -o kbs.tcl -L http://sourceforge.net/projects/kbskit/files/kbs/0.4.2/kbs.tcl/download ====== make it executable ======none chmod a+x kbs.tcl ====== * Build [Tclkit] executables: ======none ./kbs.tcl -r -mk install kbskit8.5 ====== * Build [Tclkit Lite] executables: ======none ./kbs.tcl -r -vq install kbskit8.5 ====== * Build user defined batteries included tclkit lite executables: ======none ./kbs.tcl -r -vqi-bi -bi=".." install kbskit8.5 ====== * Build kit-file: ======none ./kbs.tcl -r install kbspkg8.5 ====== * Start graphical user interface: ======none ./kbs.tcl gui ====== * Display online help: ======none ./kbs.tcl Kitgen build system (0.4.2) Usage: kbs.tcl ?options? command ?args? options (configuration variables are available with [Get ..]): -pkgfile=?file? contain used Package definitions (default is empty and use only internal definitions) -builddir=?dir? set used building directory containing all package specific 'makedir' (default is './build$tcl_platform(os)') -i -ignore ignore errors and proceed (default is disabled) -r -recursive recursive Require packages (default is disabled) -v -verbose display running commands and command output -CC=?command? set configuration variable 'CC' (default is 'gcc' or existing environment variable 'CC') -bi=?package ..? set configuration variable 'bi' (default is '') to list of packages for use in batteries included builds --enable-* --disable-* set configuration variable '-*' Used external programs (default values are found with 'auto_execok'): -make=?command? set configuration variable 'exec-make' (default is first found 'gmake' or 'make') -cvs=?command? set configuration variable 'exec-cvs' (default is 'cvs') -svn=?command? set configuration variable 'exec-svn' (default is 'svn') -tar=?command? set configuration variable 'exec-tar' (default is 'tar') -gzip=?command? set configuration variable 'exec-gzip' (default is 'gzip') -unzip=?command? set configuration variable 'exec-unzip' (default is 'unzip') -wget=?command? set configuration variable 'exec-wget' (default is 'wget') -doxygen=?command? set configuration variable 'exec-doxygen' (default is 'doxygen') you need at least version 1.7.5 Used interpreter in package scripts (default first found in '/home/rene/kbs.sf/buildLinux/bin') -kitcli=?command? set configuration variable 'kitcli' (default 'kbs*cli*') -kitdyn=?command? set configuration variable 'kitdyn' (default 'kbs*dyn*') -kitgui=?command? set configuration variable 'kitgui' (default 'kbs*gui*') Mk4tcl based 'tclkit' interpreter build options: -mk add 'mk-cli|dyn|gui' to variable 'kit' -mk-cli add 'mk-cli' to variable 'kit' -mk-dyn add 'mk-dyn' to variable 'kit' -mk-gui add 'mk-gui' to variable 'kit' -mk-bi add 'mk-bi' to variable 'kit' -staticstdcpp build with static libstdc++ Vqtcl based 'tclkit lite' interpreter build options: -vq add 'vq-cli|dyn|gui' to variable 'kit' -vq-cli add 'vq-cli' to variable 'kit' -vq-dyn add 'vq-dyn' to variable 'kit' -vq-gui add 'vq-gui' to variable 'kit' -vq-bi add 'vq-bi' to variable 'kit' If no interpreter option is given '-vq' will be asumed. additional variables for use with [Get ..]): application name of application including version number builddir common build dir (can be set with -builddir=..) makedir package specific dir under 'builddir' srcdir package specific source dir under './sources/' builddir-sys makedir-sys srcdir-sys system specific version (p.e. windows C:\.. -> /..) sys TEA specific platform subdir (win, unix) TCL* TCL* variables from tclConfig.sh, loaded on demand TK* TK* variables from tkConfig.sh, loaded on demand command: help this text doc create program documentation (./doc/kbs.html) license display license information config display used values of configuration variables gui start graphical user interface list ?pattern? .. list packages matching pattern (default is *) Trailing words print these parts of the definition too. require pkg .. return call trace of packages sources pkg .. get package source files (under sources/) configure pkg .. create 'makedir' (in 'builddir') and configure package make pkg .. make package (in 'makedir') install pkg .. install package (in 'builddir') test pkg .. test package clean pkg .. remove make targets distclean pkg .. remove 'makedir' 'pkg' is used for glob style matching against available packages (Beware, you need to hide the special meaning of * like foo\*) Startup configuration: Read files '$(HOME)/.kbsrc' and './kbsrc'. Lines starting with '#' are treated as comments and removed. All other lines are concatenated and used as command line arguments. Read environment variable 'KBSRC'. The contents of this variable is used as command line arguments. The following external programs are needed: * C-compiler, C++ compiler for metakit based programs (see -CC=) * make with handling of VPATH variables (gmake) (see -make=) * cvs, svn, tar, gzip, unzip, wget to get and extract sources (see -cvs= -svn= -tar= -gzip= -unzip= -wget= options) * msys (http://sourceforge.net/project/showfiles.php?group_id=10894) is used to build under Windows. You need to put the kbs-sources inside the msys tree (/home/..). ====== **Build requirements** The following external programs are needed: * A C compiler * make with handling of VPATH variables (gmake aka GNU make) * wget, cvs, svn, tar, gzip, unzip to get and extract sources To build under Windows you need the [msys] system and put the kbs-sources inside the msys tree (/home/..). [msys]: mingw-get-inst-20111118.exe from https://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/ **License & support** This work is under BSD license (see file 'license.terms') The [Tclkit]-specific sources are license free; they just have a copyright. Hold the author(s) harmless and any lawful use is permitted. This does *not* apply to any of the sources of the other major Open Source Software used in Tclkit, which each have very liberal BSD/MIT-like licenses: * [Tcl]/[Tk], [TclVFS], [Thread], [Vlerq], [Zlib] The extensions used each have their own licenses. Please see their sources. **Acknowledgements** This work is based on the [Kitgen] system (http://www.equi4.com/tclkit/kitgen.html) and ideas and code about a kitgen build system by Jean-Claude Wippler. With thanks to John Ousterhout for creating Tcl/Tk, Matt Newman and Vince Darley for developing the virtual file system, and the members of the Tcl Core Team for diligently maintaining and taking forward the Tcl/Tk code base plus extensions. ---- **Questions** [LV] 2007 June 22 In my resultSunOS/bin directory, I see the following: tclkit8.5-cli tclkit8.5-dyn tclkit8.5-gui So, what are the differences between these three "[tclkit]"s ... [RZ] This is because of [kitgen] and its sources from [jcw] and according to [http://www.equi4.com/tclkit/kitgen.html] * tclkit-cli - a tclsh-like console app - [Tk] and related GUI packages are not built in. * tclkit-dyn - wish-like, after a '''package require Tk'''. Without the package require, at least on Unix, no GUI aspects appear. * tclkit-gui - same as "tclkit-dyn", but with Tk linked-in statically I even tried a minimal tclkitsh but did not really finish the kbs.tcl build process code to do that. [LV] "and, are they ''literally'' tclkits - that is, have the identical packages as the executables found at the tclkit home site, or are they interpretors that are similar to tclkits?" [LV] 2007 July 09 $ tclkit8.5 # mine is Tcl 8.5a4 % package require Tcl 8.5 % package require lwv % puts [lsort -nocase [package names]] http Itcl Mk4tcl mk4vfs msgcat opt platform pwb rechan scripdoc starkit Tcl tcltest Tk vfs vfs::mk4 vfs::zip vfslib zipvfs zlib $ kbskit % package require Tcl 8.5 % package require lwv % puts [lsort -nocase [package names]] http mk4vfs mklite msgcat opt platform rechan starkit Tcl tcl::tommath tcltest Thread Tk Ttrace vfs vfs::m2m vfs::mk4 vfs::mkcl vfs::zip vfslib vlerq zlib So, to the "are they literally tclkits" question. the answer is no. Here's the differences I see: [[to be added - the versions of the packages one finds in these options]] %|Tclkit 8.5 | Tclkit-lite 8.4.15 | Kbs (version 0.3) | kbs (latest version, building 8.6 with metakit) |% &| dde | dde (on Windows) | dde (on Windows) | ??? |& &| N/A | N/A | N/A | fileutil::globfind |& &| http | http | http | http |& &| Itcl | Itcl | itcl3.4 in kbsmk8.5* | itcl and Itcl 4.0 in kbsmk8.6* |& &| Mk4tcl | N/A | in kbsmk* | in kbsmk |& &| mk4vfs | mk4vfs | mk4vfs | N/A |& &| N/A | N/A | mklite | N/A |& &| msgcat | msgcat | msgcat | msgcat |& &| opt | opt | opt | opt |& &| platform | N/A | platform | platform |& &| pwb | pwb | N/A | N/A |& &| rechan | N/A | rechan | N/A |& &| registry | registry (on Windows) | registry (on Windows) | unknown |& &| scripdoc | N/A | N/A | N/A |& &| starkit | starkit | starkit | starkit |& &| Tcl | Tcl | Tcl | Tcl |& &| | | tcl::tommath | tcl::tommath |& &| unknown | unknown | unknown | tclkitpath |& &| N/A | N/A | N/A | TclOO |& &| tcltest | tcltest | tcltest | |& &| | | Thread | Thread |& &| (I don't know) | thrill (on Windows) | (I don't know) | unknown |& &| (I don't know) | thrive (on Windows) | (I don't know) | unknoqn |& &| N/A | N/A | N/A | tile |& &| Tk | Tk | Tk | Tk |& &| N/A | N/A | N/A | trsync |& &| N/A | N/A | N/A | Ttk |& &| N/A | N/A | N/A | ttk::theme::alt |& &| N/A | N/A | N/A | ttk::theme::clam |& &| N/A | N/A | N/A | ttk::theme::classic |& &| N/A | N/A | N/A | ttk::theme::default |& &| unknown | unknown | Ttrace | Ttrace |& &| vfs | vfs | vfs | vfs |& &| N/A | N/A | N/A | vfs::ftp |& &| N/A | N/A | N/A | vfs::http |& &| | | vfs::m2m | N/A |& &| vfs::mk4 | vfs::mk4 | vfs::mk4 | vfs::mk4 |& &| (I don't know) | vfs::mkcl | vfs::mkcl | |& &| N/A | N/A | N/A | vfs::ns |& &| N/A | N/A | N/A | vfs::tar |& &| N/A | N/A | N/A | vfs::quota|& &| N/A | N/A | N/A | vfs::template::version|& &| N/A | N/A | N/A | vfs::template::version::delta|& &| N/A | N/A | N/A | vfs::test|& &| N/A | N/A | N/A | vfs::tk|& &| N/A | N/A | N/A | vfs::urltype|& &| N/A | N/A | N/A | vfs::webdav|& &| vfs::zip | vfs::zip | vfs::zip | |& &| vfslib | vfslib | vfslib | |& &| | | vlerq | N/A |& &| zipvfs | zipvfs | N/A | N/A |& &| zlib | zlib | zlib | N/A |& Notice that one of the ramifications of this is that [Itcl] , [Mk4tcl], [pwb], [scripdoc], and [zipvfs] are not available in the interpreter created. Per the [tclkit] creator's wishes, please use a different name, such as '''kbskit''', so as not to confuse applications. [RZ] Ok, the executables now start with "kbskit" and the package kit file with "kbspkg". [LV] I have a question for you. When I run kbs.tcl -r install kbskit-8.5, the resulting kbskit-gui that is created knows about the following package names: * http * mk4vfs * mklite * msgcat * opt * platform * rechan * starkit * Tcl * tcl::tommath * tcltest * Thread * Tk * Ttrace * vfs * vfs::m2m * vfs::mk4 * vfs::mkcl * vfs::zip * vfslib * vlerq * zlib I'm not certain how the "kbspkg" relates to this kbskit. [RZ] 'kbskit*' are the executable tclkit's. The packages inside are necessary for the tclkit interpreter. 'kbspkg85.kit' is a kit file containing other extensions. It can be sourced by the 'kbskit*' interpreter. ---- MSH 19 Feb 2008 I have been keeping an eye on the http://www.equi4.com/pub/tk/downloads.html page for a final 8.5.0 or 8.5.1 starkit executable but no one seems to be maintaining that page anymore. Is the kitgen the only way to go now as I do not have access to a compiler so that makes things very difficult. If anyone has 8.5.1 starkit executables for windows/linux/sun anywhere accessible I would be grateful. See http://www.patthoyts.tk/tclkit.html ---- [LV] Feb 29, 2008 Is there a way to build kbskit so that it includes Itcl? When I look at what packages come in tclkit, that is the major piece missing (also missing are Mk4tcl - but that's gone because this is a tclkit-lite, right? [RZ] yes, and it is the reason we do not need a C++ compiler any more), pwb, scripdoc (and I think that one is just a backwards compatibility with old code), and zipvfs (anyone know what that one is?). [RZ] Before adding Itcl I would ask if it is also OK to put itcl/itk/iwidgets in kbspkg*.kit? Until now I have added the necessary build entries in the HEAD version of kbspkg.kbs. You could build everything with: ======none rm -rf sources/kbskit-8.5 kbs.tcl -r install iwidgets\* ====== [LV] I would see no problem putting itk and iwidgets in kbspkg. But the point of putting itcl in kbskit is to run existing starkits. To move itcl into kbspkg would mean that the starkit would have to be modified ... ---- [LV] Mar 27, 2009 Is there a way to provide a path to a usable tclsh to kbs.tcl so that it doesn't have to create a tclsh before beginning the configuration, etc.? [RZ] Because it is a tcl script you can do p.e. wish8.5 kbs.tcl ... Yes, you need at least 8.5 because of {*}! And the first invocation without this starts the compile. Or you change the first line of 'kbs.tcl' to #! /path/to/your/wish8.5 And you need 'sources/kbskit*/' for the standard kbskit.kbs or you always use your own with '-pkgfile=' ---- [LV] 2009-Apr-20 Just a note for other Solaris users. In the above page, there is a requirement that the build process requires GNU make. If you encounter a case where the build fails saying "no input files", that means that your $PATH is set in such a way that you are getting /usr/ccs/bin/make instead of the GNU make. ---- [LV] 2009-May-07 I am wondering about the line ====== ./kbs.tcl -r -vqi-bi -bi=".." install kbskit8.5 ====== mentioned above. The -vq part of -vqi-bi, I presume, means the tclkit lite, and the -bi means batteries included. Is that really all one string, without spaces, etc.? Is the -bi=".." a literal string to provide or is there supposed to be actual text between the quotation marks? 2009-May-08 - looks to me as it is a typo above - kbs.tcl says there is a -vq-bi flag. Also, if I type in the corrected line literally, there is an error saying that package '''..''' could not be found. So, it looks like to me that the command line should be ====== ./kbs.tcl -r -vq-bi -bi="BWidget" install kbskit8.5 ====== where BWidget would be replaced by the name of the package to be bundled in. [rgf] ''I think 'bi' is a configuration variable that can be preset with a list of packages, or the list can be supplied instead of the '..'. Try './kbs.tcl help' for the details.'' ---- One thing that would be useful to add to this page would be a series of links to tools that kbs.tcl requires to work. For instance, it requires a [cvs] command, some sort of [C] compiler, some sort of [shell] command. What other tools are needed? [RZ] see above under '''Build requirements'''. ---- [anoved] I've written a brief article about my good experience with kbs on Mac OS X: http://anoved.net/2010/01/kitgen-build-system-for-tcltk/ [jcw] 2010-01-14 - What OS version are you using? On 10.6 (Snow Leopard), I get fatal errors in tkMacOSXBitmap.c such as "‘CIconHandle’ undeclared". [anoved] 10.6.2 - so I'm not sure what the discrepancy is between our experiences. How recently did you retrieve kbs.tcl or the code it downloads? [jcw] - Just now, to make sure. I can't explain the difference. Odd. ---- [JOB] - On Mac OSX 10.6.4 (Leo): to get rid of those various tkMacOSXBitmap.c compilation errors you need to download the tk8.5.9-decarbon.tar.gz source from GIT-HUB (https://github.com/das/tcltk) file repository. The cocoa port is maintained by Daniel A. Steffen out there. Once this is done, use the --enable-aqua option compile and you are fine! ---- [CliC] 2010-12-25 - Any reason the prebuilt tclkits on the SF site for Windows NT don't include Tcl 8.6, whereas the ones for Unix-y platforms do? Does kbskit have problems building Tcl 8.6 on Windows, or is it just that no one has tried it or posted the results on this site? If it's the latter, I'll give it a shot -- thanks. [RZ] Tcl 8.6 needs a newer msys/mingw version. I have to upgrade first. [jcw] 2011-04-10 - The www.equi4.com site for sdx and zlib is now a redirect to equi4.com, to make kbs.tcl work again I had to remove the "www" prefix in two places in the script. ---- '''[BJ] - 2012-02-28 09:52:43''' has anybody had any luck with building with kbs.tcl using mingw cross compile environment on linux? I have always been reasonably succuessful building things with mingw, but I am really struggling on windows 7. Problems seem to be mostly related to symlinks not working properly. [RZ] Cross compiling is on my todo list. But which problems do you have? I have build the latest windows binaries under windows 7. Please install the under ''Build requirements'' mentioned msys/mingw. ---- [RZ] hi [DcK] the classic GNU compile utilities, like autoconf automake are not used inside kbs. ---- [AMG]: Using WindowsNT_kbsmk8.6-dyn.exe [http://sourceforge.net/projects/kbskit/files/kbs/0.4.3/WindowsNT_kbsmk8.6-dyn.exe/download] or WindowsNT_kbsvq8.6-dyn.exe [http://sourceforge.net/projects/kbskit/files/kbs/0.4.3/WindowsNT_kbsvq8.6-dyn.exe/download] downloaded from Sourceforge, I get these errors whenever I try to load [SQLite]: ======none % package require sqlite3 error reading package index file C:/Documents and Settings/td26063/My Documents/Invincea Downloads/WindowsNT_kbsvq8.6-gui.exe/lib/dde1.4/pkgIndex.tcl: package not known error reading package index file C:/Documents and Settings/td26063/My Documents/Invincea Downloads/WindowsNT_kbsvq8.6-gui.exe/lib/reg1.3/pkgIndex.tcl: package not known error reading package index file C:/Documents and Settings/td26063/My Documents/Invincea Downloads/WindowsNT_kbsvq8.6-gui.exe/lib/thread2.7b1/pkgIndex.tcl: package not known ====== SQLite does load successfully; it's just a package manager gripe about other broken packages. Also, these errors only happen for *-dyn.exe, not *-gui.exe. However, when loading an invalid package, these errors happen in all four binaries, followed by "can't find package foobar" or whatever. Here's what happens when I try to load [DDE]: ======none % package require dde (same errors as before) can't find package dde % load "C:/Documents and Settings/td26063/My Documents/Invincea Downloads/WindowsNT_kbsvq8.6-gui.exe/lib/dde1.4/tcldde14.dll" cannot find symbol "Tcldde_Init" ====== [RZ] This is because of a problem in the tcl::pkgconfig command. It will be fixed in the next release. Meanwhile you can add the following command before calling "package require": ====== proc ::tcl::pkgconfig {args} { switch -- [join $args _] { get_threaded {return 1} get_debug {return 0} } } ====== ---- [AMG]: I spotted another oddity with the aforementioned binaries. Somehow, they break the up and down arrows in [Tkcon] 1.113 [http://tkcon.cvs.sourceforge.net/viewvc/tkcon/tkcon/tkcon.tcl?revision=1.113]. With every other Tcl interpreter I've tried, up and down work like Ctrl+P and Ctrl+N (previous and next history command). With WindowsNT_kbsvq8.6-gui.exe, up and down move the cursor around the [[[text]]] widget. [APN] This has nothing to do with tclkit per se. Some changes in the Tk bindings made somewhere around the 8.6b3 time are the cause. It is not only tkcon that is affected. Not sure if apps are supposed to be modified to fix this (in which case what happens to backward compatibility?) [AMG]: Yes, I confirmed this by running Tkcon using the latest version of Tcl/Tk in http://core.tcl.tk/ . Apparently the reason I never saw this with other interpreters is that they were all out of date. :^) <> Tclkit | Deployment | Development