Game Development Community

Compiling on Macbook

by James Urquhart · in Torque Game Engine · 07/29/2006 (6:09 am) · 21 replies

Hey guy's,

I decided to try compiling torque from the CVS repository on my Macbook today. However, i kept bumping into one problem after the other.

To start off with, the compile options seemed to be set up for a PPC build (i.e. lots of G4 specific compile flags were present).
Then i had a problem with the frameworks; turns out that they were all PPC (not universal or i386), so i had to find and/or build Universal versions (sadly, i couldn't seem to find any source for a Theora framework).
After a bit more hackage, i finally managed to get it all to compile. Torque ran, right up to the feature walkthrough demo - i got a nice view of the terrain with funny colors, and it crashed.

Does anyone know if there is a proper universal (i386 & ppc) version of the XCode project files? I seem to recall there was talk about a universal version of torque, but evidently its nowhere to be found in the CVS.

Any help that doesn't involve suggesting i use the horrific search feature of the website would be appreciated.
Page «Previous 1 2
#1
07/29/2006 (6:31 am)
Ok, found the solution.

It seems the download version available from the product page compiles fine. It turns out that CVS isn't updated a lot nowadays :(

RIP, CVS.
#2
08/15/2006 (12:46 pm)
Thanks to this post and fix.. I have found the problem myself also :D I will try to compile with Xcode 2.4 and let you know.. :D
#3
08/16/2006 (5:16 pm)
So what's the deal? Is the latest version of torque ala cvs borked?

I tried to compile the latest version and I found a mess of G4 junk just like James did. I don't think I got nearly as far as he did in the compiling effort though... :(

Does anyone maintain the CVS version? It's obviously out of sync with the version that is packaged on "My Account". Should I just do a source diff and merge the two? Any thoughts?

I'd really like to get a better version of the engine but it seems like I've been given hurdle after hurdle on my Mac. It's so rough that I've resorted to posting messages that will not likely see responses.
#4
08/17/2006 (7:00 am)
Hey All,

I got the current standard 1.4u My Account to compile under XCode 2.4 without problems and I have some bugs to report but I'd like to check them against the latest CVS build before I log bugs that have already been fixed. What's everyone using for CVS? Command line? A utility? I tried MacCVSClient X with about every permutation of the specs in the WinCVS docs without any luck. Also noted the images in CVS documentation say "cvs/tse" while the text says "cvs/torque".

I'd be glad to contribute to the CVS discussion if I could reliably grab the latest version.

=Tod

PS Met Paul Scott at WWDC - he's a good guy and hopefully now that they have pushed the 2D engine product out the door tse will get more attention.
#5
08/17/2006 (7:46 am)
Tod,

I have found using cvs from the terminal is better than using any of those gui cvs tools. Just make sure you have set up CVSROOT (should be :pserver:username@cvs.garagegames.com:/cvs/torque), you have logged in (cvs login), and that you know how to check out a copy of torque (cvs checkout torque). Updating is also easy (cvs update), and doing a diff is equally as easy (cvs diff -urn > out.txt).
Don't forget to set compression (e.g. -z6) beforehand, otherwise your download will be a bit slow :)
#6
08/18/2006 (7:00 am)
James and all,

I can't believe the time I wasted screwing around with the "easy" GUI interfaces that didn't work. Just so it is somewhere here's the operation from the commandline:

$ export CVSROOT=:pserver:accountname@cvs.garagegames.com:/cvs/torque

$ cvs login
[Logging in to :pserver:accountname@cvs.garagegames.com:2401/cvs/torque
CVS password:]

$ cvs -z3 checkout torque
[A long list of files for torque scrolls here...]
----------------------
That's it.

Note that this will build at your User level directory unless you change your pwd before you run the script. Also you can set your compression level with -z# to limit how long it takes if you have smaller pipes.

=Tod
#7
08/18/2006 (7:22 am)
As to the build - torque built and ran just fine on my Dual 2.0 G5 box under XCode 2.4.

What I didn't expect is that it is not the same package contents as the 1.4u it is actually the full torque demo with the racecar and terrain walkthrough and sales pitch.

Did I grab the wrong archive or is that really the latest build?

EDIT:

I'll update my post to reflect what learned from *gasp* reading the documentation.
If you want the cvs build to act like the account download copy the GameOne folder from /examples in the download folder to the /example folder in the cvs build and create/edit the maccmdline.txt file to contain:

torqueDemo -game GameOne

Now running the build will start the same way the download build does.

Docs start here:
www.garagegames.com/docs/tge/general/apbs05.php#setupengine.demoapp.mods

Sorry I don't have access to an Intel machine to test the build. I'll see what I can dig up.

=Tod
#8
09/26/2006 (11:25 pm)
Hey all, I followed some directions I found on here for setting up Torque with XCode and I think I've got it up and running on my MBP, but when I compile I get the following:

SDK package /Developer/SDKs/MacOSX10.4u.sdk does not exist
error: There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/MacOSX10.3.9.sdk'
error: There is no SDK at specified SDKROOT_i386 path '/Developer/SDKs/MacOSX10.4u.sdk'

I googled the errors but didn't find anything of value. Can someone point me in the right direction here?

-Matt
USC IMD
"Original Fin" Team
#9
09/27/2006 (8:57 am)
At the path '/Developer/SDKs/' what do you have?

You should have a target for each platform you said you wanted to develop for when you installed the DevTools.

Under Xcode 2.4 I have folders for:
MacOSX10.2.8.sdk
MacOSX10.3.9.sdk
MacOSX10.4u.sdk

You only technically need the SDK for your OS version (MacOSX10.4u.sdk) if you're just going to play with Torque and not use a compiled version on any other OS - but you do need an SDK for every platform you plan to deploy on.

If you don't have these folders then your DevTools install is probably incomplete or outdated. The solution either way is to re-install or upgrade depending on your situation. What version of Xcode do you have installed and what version of Torque are you trying to compile?

=Tod
#10
09/27/2006 (12:42 pm)
Thanks Tod, it seems I'm missing the SDK folder and its contents. I guess when I installed XCode I forgot something. Is the installer for the SDKs available online or only off the CD?

I am using XCode 2.2.1 and I'm trying to compile TGE 1.4.0 I believe.

-Matt
USC IMD
"Original Fin" Team
#11
09/27/2006 (1:19 pm)
Thanks Tod, it seems I'm missing the SDK folder and its contents. I guess when I installed XCode I forgot something. Is the installer for the SDKs available online or only off the CD?

I am using XCode 2.2.1 and I'm trying to compile TGE 1.4.0 I believe.

-Matt
USC IMD
"Original Fin" Team
#12
09/27/2006 (1:23 pm)
If you're an Apple Developer - there is a free sign-up version - you can download the latest XCode Dev Tools image which is currently 2.4 as well as earlier versions from the Developer site. The Dev Tools are included with the OS when it ships so it seems to me you should be able to get them without necessarily being a Developer, but I'm not sure exactly where that would be. It'll be on your install DVD if you can find it.

You'll want to be using SDK 1.4u (u == universal build) at minimum for your build if you're on an Intel based machine. This is the download on the website SDK right now. Version 1.4.2 is available from CVS and includes a lot of changes and is a good idea but isn't necessary.

HTH,

=Tod
#13
09/27/2006 (2:35 pm)
Thanks again Tod, I signed up last year for the Apple Developer Network so I'll dig up my password and download the latest version of XCode.

How would I check if I have the UB version of the Torque SDK? I'm fairly certain that I do but I just want to double check.

-Matt
USC IMD
"Original Fin" Team
#14
09/27/2006 (3:45 pm)
Thanks Tod, it seems I'm missing the SDK folder and its contents. I guess when I installed XCode I forgot something. Is the installer for the SDKs available online or only off the CD?

I am using XCode 2.2.1 and I'm trying to compile TGE 1.4.0 I believe.

-Matt
USC IMD
"Original Fin" Team
#15
09/27/2006 (11:00 pm)
@USC

I'm not sure how to tell the versions from the outer folder but my 1.4U build has

(root folder)/pb/torque_xcode_2_2_UB.xcodeproj

and I think the UB is key to Universal Build coding. With 1.4.2 the pb folder is deprecated and an actual Xcode folder exists in its place.

Let us know how it goes,

=Tod
#16
09/29/2006 (10:44 am)
Thanks Tod, it seems I'm missing the SDK folder and its contents. I guess when I installed XCode I forgot something. Is the installer for the SDKs available online or only off the CD?

I am using XCode 2.2.1 and I'm trying to compile TGE 1.4.0 I believe.

-Matt
USC IMD
"Original Fin" Team
#17
10/02/2006 (9:15 am)
Thanks Tod, it seems I'm missing the SDK folder and its contents. I guess when I installed XCode I forgot something. Is the installer for the SDKs available online or only off the CD?

I am using XCode 2.2.1 and I'm trying to compile TGE 1.4.0 I believe.

-Matt
USC IMD
"Original Fin" Team
#18
10/02/2006 (7:26 pm)
All right I think I'm close, I've updated XCode to 2.4 and now I get the following errors:

mv: rename ./build/Default to ./build/Default_old no such file/directory
ln: ./build/Default: no such file/directory

I'm guessing this is something completely simple that I'm just missing...

-Matt
USC IMD
"Original Fin" Team
#19
10/02/2006 (8:56 pm)
That's actually a script that runs prior to compilation. I believe it's supposed to move aside the old builds into another folder rather than write over them. Have you changed the default build location when you set up XCode? I know I had changed it and the first time I compiled Torque I had to change the build location back to the default.

The actual code is the "Fix Build Products Path" scripting step. Expand "Targets" and "Torque-MacCarb-Debug" and the second step is "Fix Build Products Path". The code is in there and you could probably delete it or comment it out if you can't resolve the problem.

If you don't have a "build/Default" folder in your Projects folder then creating one might also alleviate the problem.

Good luck,

=Tod
#20
10/02/2006 (11:51 pm)
I got it, the instructions said to set up XCode to build to ../default. I set XCode back to "project directory" and it seems to be compiling. Now I can recompile Torque without rebooting into Windows, very nice.

Thanks so much Tod!

-Matt
USC IMD
"Original Fin" Team
Page «Previous 1 2