Re: tclkit, starkits, starpacks
From: Arjen Markus (arjen.markus_at_wldelft.nl)
Date: 11/29/04
- Next message: Donal K. Fellows: "Re: escaping pipe symbol and less than in [exec]"
- Previous message: Rolf Schroedter: "Re: Serial Port behavior in tcl"
- In reply to: bob decker: "tclkit, starkits, starpacks"
- Next in thread: bob decker: "Re: tclkit, starkits, starpacks"
- Reply: bob decker: "Re: tclkit, starkits, starpacks"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 29 Nov 2004 08:52:35 +0100
bob decker wrote:
>
> On Windows I have tried the following. If my main file is prog.tcl, I have
> tried
>
> tclkit.exe sdx.kit qwrap prog.tcl
>
> and then
>
> tclkit.exe sdx.kit unwrap prog.tcl
>
> to get the virtual file system, and then have tried sticking the files that
> are sourced in prog.tcl in various subdirectories under prog.vfs. I then run
> wrap, but to no avail. The resulting prog.kit (starkit) or
> prog.exe(starpack) works on the original system, but not on any others (it
> can't find the sourced files).
>
> Any suggestions? Thanks.
>
My usual way to do this is:
- put the extra source files in the lib/app... directory
- source them using:
#
# Auxiliary routines ...
#
source [file join [file dirname [info script]] "other_file.tcl"]
from the main code in the main source file (the one that gets
sourced due to the package require).
This incantation may seem complicated, but if you analyse it, you will
see it is doing the following:
- get the full name of the script that is being sourced (in this case
the package)
- that will give the directory (wherever that is, through whatever
VFS manipulations it has to emerge) that holds all the other
script files as well.
(I do not mean to be "arrogant" or "clever" - I just want to make
the process clearer, as understanding the code is better than
learning it by heart :))
Regards,
Arjen
- Next message: Donal K. Fellows: "Re: escaping pipe symbol and less than in [exec]"
- Previous message: Rolf Schroedter: "Re: Serial Port behavior in tcl"
- In reply to: bob decker: "tclkit, starkits, starpacks"
- Next in thread: bob decker: "Re: tclkit, starkits, starpacks"
- Reply: bob decker: "Re: tclkit, starkits, starpacks"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|