Page 1 of 1

Compiling - OSX

Posted: Thu Jul 06, 2006 12:12 am
by stestagg
I've just compiled BZ 2.0.8 on Mac OSX 10.4(.7) using the xCode project file. (it's pretty easy btw. but the documentation is sparse!)

The Problem
Once I'd downloaded the SDL framework etc... It all built fine but the resulting BZFlag.app wouldn't run. The icon appeared in the dock but then died. :(

Running in the terminal gave some fonts not found error.

Resolution
To resolve it, I had to copy the contents of the {SRC_ROOT}/data folder into the compiled BZFlag.app/Contents/Resources folder. This seems to have resolved the issue (It runs and looks OK).

My Point?
For anyone else having the same problem: here's the solution.
For the maintainers/developers: can this action be included in the xcode build script?

Thanks

Stephen

Re: Compiling - OSX

Posted: Tue Jul 11, 2006 8:11 am
by Skeeve
stestagg wrote:I've just compiled BZ 2.0.8 on Mac OSX 10.4(.7) using the xCode project file. (it's pretty easy btw. but the documentation is sparse!)
Yes? I didn't find that easy. I found it impossible. I failed with an error in info.plist. Did you simply start the XCODE file? I did so and it complained about it being an old file and I have to update. I confirmed that and clicking on build gave me the error :(

Update Where can I get the SDL framework? Commandline mkae fails with a missing SDL/SDL.h

Update 2 I found it, but I simply use the precompiled SDL framework that's coming with the precompiled bzflag.

Posted: Mon Jul 31, 2006 5:15 pm
by optic delusion
This has ben a problem for a long time. SDL just doesnt install where BZFlag expects it to be.
You need to do this the first time you install SDL, or it's borked forever. Mine was so screwed up from repeatedly attempting to fix it, that I wiped my entire disk and reinstalled OSX and devtools, then immediately installed SDL with these configure options. Never had any problems after that.
By the way... FINK is a bad thing, if you havent already, dont install fink, but you *should* be ok with it.

NOTE: I only tested this on an intel mac, but it should be the same on a PPC. If it works for you on PPC, please post, so I know.
Configure SDL with a prefix and to build static libs: (in SDL-dir)
./configure --enable-static --disable-shared --prefix=/Users/your_name/local
This is known as a symlink.


http://my.bzflag.org/bb/viewtopic.php?t=8356

Re: Compiling - OSX

Posted: Tue Aug 08, 2006 12:57 am
by Enigma
Skeeve wrote:
stestagg wrote:I've just compiled BZ 2.0.8 on Mac OSX 10.4(.7) using the xCode project file. (it's pretty easy btw. but the documentation is sparse!)
Yes? I didn't find that easy. I found it impossible. I failed with an error in info.plist. Did you simply start the XCODE file? I did so and it complained about it being an old file and I have to update. I confirmed that and clicking on build gave me the error :(

Update Where can I get the SDL framework? Commandline mkae fails with a missing SDL/SDL.h

Update 2 I found it, but I simply use the precompiled SDL framework that's coming with the precompiled bzflag.
The problem is one of the build script phases looks for the bzflag.app folder in bzflag/build, while Xcode places bzflag.app in bzflag/build/<development | default | deployment | custom build configuration>. I'm almost positive versions of Xcode prior to version 2.0.0 used the .xcode extension, while 2.*.* uses .xcodeproj, so either the Xcode project hasn't been updated in a while, or whoever maintains the Xcode project is using an old Mac OS, as I'm almost positive Xcode 2.0.0 or later only works on Mac OS 10.4.*. Previous versions of Xcode may have placed any builds directly in the builds/ folder(i don't remember).

You can get SDL at libsdl.org. Remember, Google is your friend. If you googled SDL, you would have found what you were looking for in less than one second.
A Delusion wrote:This has ben a problem for a long time. SDL just doesnt install where BZFlag expects it to be.
You need to do this the first time you install SDL, or it's borked forever. Mine was so screwed up from repeatedly attempting to fix it, that I wiped my entire disk and reinstalled OSX and devtools, then immediately installed SDL with these configure options. Never had any problems after that.
By the way... FINK is a bad thing, if you havent already, dont install fink, but you *should* be ok with it.

NOTE: I only tested this on an intel mac, but it should be the same on a PPC. If it works for you on PPC, please post, so I know.
Configure SDL with a prefix and to build static libs: (in SDL-dir)
./configure --enable-static --disable-shared --prefix=/Users/your_name/local
This is known as a symlink.
/me wonders why you wanted to install a static library instead of a framework.

All you had to do is copy SDL.framework to /library/frameworks. /system/library/frameworks is reserved for Apple.

Posted: Tue Aug 08, 2006 1:37 am
by optic delusion
from http://my.bzflag.org/bb/viewtopic.php?t=8356

4f. xcodebuild just magically builds all (or the only one?) XCode-projects in the current directory. So in this case it builds SDL.xcodeproj
After that, there should be a directory build/Default/SDL.framework. This should be moved to /Library/Frameworks, so that it can be found later.
I first tried to copy it, but there must be some strange permissions in this dir which cp ignores without some special parameters. I didn't look them up, because mv just works.. :lol-old:
mv build/Default/SDL.framework /Library/Frameworks