Since I am new to all this mod stuff I thought I better write down how I did. I am using Xcode 3.2.4 and r2202 of the ioquake3 source code. For compiling I use the ioquake make-macosx.sh script. Lets get started:
- Checkout source code:
svn://svn.icculus.org/quake3/trunk ioquake
- Build the code:
./make-macosx.sh
- Run ioquake to see that everything is working:
./build/release-darwin-x86_64/ioquake3.x86_64
- Now I create a copy of the build/release-darwin-x86_64 folder in the build folder. I name it release-macosx. It is in here that we will test our mod (the release-darwin-x86_64 folder is always deleted before compiling so all our .pk3 files will be deleted when we build and that is why I make a copy)
- Take the pak0.pk3 file from the Quake III Arena CD and put it in build/release-macosx/baseq3/
- Download the latest point release (1.32b) .pak3 files for baseq3 and missionpack and add them to build/release-macosx/. These can be found here: http://www.quakeiii.nl/files/ (and other places)
- Create a folder in release-osx to hold our mod e.g
mkdir build/release-osx/MyMod
- Now we will make a small script that will copy the game files from the compilation folder (where make-macosx.sh puts them) and to our mod folder:
#!/bin/sh #Filename: copy.sh cp build/release-darwin-x86_64/baseq3/cgamex86_64.dylib build/release-osx/MyMod/ cp build/release-darwin-x86_64/baseq3/qagamex86_64.dylib build/release-osx/MyMod/ cp build/release-darwin-x86_64/baseq3/uix86_64.dylib build/release-osx/MyMod/
- If you want to make your own maps also create a maps folder:
mkdir build/release-osx/MyMod/maps
This is the place where the q3 engine will look for .bsp maps
- Now it is time to fire up XCode – start with creating a new project with template: “Mac OX S/Other/External Build System”
- Now right click on your project (in the left tree view) and choose “Add/Existing Files…”
- Navigate to the “code” folder (ioquake/code), select all folders and click “Add”. We have now added all the source code – time to create a build target
- Right click “Targets” (left tree view) and choose “Add/New Target”. Select “Mac OS X/Other/Shell script target”. Give the target a name and click “Finish”
- Right click “Run script” (targets/targetname/Run script in left tree view). Choose “Get info”. In the General tab under “Script” add:
./make-macosx.sh ./copy.sh
- Now to run the game I made a small script called run.sh:
#!/bin/sh build/release-osx/ioquake3.x86_64 +set sv_pure 0 +set vm_cgame 0 +set vm_game 0 +set vm_ui 0 +set fs_game MyMod +map q3dm1
This will run our mod MyMod with the map q3dm1
- Now you are done! Start modding and when you want to compile just hit “Build” from the “Build” menu (output from the script will automatically turn up in XCodes “Build results” window). To run the game just type ./run.sh in the terminal