Re: can a starkit create starkits?
jemptymethod <[email protected]> Sat, 7 Aug 2010 07:49:31 -0700 (PDT)
| Newsgroups | gmane.comp.lang.tcl.starkit |
|---|---|
| Message-ID | <[email protected]> |
On Aug 7, 10:06=A0am, Pat Thoyts <[email protected]> wrote: > 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 Thanks for your further explanation (and patience ;) Pat, I will give copying the tclkit executables out to the native filesystem a try. I have high confidence it will work as I'm already doing likewise for the contents of the new .vfs directory I want to wrap, which is why I can refer to "wrap appname.exe" with a relative path instead of absolute: it's corresponding appname.vfs is already copied to the current working directory, which I cd to from within my script. Thanks again! Tcl, tclkit and their respective communities are awesome! --=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