On Mar 16, 2006, at 6:50 PM, Garth Hjelte wrote:
At 04:19 PM 3/16/2006 -0500, you wrote:
> Thanks - related question. What about Debug mode? Is this always
> necessary then?
>
> #if DebugBuild
> Soft Declare Sub Foo Lib "FooLib.dylib" ()
> #else
> Soft Declare Sub Foo Lib
> "@executable_path/../Frameworks/FooLib.dylib" ()
> #endif
With soft declares, perhaps not. You might try the following. Put
FooLib in the same folder as the project. Then in the App.Open event
handler, copy FooLib into the debug app bundle. And let me know if it
works.
Sounds pretty hacky.
The real question to me would be: how does REALBasic regard
"FooLib.dylib" as where it is? The docs are sketchy, it just says "if
it is on your system." What does that mean? On Windows you have a set
way of doing this: same folder, system folder, environment path.
My solution actually is
#if DebugBuild
Soft Declare Sub Foo Lib "@executable_path/../../../FooLib.dylib" ()
#else
Soft Declare Sub Foo Lib
"@executable_path/../Frameworks/FooLib.dylib" ()
#endif
And make sure I have all my dylib(s) in the same folder as my .rbp
file.
Because the IDE provides no support for adding items to a bundle at
build time, any solution is a hack. I'm sure you'll find one that you
like.
--------------
Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>