- Simple: If you want install a package, a single command (GUI to come) will do it for you.
- Simple: If you want to start your own archive, all you need is a webserver and some files.
- Tcl: It should work with Pure-Tcl 8.3+
- Archive: Lots of packages available (about 20, for now)
- Network: Archives point to each other. Forming a network where each publisher can maintain their own library of binaries and pure tcl software.
stantool install somepackageTo install somepackage.The current library holds a few packages already, namely stan, snack (windows/linux-i386/macosx), zlib (windows/linux-i386) and dict (windows/linux-i386). Additionally, a secondary (linked!) archive lists all the cantcl packages. Not all cantcl packages will install at the moment (because pkg_mkIndex doesn't work for them!).-- 10Sept2004 PS
Getting stanThe simplest way to get started is to fetch the stantool.kit from [1]. Alternatively, you can directly download http://pascal.scheffers.net/stan/stan/stan-0.9.tar.gz


$ tclkit stantool.kit listThis will show all packages (supported by your platform!)Installing:
# tclkit stantool.kit install -libdir /usr/lib zlibWill install zlib in /usr/lib/zlib-1.1Getting some help:
$ tclkit stantool.kitIf you use stantool outside tclkit, you will not have zlib available (Trf and the others are not supported yet). On unix platforms, this is not a big deal, as stan will try to use gzip, bzip2 and unzip. On windows you should really make your first stan command:
c:\>tclsh stantool.tcl.txt install -libdir c:\tcl\lib zlibOtherwise most packages will fail to install.
Using auto-fetchMy original plan was to have have an overloaded package require, which turned out to be a package unknown handler. That code works rather well. What you can do with stan is build a very basic .kit file, with just stan and the other pure tcl extensions you need, and use stan to auto fetch the binary packges:What you do is this:
package require stan stan archive append http://my.server/myStanAnd stan will download and install foobin for the users platform (if available, obviously) on first load. The package will be installed in ~/.stan/foobin-0.0/ (or the windows documents and settings equivalent). ~/.stan is added to the ::auto_path by [package require stan], so the next run will just use the installed package. For console applications, I think it may be undesirable for stan to interact with the user by default, but for Tk apps, stan should probably pop-up some dialogs, maybe even with options to make it a system wide install.If you do it like this, your users should not even need to choose their platform on the download page (well, unless you make a kit.exe, obviously...)Shortly after writing the package unknown handler I realised that stantool would be an even better idea.stan autofetch 1 package require qPureTcl package require foobin
SEH -- Aha, you have read my mind in the matter of the overloading of package require. One of the reasons I have been working on virtual filesystem was to give a prospecitve enhanced package require utility maximal transport options; now you've gone and written it for me.May I thus suggest that you make it possible for STAN to search for package archives in a local directory; then a virtual directory can be specified, which could have ftp, http, BitTorrent or whatever is next to come down the pike as its transport basis.a collate/broadcast virtual filesystem could also be used to collate multiple archive locations into what appears to STAN as a single master archive, without the need for adding complexity to the STAN codebase itself.Also, the stability and cross-platform excellence of Tcl could be leveraged to make STAN a general distribution and installation tool for any kind of file sets, not just Tcl packages. STAN combined with an array of virtual filesystems could become apt-get on steroids: cross-platform, easy to use and deploy, with multiple network transport options and version control.
LV Great step forward! Question 1: when I do a stantool.kit list on my machine, I see two copies of vfs listed; however, there is no obvious difference between the two (the versions are the same). Also, it would really be helpful if the name column was as close to the commonly used name as possible - I see something listed as "soap" and "vfs" - are these really tclsoap and tclvfs? Question 2: is work proceeding to get cantcl and stan working better together? Question 3: does stan currently support the tcl module tip?PS these are probably slightly inaccurate names from cantcl. Only the first four packges are mine, the rest are cantcl! And only by seeing the stan output, I saw my dict an zlib is also amis. vfs is actually tclvfs and soap I don't know. I don't know why you see two copies of vfs, but the display of that package list is very rudementary and doesn't do anything fancy, like lsort... On my way home I though of another deficiency - the tclkit version doesn't know the lib-path of the ordinary tclsh installed and therefore also does not know which packages it has installed. This is just the start, I hope. A GUI is one if the other things I have on my shopping list.I have not talked to Steve C about cantcl, but I see stan and cantcl as highly complementary - so I'd like them to work together as well as possible. Q3: You mean TIP#55? Yes. A work in progress. Try installing 'la', from cantcl.
Sarnold adds on 24 June 2006 : would Stan and Cantcl be included as plugins into Tcl-Pkg, which provides a GUI to list packages ? Right now, Tcl-Pkg offers basic downloads of tarballs and starkits, and it does nothing else when the files are on the disk. With these plugins, the user would be able to install them from Stan and Cantcl repositories...
jmn On my platform; FreeBSD, I just see:
Available packages: Name Version Installed Titlewith no indication that it's either found none, or still searching.. I assume that's just because there's nothing for this platform, but in the general case of searches with no results, is there a more satisfying "not found" type response?Also - have you considered implementing some sort of license filter? For me it's an important consideration when browsing for software, and it's a pain to have to download & install/extract a package to see how it's licensed.ps 1. Odd, it should at least list the pure tcl packages. I'll check; can you post an [array get ::tcl_platform] for me? 2. No - good point. Cantcl has license info, my packages do not - I'll add the info. STAN itself is licensed under the same license as Tcl.
%tclkit %array get ::tcl_platform osVersion 5.2.1-RELEASE byteOrder littleEndian machine i386 platform unix os FreeBSD user julz wordSize 4 % set tcl_patchLevel 8.4.6I get the same behaviour running under tclsh.PS It is probably in the http::geturl that it goes wrong. I have limited error checking there, as yet. Are you behind a web proxy? Try doing stantool list -debug.jmn stantool -debug hangs at "debug Getting packages list from http://pascal.scheffers.net/stan


LV Is stan set up to perform updates on itself as needed? PS 15Sept04: I have that very high on my wishlist, but it does not do it yet. However [stantool install stan] will always install the latest version.
LV Well
stantool install stanmight be helpful - except this is what I get when I try:
$ stantool.kit install stan can't read "p(autoproxy 1.1.maintainer)": no such element in array while executing "lappend pkginfo maintainer $p($name $v.maintainer)" (procedure "parsePackages" line 127) invoked from within "parsePackages $packages" (procedure "fetch" line 24) invoked from within "fetch $package $version $exact" (procedure "stan::install" line 5) invoked from within "stan::install stan {} {} 0 0" ("eval" body line 1) invoked from within "eval [list stan::$command] $args" (procedure "stan" line 3) invoked from within "stan install $package $libdir $version $exact $force" ("install" arm line 18) invoked from within "switch [string tolower [lindex $argv 0]] { install { set force [scan_opt -force] set libdir [scan_opt_value -libdir] switc..." (file "/volws/lwv28/ldatae/bin/stantool.kit/lib/app-stantool/stantool.tcl" line 127) invoked from within "source /volws/lwv28/ldatae/bin/stantool.kit/lib/app-stantool/stantool.tcl" ("package ifneeded" script) invoked from within "package require app-stantool" (file "/volws/lwv28/ldatae/bin/stantool.kit/main.tcl" line 4) invoked from within "source /volws/lwv28/ldatae/bin/stantool.kit/main.tcl" ("uplevel" body line 1) invoked from within "uplevel [list source [file join $self main.tcl]]"RLH How are packages verified? I think CPAN uses an MD5 checksum or some such.
Category Application | Category Deployment | Category Repository