OpenSource game need a MacOs porter...

schnarr
Unregistered
 
Post: #16
Malarkey Wrote:Yeah, I had already done that and it still couldn't find the image files. Then I figured out that double-clicking on them from the Finder apparently changes where the current directory is but running them from the command line works.

while technically, you should probably move the media into the Resources part of the Application bundle and search it using bundle functions, you could tuck something like this into the application somewhere early (like in the init code) as a quick and dirty workaround.

CFBundleRef appMainBundle = CFBundleGetMainBundle();
CFURLRef urlRef = CFBundleCopyBundleURL(appMainBundle);
CFStringRef ref = CFURLCopyFileSystemPath(urlRef, kCFURLPOSIXPathStyle);
chdir (CFStringGetCStringPtr(ref, kCFStringEncodingMacRoman));
chdir ("../");

It's not pretty, but it works. I often use that during the initial stages of porting an app
Quote this message in a reply
m3xican
Unregistered
 
Post: #17
Hi, our work is going on, the next release (0.1.0) is near, this is a screenshot of the current CVS version:

[Image: a_cvs3.png]

I hope that someone will be attracted by this and give us an hand, we are still looking for a Mac porter/packager Smile
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Xcode 4 SDL/OpenGL MacOS -> iOS Recompilation SparkyNZ 4 7,811 Apr 4, 2011 01:33 PM
Last Post: SparkyNZ
  JEDI-SDL, MacOS X and XCode Tutorial savage 5 10,075 Jun 7, 2007 04:01 AM
Last Post: savage