OK, I put together this guide by request. Compilation on mac is really quite simple once you have all the necessary applications and utilities, but it does help if you have at least a basic understanding of the command line. Open up your applications folder, look for Utilities, and find Terminal. Drop it into your dock, you're going to need it. Open it up, and you should be greeted with something like
Last login: Sun Jun 3 13:39:11 on console
Welcome to Darwin!
casino:~ ben$
From here, type pwd - print working directory
casino:~ ben$ pwd
/Users/ben
Your next command is cd - change directory. A special note: . is the current directory, .. is the parent directory (Users in this case)
casino:~ ben$ cd Documents/
casino:~/Documents ben$ pwd
/Users/ben/Documents
casino:~/Documents ben$ cd ..
casino:~ ben$ pwd
/Users/ben
Also useful is ls (that's LS in lowercase) which lists all files in the current directory.
casino:~ ben$ ls
Desktop Library Music Public base
Documents Movies Pictures Sites
That should be enough for now, time to move on to the important stuff. The first thing you'll need is Xcode Tools, a package of source code handling applications and utilities found on your OSX install disk. Find that disk, insert it, and install Xcode. You can now compile, but you still need something to compile - time to get some SVN.
http://metissian.com/projects/macosx/subversion/Download the most recent version and follow instructions to install it - shouldn't be too hard. However, you can't actually use SVN until you've completed this next bit - probably the hardest - changed your PATH to find it.
New terminal command for you - echo. Simple enough, it prints the arguments you give it.
casino:~ ben$ echo these are some arguments
these are some arguments
Why is this useful? You can get it to print variables too. There are several variables the system uses, and you can read them by typing echo $VARIABLE (this will return nothing as there is no variable called $VARIABLE). Try for example:
casino:~ ben$ echo $TERM_PROGRAM
Apple_Terminal
The variable TERM_PROGRAM stores the name of the program you are using to access the command line. Why is all this important? Well, the variable PATH contains all the locations the command line looks for instructions on how to run your commands.
casino:~ ben$ echo $PATH
/bin:/sbin:/usr/bin:/usr/sbin
so when you type pwd, the system searches /bin, /sbin, /usr/bin and /usr/sbin for a file named pwd and runs it. The trouble is, svn isn't in any of these, it's in /usr/local/bin (go have a look if you like, type ls /usr/local/bin to see all the files there). So we have to add /usr/local/bin to PATH. We do this using the following two commands:
PATH=$PATH:/usr/local/bin
export PATH
or even just:
export PATH=$PATH:/usr/local/bin
Now try this again:
casino:~ ben$ echo $PATH
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
There it is! And, you're ready. Use cd to change to the directory you want your tremulous source to go (don't worry, it will be contained in its own folder, so you don't have to make a folder to hold it in) and type the following to get the very latest in tremulous technology from the internets:
svn co svn://svn.icculus.org/tremulous/trunk tremulous-svn
Then wait a bit - this could take a while. When it's done, and you see your command prompt again, you should have a folder called tremulous-svn (you specified this name in the command above, it could be lookatmeimafolder for all svn cares). Change directory into this folder, and type make. Wait a bit more, because this takes a while too. When that's done, though, you'll have successfully compiled Tremulous source for the first time! Your binaries are in build/release-darwin-x86/ (or -ppc/ if you are not on an intel mac), but you can't actually use any of them because you forgot to backport. No worries - you just need to look here:
http://www.mercenariesguild.net/patches/?do=details&task_id=2You should decide what you want to do and pick a patch as appropriate, and download it to your code directory.
How do you use them? Like so:
patch -p0 < patchfile.patch
while in the tremulous-svn directory and with the patch in the same directory. Then remake with the make command, and you're done - compatible binaries for you. To run either the client or the server you'll need to put the relevant pk3s - vms and data - in the base folder next to those binaries, then cd to the build/release-darwin-x86 directory and run ./tremulous.x86
If I've made this guide obscure anywhere, tell me.
Post-script: If you want the PATH command to be executed automatically on login, just put it in a file called .bash_profile in your home directory. Or, run this:
printf "#! /bin/bash\nexport PATH=$PATH:/usr/local/bin\n" > ~/.bash_profile
Note that you'll need to do ls -A (show hidden files) to see this new file, as it starts with a .