Thanks for the tip, that's sorted the problem! I've now put this together into a single handler that returns both the program path and the application name:
on getProgPath @thePath, @theFileName
set the itemDelimiter to "."
put (the platform is "MacOS" and item 1 of the systemVersion >= 10) into itsOSX
put the filename of this stack into thePath
set itemDelimiter to "/"
if "Mac" is in the platform and itsOSX and \
the environment is not "development" then
delete item -3 to -1 of thePath
end if
put last item of thePath into theFileName
delete last item of thePath
put "/" after thePath
end getProgPath
Just in case anyone else has the same problem and wants a "potted" solution!
I'm using Rev 2.1.2 under Mac OS X 10.3.2 to build an app. If I run the app inside the development environment, or as a standalone Classic app, then it works fine. However, if I run the OS X app built at the same time, then it fails to locate the support folder and files in the same folder as the app.
Hi Peter,
Welcome to the wonderful world of Mac OS X application bundles.
Control click on your OS X stabdalone + select "Package Contents" reveals a folder, "Contents"
Inside "Contents" are: Info.plist pbdevelopment.plist Pkginfo A folder, "Resources", containing-- Revolution.rsrc RevolutionDoc.icns Revolution.icons A folder, "Mac OS", containing-- Revolution [your standalone]
So if your standalone on other platforms expects to find the support folder in the same folder in which the standalone resides, your folder must be in the Mac OS folder on OS X.
I deal with this by using a generalized search handler that looks for support folders in both locations...among others.
--
Rob Cozens
-- Peter Reid Reid-IT Limited, Loughborough, Leics., UK Tel: +44 (0)1509 268843 Fax: +44 (0)8700 527576 E-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] Web: http://www.reidit.co.uk http://www.reidit.demon.co.uk _______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
