Nexuiz build script for MAC / OSX?

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

Nexuiz build script for MAC / OSX?

Postby Dokujisan » Sun Feb 22, 2009 6:29 am

This has come up a lot to me in IRC. I see compile scripts for linux and Windows, but not MAC. Does anyone have any insight into this?
Dokujisan
Forum addon
 
Posts: 1199
Joined: Sat Oct 07, 2006 4:31 pm
Location: Louisville, Kentucky

Postby merlijn » Sun Feb 22, 2009 2:30 pm

Haven't had the time to make a full script yet, but I have been able to get nexuiz to compile on my mac using these steps:

(most of these are shamelessly ripped from other threads in the forum, so thank you all)

First off you need to have the latest Xcode tools installed. You can install this from the install DVD that came with your mac.

I have only been able to test this using OSX 10.5 Leopard on x86, if anyone feels like testing Tiger/Panther or on PPC please post a reply if it works or not :).

Obtain the sources
Code: Select all
mkdir -p ~/Games/Nexuiz && cd ~/Games/Nexuiz && svn co svn://svn.icculus.org/nexuiz/trunk

cd ~/Games && svn co svn://svn.icculus.org/twilight/trunk/darkplaces

mkdir -p ~/Games/fteqcc && cd ~/Games/fteqcc && svn co https://fteqw.svn.sourceforge.net/svnroot/fteqw/trunk/engine/qclib/


Compiling everything
Code: Select all
cd ~/Games/fteqcc/qclib/ && make

cd ~/Games/darkplaces && make cl-nexuiz

cd ~/Games/Nexuiz/trunk/data && make FTEQCC="~/Games/fteqcc/qclib/fteqcc.bin"


Creating the OSX .app
Code: Select all
cp -R ~/Games/Nexuiz/trunk/misc/buildfiles/osx/Nexuiz.app ~/Games/Nexuiz/trunk/

ln -sf ~/Games/darkplaces/nexuiz-agl ~/Games/Nexuiz/trunk/Nexuiz.app/Contents/MacOS/nexuiz-osx-agl-bin


This gave me a working executeable, just point Finder to your homedir/Games/Nexuiz/trunk/ and double click on the Nexuiz application.

There is however a couple of bugs I didn't bother to fix, possible someone can enlighten me how to do it better:

- The SDL version doesn't work (I am missing SDL header files)
- You will still be using old libraries for jpeg/png/vorbis support, which were in the original .app, it would better to compile them from source as well, as the ones in there are probably over a year old.
Last edited by merlijn on Tue Aug 04, 2009 9:51 am, edited 2 times in total.
Before posting a reply, please read about the bikeshed
merlijn
Advanced member
 
Posts: 84
Joined: Tue Oct 21, 2008 10:18 am

Postby Alien » Sun Feb 22, 2009 10:32 pm

I wonder how hard it would be to make netradiant package (or compile script) for mac, because the 1.4 is buggy. I don't have mac.
Alien
Forum addon
 
Posts: 1212
Joined: Tue Apr 22, 2008 7:12 am

Postby divVerent » Mon Feb 23, 2009 8:05 am

Hard, as long as no OS X developer offers help in fixing the parts that still crash on OS X (like, for an unknown reason, loading MD3 models).
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby esteel » Mon Feb 23, 2009 9:51 am

merlijn wrote:Creating the OSX .app
Code: Select all
cp -R ~/Games/Nexuiz/trunk/misc/buildfiles/osx/Nexuiz.app ~/Games/Nexuiz/trunk/

cp ~/Games/darkplaces/nexuiz-agl ~/Games/Nexuiz/trunk/Nexuiz.app/Contents/MacOS/nexuiz-osx-agl

I would replace the second cp with a link.. then you can't for get to copy the engine and it will 'automatically' be uptodate when you update and compile DP
esteel
Site admin and forum addon
 
Posts: 3924
Joined: Wed Mar 01, 2006 8:27 am

Postby merlijn » Mon Feb 23, 2009 11:46 am

Thanks esteel, I have added your suggestion.

However there still is a little problem that occurs when updating. Suppose that the Nexuiz.app gets changed in svn, the folder would have to be copied to the trunk dir again - and the link would be gone anyway. Not copying over the Nexuiz.app after an update is potentially worse since you wouldn't get the new updates. Sounds like somewhat of a catch-22 :).

I have attempted to make a softlink for the Nexuiz.app folder as well, but then the game fails due to missing game content.
merlijn
Advanced member
 
Posts: 84
Joined: Tue Oct 21, 2008 10:18 am

Postby esteel » Mon Feb 23, 2009 12:57 pm

Oh how do i love the simplicity of doing this on linux :P I just use cd ~/vc/nexuiz/trunk; ~/.nexuiz/u to start a update.. I can use several checkouts by just changing that cd.. That single line updates DP, fteqcc and nexuiz.. were updating means to first show all the changes in svn and then fetching them and compiling..
I split it into several scripts as then i can also run them independent of each other. That makes it look a bit more complicated than it actually is though!
Maybe its useful for someone.. ( i have all the checkouts in ~/vc/nexuiz , ~/vc/darkplaces and ~/vc/fteqcc were vc stands for version-control and i have all the scripts in ~/.nexuiz )

updates all for the current directory: ~/.nexuiz/u wrote:#! /bin/sh

path=`dirname "$0"`

(cd darkplaces && "$path/ud")
(cd fteqcc && "$path/uf")
"$path/un"


updates DP for the current dir: ~/.nexuiz/ud wrote:#! /bin/sh

(svnl -v && svn up && make release) 2>&1 | less


updates fteqcc from the current dir: ~/.nexuiz/uf wrote:#! /bin/sh

(svnl -v && svn up && make) 2>&1 | less


updates nexuiz from the current dir: ~/.nexuiz/un wrote:#!/bin/sh

export FTEQCC="$PWD/fteqcc.bin"

(svnl -v && svn up && (cd data; make)) 2>&1 | less


This script is used via $PATH and also useful in other cases..
show all svn changes for the current dir (use parameter -v to also show affected files and not just the log message): ~/bin/svnl wrote:#! /bin/sh

exec svn log -r HEAD:BASE "$@"


I did the checkouts by hand (should be an easy script though..) and then ~/.nexuiz/l ( from within ~/vc/nexuiz/trunk) to create the needed softlinks:
create all links within current dir: ~/.nexuiz/l wrote:#! /bin/sh

path=`dirname "$0"`

"$path/ld"
"$path/lf"


This one uses short names, however the nexuiz-linux-*.sh script use the 'official binary names' and thus will not work. I start the binaries 'by hand' and do not use the .sh scripts. If you still want to use them, change the link names to match the 'real' binaries!
create DP links: ~/.nexuiz/ld wrote:#! /bin/sh

ln -s "$@" "$HOME/vc/twilight/trunk/darkplaces" darkplaces
ln -s "$@" darkplaces/darkplaces-dedicated nexuiz-dedicated
ln -s "$@" darkplaces/darkplaces-sdl nexuiz-sdl
ln -s "$@" darkplaces/darkplaces-glx nexuiz-glx


create fteqcc links: ~/.nexuiz/lf wrote:#! /bin/sh

ln -s "$@" "$HOME/vc/fteqw/trunk/engine/qclib" fteqcc
ln -s "$@" fteqcc/fteqcc.bin fteqcc.bin
esteel
Site admin and forum addon
 
Posts: 3924
Joined: Wed Mar 01, 2006 8:27 am

Postby MC SE7EN » Wed Aug 19, 2009 4:12 pm

im downloading the svn now..had no idea there wasnt a way to compile on mac..i have to use the sdl version..so basically what all this means is im screwed? that sucks. :(

and no, i have no idea how to make a compile script.. ;)
MC SE7EN
Alien trapper
 
Posts: 294
Joined: Fri Apr 10, 2009 8:56 pm

Postby merlijn » Wed Aug 19, 2009 4:39 pm

I heard you can easily download SDL for mac too, I just never tried it. http://guides.macrumors.com/Installing_SDL looks helpful.

I think the rest of the steps are fairly straightforward, you might have to choose a different make target for darkplaces and copy over Nexuiz-SDL.app and link the nexuiz-osx-sdl-bin this time.
Before posting a reply, please read about the bikeshed
merlijn
Advanced member
 
Posts: 84
Joined: Tue Oct 21, 2008 10:18 am

Postby Isabella12 » Mon Nov 02, 2009 5:55 pm

Visit the Apple Developer Connection, create a developer account and download Xcode. Version 2.2 is 837.3MB and requires Mac OS X 10.4 (Tiger). Older versions should work as well, and you will most likely find a version included with your Mac OS X install disks.
Generic nonsense
Isabella12
Banned
 
Posts: 1
Joined: Mon Nov 02, 2009 5:35 pm

Next

Return to Nexuiz - Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron