Standalone built sucessfully but uncomplete: known 2.5 bug?

Rob Cozens rcozens at pon.net
Tue Nov 23 11:25:58 EST 2004


>All your libraries are there...it's just that your standalone 
>doesn't know how to find them in the components of a Mac OS 
>application bundle.

Here's the handler that SDB Utilities uses to find Serendipity 
Library.  The Library can reside in:

* the same folder as the standalone
* in a folder, "PlugIns" in the folder containing the standalone
* in the specialFolderPath, "Documents" on Windows
* in the same folder as the Mac OS X application bundle
* in the MAC OS folder inside the Mac OS X application bundle

on startLibrary libraryName
   set the itemDelimiter to "/"
   put the effective fileName of this stack into libraryPath
   put libraryName into item -1 of libraryPath
   if there is a stack libraryPath then
     start using stack libraryPath
     return empty
   end if
   put "PlugIns" into item -1 of libraryPath
   put "/"&libraryName after libraryPath
   if there is a stack libraryPath then
     start using stack libraryPath
     return empty
   end if
   switch (the platform)
   case "Win32"
     get specialFolderPath("Documents")&"/"&libraryName
     if there is a stack it then
       start using stack it
       return empty
     end if
     break
   case "MacOS"
     if char 1 of the systemVersion < 7 then
       delete item -5 to -3 of libraryPath
       if there is a stack libraryPath then
         start using stack libraryPath
         return empty
       end if
       delete item -2 of libraryPath
       if there is a stack libraryPath then
         start using stack libraryPath
         return empty
       end if
     end if
     break
   end switch
   return true -- = error
end startLibrary


-- 
Rob Cozens

"The way to destroy the power of the Corporate State
   is to live differently now."

  -- Charles Reich, The Greening of America


More information about the use-livecode mailing list