Page 3 of 3

Posted: Wed Jan 25, 2006 2:25 pm
by Daemon
I have just compiled BZFlag 2.0.4 for Intel Macs. It seems to work fine on my iMac Core Duo.

Posted: Wed Jan 25, 2006 2:51 pm
by optic delusion
ThankYou very much daemon. The app seems to work very well. try to keep that link active for a while. Thanks again.

Posted: Wed Jan 25, 2006 6:39 pm
by Spazzy McGee
actually on the next release of BZ there is going to have to be 2 MacOS X releases. A Mactel and a PowerPC...

Posted: Wed Jan 25, 2006 6:43 pm
by JeffM
no, you can build an app as a "universal binary" that will run on ether system.

Posted: Wed Jan 25, 2006 6:55 pm
by optic delusion
Client BZFS and BZadmin all good, on the server list now.
Universal, Idunno, clicking "get info" on the installed application, gives no results, no window opens at all.

Edit,
Now the window opens, says it's an intel application. Not universal or PPC

Posted: Wed Jan 25, 2006 10:17 pm
by Daemon
I'll try to build a universal binary for Mac OS X 10.4.

Posted: Thu Jan 26, 2006 1:25 am
by optic delusion
There is no real need to do that Daemon. It doesn't really matter if it's universal or not.

If you're going to compile a new image, why not BZFlag 2.0.5 from CVS?
It is plugin enabled, has other features not available in 2.0.4.

Posted: Wed Feb 01, 2006 10:07 am
by ~caramel~
I already had the 2.0.4 version like 5 months ago :wink:

Posted: Wed Feb 01, 2006 10:27 am
by Spazzy McGee
~caramel~ wrote:I already had the 2.0.4 version like 5 months ago :wink:
yes, but we are talking about compiling it on the new Intel macs (and/or as a universal intel/ppc)

Posted: Mon Feb 06, 2006 11:03 pm
by snick
Daemon wrote:I have just compiled BZFlag 2.0.4 for Intel Macs. It seems to work fine on my iMac Core Duo.
May I ask you, please, did you have to change
anything to get it through compilation? If so, it
would be nice to know what you did.

Thanks,

Snick.

Compile Intel/Universal Binary on ppc Mac

Posted: Tue Jun 06, 2006 4:46 am
by Enigma
NOTE: I am almost positive this works without problems. I compiled bzflag for intel, and created a universal binary, but I do not have an intel mac to test it on. :?

ANOTHER NOTE: This only applies if you are on a ppc mac.

If you are interested in compiling BZFlag for Intel macs, or creating a universal binary of BZFlag, here is how I did it.

I added "-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386" to CPPFLAGS and CFLAGS in each makefile. I also added "-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch i386" to LDFLAGS in each makefile. I did this by changing configure.ac.

Here is a small shell script that helps get around some of the "quirks" of the BZFlag Xcode project by automating all the steps..

Code: Select all


#!/bin/sh
#
# makebz.sh
# 
############################################################################
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
###########################################################################

# $1 should be the path to the bzflag folder
# Example: /volumes/untitled/bzflag

# $2 parameter can be
# "all" - runs ./autogen.sh, ./configure, and xcodebuild
#
# runs only xcodebuild if no value is given


build ()
{
   if cd $1
      then
	
	#remove current build
	rm -rf build/default/bzflag.app
      
      if [ "$2" = "all" ]; then
         ./autogen.sh
         ./configure
      fi
      if xcodebuild setting=Default
      then
         cp -Rf data/* build/Default/BZFlag.app/Contents/Resources 
      fi
   fi	
}

build $1 $2

To make a universal binary, you need to first compile for ppc. Then change the makefiles, and compile for the Intel architecture. After you have both binaries, use this command.

Code: Select all

lipo -create <bzflag_ppc | bzfs_ppc | bzadmin_ppc> <bzflag_i386 | bzfs_i386 | bzadmin_i386> -output <bzflag | bzfs | bzadmin>
The output, each time lipo is run, will be a universal binary that you can add to BZFlag.app/Contents/MacOS/.

Re: Compile Intel/Universal Binary on ppc Mac

Posted: Tue Jun 06, 2006 1:29 pm
by temporal distraction
Slayer++ wrote:NOTE: I am almost positive this works without problems. I compiled bzflag for intel, and created a universal binary, but I do not have an intel mac to test it on. :?
Please post a link to your build so it can be tested. There are many who would want to use it.

If you don't have the space/bandwidth to host it yourself, you could use www.yousendit.com for a temporary place to put it.

Posted: Wed Jun 07, 2006 2:18 am
by Enigma
It looks like autoconf determines if the host system is big endian or little endian. WORDS_BIGENDIAN needs to be 0 for Intel.

bzflag/include/config.h
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#define WORDS_BIGENDIAN 1

This is a good document:
http://developer.apple.com/documentati ... inary.pdf

There are many who would want to use it.
Are you positive? Are people really going trust a build that I release?

Anyways, I'm just trying to build BZFlag for Intel macs because, for some reason, it interests me. And I thought I'd post what I am doing to compile BZFlag because it might be useful to someone else, but it probably isn't.