Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

You will remember something that you should not have forgotten.


comp / comp.lang.tcl / Re: adding packages to tclexecomp

SubjectAuthor
* adding packages to tclexecompLuc
`* Re: adding packages to tclexecompMichael Niehren
 +- Re: adding packages to tclexecompLuc
 `* Re: adding packages to tclexecompLuc
  `* Re: adding packages to tclexecompMichael Niehren
   `- Re: adding packages to tclexecompLuc

1
Subject: adding packages to tclexecomp
From: Luc
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Tue, 17 Dec 2024 21:56 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: luc@sep.invalid (Luc)
Newsgroups: comp.lang.tcl
Subject: adding packages to tclexecomp
Date: Tue, 17 Dec 2024 18:56:50 -0300
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <20241217185650.7d6b0f1e@lud1.home>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 17 Dec 2024 22:56:51 +0100 (CET)
Injection-Info: dont-email.me; posting-host="6c94c4def76a6a71d427c014c5945b3e";
logging-data="2036033"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19htIxXBuCrinm76UPxrh2H15D1TjxPxWk="
Cancel-Lock: sha1:bKVjZPi0IWiQfoMp/uolmUNqRFI=
View all headers

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.

--
Luc
>>

Subject: Re: adding packages to tclexecomp
From: Michael Niehren
Newsgroups: comp.lang.tcl
Organization: www.abavia.com
Date: Wed, 18 Dec 2024 08:50 UTC
References: 1
From: michael@niehren.de (Michael Niehren)
Subject: Re: adding packages to tclexecomp
Newsgroups: comp.lang.tcl
Reply-To: michael@niehren.de
Date: Wed, 18 Dec 2024 09:50:11 +0100
References: <20241217185650.7d6b0f1e@lud1.home>
User-Agent: KNode/0.10.9
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
Message-ID: <nnd$3e80b995$10169320@f4f62a201d13ca32>
Organization: www.abavia.com
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!nntp.terraraq.uk!paurom.no!npeer.as286.net!npeer-ng0.as286.net!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe007.abavia.com!abp002.abavia.com!reseller!not-for-mail
Lines: 22
Injection-Date: Wed, 18 Dec 2024 09:50:11 +0100
Injection-Info: reseller; mail-complaints-to="abuse@abavia.com"
X-Received-Bytes: 1653
View all headers

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.

> 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.
>

Subject: Re: adding packages to tclexecomp
From: Luc
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Wed, 18 Dec 2024 16:24 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: luc@sep.invalid (Luc)
Newsgroups: comp.lang.tcl
Subject: Re: adding packages to tclexecomp
Date: Wed, 18 Dec 2024 13:24:50 -0300
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <20241218132450.11f72061@lud1.home>
References: <20241217185650.7d6b0f1e@lud1.home>
<nnd$3e80b995$10169320@f4f62a201d13ca32>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 18 Dec 2024 17:24:51 +0100 (CET)
Injection-Info: dont-email.me; posting-host="5390254de2522f2e642fc8e31fcf8a0e";
logging-data="2498126"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+pDpH7oaPP6HyjG45/OHR+kLD0iLqmj+M="
Cancel-Lock: sha1:+H/dlPr9Z60Cnj50t9BIjGiyx6M=
View all headers

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.
**************************

Hi, Michael. That's excellent. Thank you.

Pray tell, is there something I can add to my script to determine
whether it's being run by/in tclexecomp or not, so it can fail gracefully
if the condition is not met? Anything I can test against?

--
Luc
>>

Subject: Re: adding packages to tclexecomp
From: Luc
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Wed, 18 Dec 2024 18:45 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: luc@sep.invalid (Luc)
Newsgroups: comp.lang.tcl
Subject: Re: adding packages to tclexecomp
Date: Wed, 18 Dec 2024 15:45:45 -0300
Organization: A noiseless patient Spider
Lines: 68
Message-ID: <20241218154545.3c234d70@lud1.home>
References: <20241217185650.7d6b0f1e@lud1.home>
<nnd$3e80b995$10169320@f4f62a201d13ca32>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 18 Dec 2024 19:45:46 +0100 (CET)
Injection-Info: dont-email.me; posting-host="5390254de2522f2e642fc8e31fcf8a0e";
logging-data="2546434"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Ysrlj6HKW1OCpoPvVttajq11AERBgiKg="
Cancel-Lock: sha1:RFNHhgWf4nkOoOC1yCz0vvS1/tY=
View all headers

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
>>

Subject: Re: adding packages to tclexecomp
From: Michael Niehren
Newsgroups: comp.lang.tcl
Organization: www.abavia.com
Date: Wed, 18 Dec 2024 18:54 UTC
References: 1 2 3
From: michael@niehren.de (Michael Niehren)
Subject: Re: adding packages to tclexecomp
Newsgroups: comp.lang.tcl
Reply-To: michael@niehren.de
Date: Wed, 18 Dec 2024 19:54:22 +0100
References: <20241217185650.7d6b0f1e@lud1.home> <nnd$3e80b995$10169320@f4f62a201d13ca32> <20241218154545.3c234d70@lud1.home>
User-Agent: KNode/0.10.9
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
Message-ID: <nnd$43a58609$499b723a@7f3bf854c578bf40>
Organization: www.abavia.com
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe006.abavia.com!abp002.abavia.com!reseller!not-for-mail
Lines: 73
Injection-Date: Wed, 18 Dec 2024 19:54:22 +0100
Injection-Info: reseller; mail-complaints-to="abuse@abavia.com"
X-Received-Bytes: 2963
View all headers

Hi Luc,

your find everything you wrapped unter the directoroy /cvfs/wrap,
so your p2.tcl should be there.

> 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?
>

Subject: Re: adding packages to tclexecomp
From: Luc
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Thu, 19 Dec 2024 01:59 UTC
References: 1 2 3 4
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: luc@sep.invalid (Luc)
Newsgroups: comp.lang.tcl
Subject: Re: adding packages to tclexecomp
Date: Wed, 18 Dec 2024 22:59:14 -0300
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <20241218225914.7cea458c@lud1.home>
References: <20241217185650.7d6b0f1e@lud1.home>
<nnd$3e80b995$10169320@f4f62a201d13ca32>
<20241218154545.3c234d70@lud1.home>
<nnd$43a58609$499b723a@7f3bf854c578bf40>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 19 Dec 2024 02:59:15 +0100 (CET)
Injection-Info: dont-email.me; posting-host="0fa468634136ef331ec86a8351b82b64";
logging-data="2694910"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1839O4ftKlYDilVNaETNocxHTOzN6l8d2M="
Cancel-Lock: sha1:gUH2zXCvkmRwLFfunXEH7sPVazg=
View all headers

On Wed, 18 Dec 2024 19:54:22 +0100, Michael Niehren wrote:

>Hi Luc,
>
>your find everything you wrapped unter the directoroy /cvfs/wrap,
>so your p2.tcl should be there.
>
**************************

Well, geeze, I should have seen that. It's working now. Thank you.

--
Luc
>>

1

rocksolid light 0.9.8
clearnet tor