OSX and PhysFS

Eric Wing ewing2121 at yahoo.com
Tue Dec 17 03:58:52 EST 2002

Hello Ryan (and other PhysFS maintainers),

If you're interested, I have built a PhysFS Framework
and ProjectBuilder project for OSX (based on how other
SDL frameworks were made). Would you like me to send
them to you? (BTW, did you receive my ogg patch for

Also, I thought I should alert you to an OS X
idiosyncrasy you may want to address. The Unix stuff
works great for PhysFS. (I couldn't actually get any
of the MacClassic stuff to compile in OSX.) However,
the Unix stuff might work a little to well...

For Unix style built programs, PhysFS is perfectly
fine. However, if you build a project via
ProjectBuilder style, the executables that get created
are a little strange which has a consequence to what
PhysFS computes as the base directory.

If I try building a program called "MyTest" in Project
Builder, it creates a Mac style execuatable called
"MyTest.app". However, to Unix, this MyTest.app looks
like a directory structure with a bunch of files and
subdirectories (and are completely hidden by Finder).
I think this is related to Resource Forks which I
don't completely understand. 

So to the Mac GUI, I have a single program with the
listing of:

However, to Unix, MyTest.app is a directory with a
bunch of information and the Unix executable buried
    MyTest*  <-- This is the Unix executable

If I launch this program (MyTest.app) from the GUI
interface (desktop/Finder/dock), OSX seems to pass the
Unix path:


to argv[0], so PhysFS translates:

instead of:

 into the Base Directory.

However, this is inconvenient because the base
directory should be MyTest.app because you can't
actually put data files inside because OSX tries to
hide the fact that it is a directory. So if I have
config files, or game files, or data, PhysFS won't let
me see them because the base directory is 2 levels too

You also cannot double-click on the
Content/MacOS/MyTest if you tried moving it via Unix
so it was visable. The whole structure needs to be

Perhaps you guys have a good solution to this issue?


Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.

More information about the physfs mailing list