[Starkit] Two questions about starpacks

Andreas Kupries andreask at ActiveState.com
Wed Apr 26 15:21:20 CEST 2006


> Hello,
>
> I'm trying to build a Starpack for my Tcl3D extension.
> It should contain the Tcl wrappers, dependent libraries as
> well as some of the demo programs.
>
> The first question is about dependent libraries:
> I have a Tcl package (ex. tcl3dSDL.dll), which contains the
> Swig generated Tcl wrapper.
> This package depends on the SDL dynamic library SDL.dll.
> Is it possible to have the latter DLL (which is not loaded
> explicitly by the load command) be included in the Starpack
> and written out to the filesystem, so that it can be found?
> Or do I have to supply theses libraries separately, and have
> the user copy them to a directory included in his PATH?

Tutorial: Building TclApps
	http://aspn.activestate.com/ASPN/docs/Tcl_Dev_Kit/3.2/README_tclapp.html
	Step Four: Wrapping Extensions and External DLLs

> The second question is about exiting a Starpack:
> For the demonstration programs I write some files to a
> temporary directory on the filesystem. Is it possible to
> install some kind of exit handler, so that if the program
> finishes (via the exit command in one of the demo programs),
> I can cleanup these temp. files (like Tclkit does with the
> temp. files, it writes out for dynamic libraries)?

rename ::exit ::_builtin_exit
proc exit {{status 0}} {
	... run exit handlers ...
	::_builtin_exit $status
}

If your demos can be killed via Ctrl-C you should also use TclX's 'signal
command' to intercept the TERM signal and run the exit handlers and exit.

http://aspn.activestate.com/ASPN/docs/ActiveTcl_/8.4/tclx/TclX.n.html


--
	Andreas Kupries <andreask at ActiveState.com>
	Developer @ http://www.ActiveState.com
	Tel: +1 778-786-1122




More information about the Starkit mailing list