Sujet : Re: adding packages to tclexecomp
De : luc (at) *nospam* sep.invalid (Luc)
Groupes : comp.lang.tclDate : 18. Dec 2024, 19:45:45
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20241218154545.3c234d70@lud1.home>
References : 1 2
On Wed, 18 Dec 2024 09:50:11 +0100, Michael Niehren wrote:
you can add your own package by putting it under the wrap-directory like
described in the documentation.
>
On runtime you then have access to it over the /cvfs mountpoint. You can
also append an directory under /cvfs to the autopath variable and so it
it is possible to do an "package require yourpackage". The included modules
are handled the same way.
>
with the call of "tclexecomp -gui" you can customize the included modules.
Currently you can only delete modules. Maybe i can extend it to add
modules. So you will be able to build an customized tclexecomp with your
special package included. This way you don't have to include it on
wrapping.
>
**************************
I'm going to need more help with that. Here is my script:
$ cat p1.tcl
set packed 0
if {[info exists ::env(TCL_LIBRARY)]} {
if {$::env(TCL_LIBRARY) == "/cvfs/tcl8.6"} {set packed 1}
}
set T $::w.text
text $T -height 20 -width 100 -font {Arial 16}
pack $T -expand 1 -fill both
focus $T
if {$packed == 1} {
$T insert end "pwd is [pwd]\n\n"
foreach {k v} [array get env] {
$T insert end "$k = $v\n"
}
$T insert end "\n"
foreach {k v} [array get ::tcl_platform] {
$T insert end "$k = $v\n"
}
$T insert end "\n"
$T insert end "ls is [glob *]\n"
$T insert end "cvfs is [glob /cvfs/*]\n"
source /cvfs/p2.tcl
}
The p2.tcl just prints something.
So I put p1.tcl and p2.tcl inside wrap and ran this command:
$ ./tclexecomp64 ./wrap/p1.tcl ./wrap/* -forcewrap -w ./tclexecomp64
The resulting executable runs with an error complaining that p2.tcl
does not exist. Indeed, I can't see it in the output of glob.
% glob /cvfs/*
/cvfs/initCmds.tcl /cvfs/_tclexecomp_init.txt /cvfs/tclexecomp.tcl
/cvfs/init_modules.tcl /cvfs/modules /cvfs/tclexecomp_gui.tcl
/cvfs/tkConfig.sh /cvfs/wrap /cvfs/tcl8.6 /cvfs/tcl8 /cvfs/tk8.6
I'm surely doing something wrong as usual. Can you please advise?
-- Luc>