revZip and rev 2.8 gm-3
J. Landman Gay
jacque at hyperactivesw.com
Thu Feb 22 14:02:08 EST 2007
Chris Sheffield wrote:
> I'm having a problem that I'm wondering if anyone else has experienced.
> This is OS X, btw.
>
> I have an application that makes use of the revZip library. I have the
> standalone builder settings set to search for required inclusions. The
> first problem is that the revZip bundle does not get copied to my
> standalone, which I believe is a long outstanding bug, which I thought
> was supposed to have been fixed with 2.8. The second problem is that,
> even if I manually copy the revZip.bundle into my standalone package,
> the standalone errors when making a call to a revZip function. In other
> words, it's not finding the bundle. I have it copied to the Externals
> folder within the app bundle. I have also tried explicitly setting the
> externals of my stack, but I can't seem to get the path quite right to
> this Externals folder. The only way I've been able to get it to work
> without errors is to simply set the externals to "revzip.bundle" and
> then place the bundle directly next to my app bundle, not inside it. But
> I would really like to have this app be as self-contained as possible,
> so I'd prefer to have the revzip.bundle inside my app bundle.
>
> First of all, has anyone else experienced these problems with the
> standalone builder Rev 2.8? I think I'm about ready to report them to
> runtime. And second, what should I set the path to in the externals
> property so that I can keep the revzip.bundle inside my app bundle? I
> think I'm just not getting it quite right. I'd prefer to use a relative
> path if possible. Should it be something like
> "./[AppBundleName]/Contents/MacOS/Externals/revzip.bundle"? Can anyone
> help?
I always set externals dynamically on startup. This has always worked
for me:
on startup
if the platform = "macos" then
set the externals of this stack to \
pathToBundleData() & "myExternal.bundle"
else
set the externals of this stack to \
pathToBundleData() & "myExternal.dll"
end if
end startup
function pathToBundleData
put the effective filename of this stack into tPath
set the itemDel to slash
delete last item of tPath
return tPath & "/Externals/"
end pathToBundleData
This sets the externals property to the Externals folder regardless of
whether it is inside a Mac bundle or in a folder next to the app in a
Windows standalone.
Note that the startup message is the only time you can dynamically set
externals. I've had varying success with hard-coding the paths into the
stack, which is why I started doing it this way.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list