sdx

https://equi4.com/images/sdx.gif SDX, short for Starkit Developer eXtension, is an application designed to interact with starkits, (previously called scripted documents).

repository
https://github.com/patthoyts/tclkit (formerly code.google.com/p/tclkit/)
newer patches
https://chiselapp.com/user/aspect/repository/sdx/index
download
https://chiselapp.com/user/aspect/repository/sdx/ (below "Attachments" at the bottom of the page)

See Also

Starpack
previously called Custom Tclkit.

Description

SDX is frequently named sdx.kit on systems where extensions are used to create mappings between files and their interpreters.

The combination of tclkit and starkits is a very powerful one.

Using SDX with any Tclsh

  1. Make sure these prerequisites are available to Tcl: Metakit and tclvfs.
  2. Obtain the kitgen source.
  3. Add path to kitgen sources/8.x/tclvfs to TCLLIBPATH.
  4. tclsh <path to tclkit source>/sdx/main.tcl <sdx command> ...

Main SDX subcommands available for use (see home page for more info)

(Note that online help is available as sdx help and sdx help cmd where cmd is the sdx command you want to know about.)

sdx fetch
Fetches a file from an HTTP or FTP server (try "sdx fetch https://wiki.tcl-lang.org/4.html ").
sdx lsk yourstarkit
Lists the contents of a starkit.
sdx qwrap yourscript.tcl
A shortcut for "sdx wrap", creating a runnable compressed starkit from a single Tcl script (avoids having to do "mkdir myapp.vfs/bin/main.tcl" etc, manually).
sdx tgz2kit
Converts a tar/gz archive to a starkit VFS.
sdx unwrap yourstarkit
Extracts the contents of a starkit into a file system. Creates a directory with the name [file root starkit].vfs The directory must not already exist.
sdx update
A new way to update starkits, based on starsync.
sdx version
Calculates "version ID" of a starkit, and report GMT date of newest file inside.
sdx wrap skname
Takes the contents of the directory skname.vfs and and creates a starkit with the name skname from it. Be sure to use the -writable flag if you want your starkit to be writable! By default starkits are read-only. Add the -runtime tclkit flag to create a starpack instead of a normal starkit.
sdx addtoc
Adds a "TOC" to a dir-tree, containing a full MD5 file index
sdx eval
Evaluates one Tcl command from the command line.
sdx ftpd
Simple FTP server.
sdx httpd
Simple HTTPD server.
sdx httpdist
Fetches/uploads updates using the HTTPSYNC protocol.
sdx ls
A very simple Unix-like "ls" command in pure Tcl.
sdx md5sum
Calculates and print the MD5 message digest of files.
sdx mkinfo
Metakit file structure display.
sdx mkshow
Metakit raw datafile dump/view utility.
sdx ratarx
Reverses actions of a "tar x" command.
sdx rexecd
An rexec-compatible remote Tcl command server.
sdx starsync
Starsync CGI server.
sdx sync
Synchronizes two directory trees (either can use any type of VFS).
sdx treetime
Adjusts modtimes in dir trees to match most recent file inside.
sdx mkpack
Removes free space from Metakit file, starkit, or starpack.
sdx mksplit
Splits starkits or starpacks into head and tail files.

(crc16, pkgIndex, and tree were erroneously listed in an older version of sdx - if your sdx (or sdx.kit) still lists them, then you should download the latest version.)

SDX Bug Fixes and Enhancements

AMG: I don't see any new development going on with SDX, and the latest version I've found is 20110317. I needed several bugs fixed, so I had no choice but to take care of them myself. They're hosted here on the Wiki (these are the patches included in the fossil repository mentioned above)

SDX Enhancements

SDX-related Questions and Topics

SDX under Windows and SDX under MacOS

Discussion

Did you know that Wikit is included in sdx? Try this:

  $ tclkit sdx help

In the Konsole type

  wm deiconify .
  package require Wikit
  Wikit::init ../../doc/sdx.tkd

and you will see a rather incomplete Starkit Developer eXtensions wiki. You might want to use the search feature to see all wiki pages.

Does anyone know the reason for including Wikit and sdx.tkd?


[Does anyone have wiki pages or web URLs of actual examples of using sdx.kit ?? Particularly the various servers, etc.]


How does sdx update know about our http-Proxy-Server?

from PT 2003-08-19: sdx uses the autoproxy package from this wiki. Under unix (or windows) you can set the http_proxy environment variable to the URL of your proxy server (eg: export http_proxy='http://wwwproxy:8080 '). Under Windows the package looks into the registry and uses the Internet Explorer settings to find the proxy information.

The package needs enhancement to cope with authenticating proxies - but basically this will involve setting http_proxy_user and http_proxy_pass. With some way needed to get the password from the user if it isn't available in the environment.


RP How does one write a Starkit application to handle resources, like those supported in the command option? I have found it hard to name the application so that I could refer to it in my ~/.Xresources file. Even tk appname doesn't seems to work.


RLH: This is a request for enhancement. Currently changing the icon of the bundled application is very tedious. You have to make sure your .ico has 4 or 5 different sizes (etc.). On the Perl/Tk side using "pp" there is just and --icon, -i switch. I would like to be able to pass a switch to sdx that would do the same, without worrying about sizes etc. I don't know if this is possible but doing something like ( sdx.kit wrap app.exe -runtime c:\tcl\bin\tclkit.exe -icon app.ico ) would be very nice. Just a wish. :-)


CLN: I honestly haven't tried this yet but it occurs to me that SDX doesn't play well with CVS. I'd like to have the source for my application stored in CVS. That puts lots of pesky CVS directories in every level of my tree. And sdx wrap is going to try to grab those CVS directories and add them to the kit, right? It'd be nice if sdx had an --exclude option like tar does so you could exclude certain files or directories in your tree from the resulting kit. Any thoughts on how to use sdx and CVS together?

EMJ: When testing/playing, I just put up with the bigger starkit containing the CVS directories, when I want a "proper" release I do an export from CVS in a temporary directory and create the kit there.

jcw 2006-03-24 - Actually, SDX has always been special-cased to skip the CVS dirs (the "sync" code internally has the "exclude" logic you describe, though not exposed at the "sdx wrap" command level). Just try it!

RFox 2006-03-26: Usually what I do, since I also have tests that I don't want to package up is use a Makefile to build the starkit. When I do this I build the directory hierarchy for the starkit in the makefile and then wrap it in the makefile. I've even done one with targets to fetch sdx and the run-times as needed from equi4 using wget.''


Coming soon - some more extensions

sdx create
creates a Starkit VFS hierarchy from specified source file (a bit like sdx qwrap + sdx unwrap)
sdx fill
fill the .vfs/lib directory with dependent packages

For more details see sdx extensions for more details


Over on http://groups.google.com/group/starkit/ , Goodwin GJL writes:

I've got a starpacked sdx including TclPro's tclcompiler which I've put up for anyone to try out. Its here: http://www.bioengineering-research.com/vtk/sdx.exe

Putting sdx.exe into your path somewhere, you can call at the command line:

sdx wrap myapp -runtime tclkit.exe -compile

to create a wrapped, bytecoded application.

This sdx is compiled against Tcl 8.4.14 and Metakit 2.4.9.6; its Windows only too...

Any feedback is welcome. Thanks,

Goodwin


LV What is the state of tclkit/starkit/starpack/sdx in 2009?

The reason I ask is that when I attempt to use sdx.kit's update command to update a file, all I get is an http 404 error due to the old site no longer existing. When I look at the sdx home page, then follow the link to the failure forum, I see a message that indicates that that functionality is no longer supported on the server side.

Is sdx itself still being maintained? What about tclkit?


MHo 2010-07-25: Downloaded the latest SDX (changelog: 2010-03-10 Pat Thoyts <[email protected]>) one or two weeks ago from somewhere (didn't found the download location again today...), and today I noticed the following: Icons in Tcl 8.4.19-starpacks didn't get replaced anymore, so I had to "downgrade" to the latest "official" SDX ("signed" 2008-02-24 jcw ). Icons: a never ending story...


MHo if someone is interested, I've created a sdx.exe.


Look into ezsdx - a small frontend for sdx

Zipguy 2013-12-30 You might also like to look at ezsdx - a small frontend for sdx which offers a few interesting features.:). It is Windows only, and is at v0.98b (and up). It does try to prevent people, who may be ignorant, from doing stupid things. It can:

  • Run xxx.tcl programs
  • QWrap/Unwrap xxx.tcl programs
  • Makes it easy to re-generate your xxx.kit file
  • Can even make xxx.exe

Also, it has extensive screenshots to explain how to go all the way, from a xxx.tcl, to a xxx.kit, to an xxx.exe.