Am Freitag, 28. Dezember 2007 16:24:03 schrieb Ariston Johnson: > On Dec 28, 2007 8:53 AM, Ariston Johnson <[EMAIL PROTECTED]> wrote: > > On Dec 27, 2007 6:22 PM, Dennis Schridde <[EMAIL PROTECTED]> wrote: > > > Am Freitag, 28. Dezember 2007 00:54:26 schrieb Ariston Johnson: > > > > On the Mac version, the data directory gets stuffed into the > > > > application bundle. For Release builds, I would like to change this > > > > to just have warzone.wz and mp.wz, but it doesn't seem to find these > > > > files when I put them in the data directory that Warzone would > > > > otherwise be finding. Where exactly does it look for these files? > > > > If someone can help point me to getting this to work, I can add it to > > > > the automated process in the Xcode project. Thanks. > > > > > > main.c:scanDataDirs() adds various directories to the physfs searchpath > > > and then tries to find "gamedesc.lev". If it can't be found, it tries > > > the next path, till it finds it. Or, when everything fails, it falls > > > back to the definition of DATADIR. > > > > Here's the thing. On the Mac version, an application bundle is > > created. The data gets put into the Resources part of the bundle in > > its own subdirectory named "data", and a Mac OS X function is called > > to find out that path at runtime. Say that you have the application > > bundle in /Applications, then the data is at: > > > > /Applications/Warzone.app/Contents/Resources/data/gamedesc.lev > > > > That works just fine. The game can find gamedesc.lev and the other > > data because of the code that I wrote many months ago to allow it to > > do so, and it doesn't matter where you put the application bundle on > > disk. > > > > What does not work is putting the data into warzone.wz and mp.wz. If > > you build those files using the commands in trunk/data/Makefile.raw, > > and then put them at > > > > /Applications/Warzone.app/Contents/Resources/data/warzone.wz and > > /Applications/Warzone.app/Contents/Resources/data/mp.wz > > > > ...then it cannot find gamedesc.lev. > > I have tracked this down to PhysFS not knowing about the .wz archive > format. Maybe we should check for PhysFS errors and print them out at > some point. The error code here is ERR_UNSUPPORTED_ARCHIVE. > > I'll try to figure out why the Mac version isn't getting the .wz > archive format put into PhysFS's table. .wz is plain zip... Maybe you compiled your PhysFS library without zip support? Or without having zlib installed while asking it to use the system zlib? --Dennis
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev