Externals [was: How to place revVideograbber bundle inside of the app bundle? ]

Alex Rice alrice at ARCplanning.com
Mon Aug 11 09:38:00 EDT 2003


OK Malte and Brian: You think you have it all figured out? ;-)  Explain 
this one to me. I'm still scratching my head. But it works and it's how 
I'm doing it in my app.

1) Create a stack with a substack
2) Set the externals property of the substack to "revxml.bundle" -- no 
path, just the bundle name
3) Put this script in the preOpenStack handler

put the fileName of this stack into tFileName
set the itemDelimiter to "/"
get item 1 to -2 of tFileName
set the defaultFolder to it
-- this changes it from .../My.app to .../My.app/Contents/MacOS

4) On the substack's card, make some kind of hello world revxml test & 
verify it works.
5) Build the distribution as standalone, but do not select XML
6) Copy revxml.bundle into the Contents/MacOS subfolder of the app 
(same folder as the executable itself)
7) Run and Test. In my test, revxml works!

Anyone know why? For some reason this combination of a substack using 
the external, and changing the defaultFolder, enables one to use the a 
bundle within the application bundle without having to hardcode it's 
path into the externals property. A good side effect is that you can 
rename My.app to Whatever.app and it'll still work.

Alex Rice, Software Developer
Architectural Research Consultants, Inc.
http://ARCplanning.com




More information about the use-livecode mailing list