Getting a Mac App Resources folder
BlitzMax Forums/BlitzMax Programming/Getting a Mac App Resources folder
| ||
Hi all, Still trying to get my head around mac. I have all my resources stored in App.app/Content/Resources/ and I'm using this to get that folder location: AppResources:String=AppDir+"/"+StripDir(AppFile)+".app"+"/Contents/Resources/" Only problem is that if someone renames the folder, then AppFile still returns the old app name and hence the path is invalid. I've looked at bah.volumes but I can't see a way to get this path using that module. Thanks for any help |
| ||
With something like this : http://stackoverflow.com/questions/19889162/resources-folder-path-in-cocoa-app Interestingly, appstub does something similar to determine whether the app is a gui app or not, and then throws away the results ;-) |
| ||
Function getAppPath:String() ?macos Local appName:String = ExtractDir(AppFile) Return appName + "/../Resources/data/" ?win32 Return "data/" ? End Function |
| ||
@GfK Thanks, I was being really dumb with that one :) |