What if I need to include a special package in a tclexecomp executable?
I mean a package I made myself, not available in the wild, and it's
still undergoing changes. Is it possible to source a file? I've been struggling with that.
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.
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.
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?
Hi Luc,
your find everything you wrapped unter the directoroy /cvfs/wrap,
so your p2.tcl should be there.
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 1,029 |
Nodes: | 10 (0 / 10) |
Uptime: | 153:43:14 |
Calls: | 13,333 |
Calls today: | 3 |
Files: | 186,574 |
D/L today: |
4,250 files (1,124M bytes) |
Messages: | 3,355,872 |