- Get Stackato
- Why a Private PaaS?
- Features & Benefits
- Stackato by Language
- Compare Editions
- Stackato & Cloud Foundry
- Developer Tools
- Professional Services
- Commercial Support
- Code Recipes
Kevin "kj" Woolley, February 14, 2006
I recently had a question that went something like this: I'm trying to wrap an .exe file in my TclApp'd application. I can test for its presence in the wrapped file, and it's there -- but for some reason, I...
I recently had a question that went something like this:
I'm trying to wrap an .exe file in my TclApp'd application. I can test for its presence in the wrapped file, and it's there -- but for some reason, I can't spawn it from Expect. Why not?
I'm not a stranger to wrapping binary files in TclApp'd applications. Indeed, one of my first blog entries discusses it. I was able to reproduce the behaviour, so I went to the ActiveTcl developers for an answer.
The answer, it seems, is so simple that it took a minute to figure out. While your TclApp'd application can look into the TclVFS filesystem that holds it, the operating system can't. This is why testing for its presence from within Tcl works like a charm, but the OS claims it can't be found.
The solution is to copy the file to a temporary directory in the regular filesystem and run it from there. Easy peasy. Worked like a charm. You should only have to do it with executables and other files that the operating system needs direct access to.