Re: Re: can a starkit create starkits?

Pat Thoyts <[email protected]> Sat, 7 Aug 2010 15:06:55 +0100
Newsgroups gmane.comp.lang.tcl.starkit
Message-ID <[email protected]>
On 7 August 2010 14:18, jemptymethod <[email protected]> wrote:
> Thanks for the guidance/suggestions. =A0To begin with I have decided to
> embed both a cli and gui tclkit within my starkit, but then I cannot
> "exec" the following command for creating a starkit:
>
> C:/opt/deskwideweb/platform/DeskMLKit/dexygen.vfs/dxapp/bin/tclkit-cli
> C:/opt/deskwideweb/platform/DeskMLKit/dexygen.vfs/dxapp/bin/sdx.kit
> wrap appname.exe -runtime C:/opt/deskwideweb/platform/DeskMLKit/
> dexygen.vfs/dxapp/bin/tclkit-gui
>
> The above command will however run from:
>
> a) shell prompt
> b) using exec in a tcl script with my customary tcl interpreter,
> i.e.: /usr/bin/tclsh (on cygwin)
>
> Any ideas why the command won't run from within the starkit itself?
> I've tried trapping/logging stderr/stdout as follows but it generates
> an empty zero-byte sized file:
>
> exec $cmd >& [file join $root_home log exec.log]
>
Of course not. Think about what happens when you exec an application.
The operating system locates file executable image in the filesystem,
maps it into memory and creates various process memory structures and
begins executing at some entry point. The operating system has no
knowledge of Tcl's virtual filesystems so it cannot possibly map the
executable from within such a system. You have to copy the image file
out onto the native filesystem first before you can expect any native
access methods to see it. eg:
file copy vfs/file $env(TEMP)/tempfilename
exec $env(TEMP)/tempfilename

Likewise, if your application expects to read a file it cannot be
expected to understand the tcl vfs and again you need to copy the data
out onto the native filesystem first. Only Tcl applciations using the
vfs package will be able to read vfs data.

--=20
You received this message because you are subscribed to the "starkit" group=
.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to starkit-unsubscribe@googlegro=
ups.com
For more options, visit this group at http://groups.google.com/group/starki=
t?hl=3Den