On 12/2/10 10:27 PM, Mark Smith wrote:
The path to Notepad4 is: /mark/runrev/stacks/notepad/notepad4. I guess the
"splash" stack could be anywhere but is currently
/mark/runrev/stacks/notepad/notepad8/macosx/notepad. Since I think it is
messy to try and distribute more than 1 file/bundle I guess it would be
better if Notepad? was located in the Notepad application bundle. Launching
Notepad would then look insides its bundle to find the current version of
the notepad code/stack?
Right. It doesn't matter where your mainstack is while developing. When
you make a standalone a copy will become the standalone. In Standalone
Settings, point the Stacks pane to your notepad4 stack. When you build,
it will be placed inside the bundle, in Notepad.app/Contents/MacOS/,
which is right next to the actual executable file.
In your script, change the hard-coded path to one that calculates the
relative path. This function should work whether your notepad stack is
opened from the standalone or in the IDE:
funtion getStackPath pFileName -- i.e. "notepad4"
put the effective filename of this stack into tPath
set the itemDelimiter to slash
put pFileName into last item of tPath
return tPath
end getStackPath
While developing, you need to put your notepad4 stack into the same
folder as the mainstack that will become the standalone, since the
function looks in the same folder for the file. In the IDE, that's the
folder containing the mainstack. In an OS X standalone, it's inside the
bundle next to the standalone executable. On Windows and Linux, which
don't have bundles, it's just like in the IDE, and looks for the
notepad4 stack in the same folder with the standalone.
--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode