Home > Archive > Tcl > December 2006 > VFS exec
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| jon.keys@gmail.com 2006-12-20, 8:12 am |
| This seems to have been a bit of a hot topic for a while now, but I
haven't been able to find anything dated later than 2005 online. Does
anyone know if you can use exec or open commands on tcl vfs yet?
Specifically, I want to use a nice program like freewrap to wrap a
native executable along with some tcl script and a tcl interpreter into
a new, single executable. My hope is to wrap a native executable inside
a controlled tcl env so I can have some input before the native
executable gets called (like check for a new version online, or update
a file-based counter, or read in a config file, etc... you get the
idea). You could always copy the native executable to a temp dir and
then execute it, but that seems error prone and if you are going to do
that anyways, why not just package the executable outside of the tcl
script to begin with. I'd much rather have it nicley packaged away if
at all possible.
It looks like this functionality was in the works a few years ago, but
I haven't seen any mention of it since. If anyone know how I might
accomplish this I would love to hear your ideas.
Also, if there are other cross-platform ways of doing something similar
to this I am open for suggestions, but I think tcl / freewrap / tclkit
are best suited for this type of thing at the moment.
| |
| Michael Schlenker 2006-12-21, 4:11 am |
| jon.keys@gmail.com schrieb:
> This seems to have been a bit of a hot topic for a while now, but I
> haven't been able to find anything dated later than 2005 online. Does
> anyone know if you can use exec or open commands on tcl vfs yet?
>
> Specifically, I want to use a nice program like freewrap to wrap a
> native executable along with some tcl script and a tcl interpreter into
> a new, single executable. My hope is to wrap a native executable inside
> a controlled tcl env so I can have some input before the native
> executable gets called (like check for a new version online, or update
> a file-based counter, or read in a config file, etc... you get the
> idea). You could always copy the native executable to a temp dir and
> then execute it, but that seems error prone and if you are going to do
> that anyways, why not just package the executable outside of the tcl
> script to begin with. I'd much rather have it nicley packaged away if
> at all possible.
>
> It looks like this functionality was in the works a few years ago, but
> I haven't seen any mention of it since. If anyone know how I might
> accomplish this I would love to hear your ideas.
>
> Also, if there are other cross-platform ways of doing something similar
> to this I am open for suggestions, but I think tcl / freewrap / tclkit
> are best suited for this type of thing at the moment.
The main problem with this is cross-platform. Most loaders don't want to
start an executable from memory but want to have a nice filename. For
some platforms one could surely write a custom loader that maps an
executable into memory and runs it like the os loader does, but thats
very system specific.
Michael
|
|
|
|
|