Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old August 4, 2010, 17:07   #1
cinereaste
Scout
 
Join Date: May 2010
Posts: 39
cinereaste is on a distinguished road
getting started on OSX

Does anyone have experience with compiling Angband on OSX?

I would love to download the code, have a look at it, and compile it on my own machine. I have some C experience, but not with a project of this magnitude. For instance, I've never retrieved code from an SVN repository. I see that andrewdoull wrote an excellent guide to getting started on a Windows machine. If I install Eclipse on OSX, will the same steps work? Would other Mac programmers recommend XCode instead?
cinereaste is offline   Reply With Quote
Old August 4, 2010, 17:22   #2
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 38
Posts: 1,516
d_m is on a distinguished road
Quote:
Originally Posted by cinereaste View Post
Does anyone have experience with compiling Angband on OSX?

I would love to download the code, have a look at it, and compile it on my own machine. I have some C experience, but not with a project of this magnitude. For instance, I've never retrieved code from an SVN repository. I see that andrewdoull wrote an excellent guide to getting started on a Windows machine. If I install Eclipse on OSX, will the same steps work? Would other Mac programmers recommend XCode instead?
I have a Mac that I use, although I actually just use a text editor and the makefiles. I think I have built Angband.app before but I usually don't do that... I just build an angband executable and then play in a terminal (angband -mgcu) or in X11 (angband -mx11).

If I get a chance sometime soon I will try to do that again and write a guide. Pete Mack may already have something like this ready--I think he's done a lot of the Mac development in the past.

If you want basic unix instructions for getting the code, it would be something like this:

Code:
# check out "trunk" (aka HEAD aka current development version) to DIRNAME
svn co svn://rephial.org/angband/trunk DIRNAME
cd DIRNAME

# create configure script
./autogen.sh

# configure angband to install to SANDBOX location
mkdir SANDBOX
./configure --prefix SANDBOX

# build
make

# install to SANDBOX
make install

# run angband
SANDBOX/games/angband
That is from memory but I'm pretty sure it's correct, I do it all the time. I really recommend having a special sandbox to install to... so you can have a stable/packaged version installed and also have your own custom set up.
__________________
linux->xterm->screen->pmacs
d_m is offline   Reply With Quote
Old August 4, 2010, 19:38   #3
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,504
Derakon is on a distinguished road
Modern Angband compiles to an OSX-standard application just fine. You'll need the Angband source code, the OSX Developer Kit (available from Apple), and Terminal. Just cd into the src directory and run "make -f Makefile.osx", and it'll make Angband.app for you.

Now, compiling old variants is another matter entirely...
Derakon is offline   Reply With Quote
Old August 5, 2010, 07:00   #4
cinereaste
Scout
 
Join Date: May 2010
Posts: 39
cinereaste is on a distinguished road
Thank you, d_m. I successfully retrieved things from svn. autogen.sh failed, however, with this error:

Code:
./autogen.sh
*info* running aclocal
./autogen.sh: line 38: aclocal: command not found
*error* aclocal failed. (exit code = 127)
My first guess is that I need to adjust the PATH variable. I'll take a closer look at this tomorrow if I have time.
cinereaste is offline   Reply With Quote
Old August 5, 2010, 07:28   #5
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,504
Derakon is on a distinguished road
You shouldn't need to mess with configuration at all. Just use the OSX Makefile.
Derakon is offline   Reply With Quote
Old August 5, 2010, 16:10   #6
cinereaste
Scout
 
Join Date: May 2010
Posts: 39
cinereaste is on a distinguished road
So you're saying skip the ./autogen.sh and ./configure --prefix SANDBOX steps and proceed directly to make? I can give that a try.
cinereaste is offline   Reply With Quote
Old August 5, 2010, 17:16   #7
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 38
Posts: 1,516
d_m is on a distinguished road
I think Derakon is right... the OSX Makefile works differently than the default unix one.
__________________
linux->xterm->screen->pmacs
d_m is offline   Reply With Quote
Old August 5, 2010, 17:51   #8
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,859
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by cinereaste View Post
So you're saying skip the ./autogen.sh and ./configure --prefix SANDBOX steps and proceed directly to make? I can give that a try.
Yup, just cd src; make -f Makefile.osx. Works like magic.
__________________
"Physician, heal thyself."
takkaria is offline   Reply With Quote
Old August 6, 2010, 05:13   #9
cinereaste
Scout
 
Join Date: May 2010
Posts: 39
cinereaste is on a distinguished road
Thank you d_m, Derakon, and takkaria! With your guidance that was way easier than I imagined it would be. Now to start tinkering . . .
cinereaste is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling Angband 3.0.9 w/ xcode on OSX Iemortal Vanilla 8 April 16, 2011 17:41
OSX Tileset help? ZorroRoaster Variants 1 March 31, 2009 01:09
Graphics glitch in OSX version willpax Vanilla 5 January 15, 2009 15:07
Macintosh OSX 3.0.9b: Out of memory error? Skyknight Vanilla 4 June 8, 2008 05:42
[Un] Confused how to get started in 0.6.2-wip6a, + misc. Bostock Variants 7 September 6, 2007 21:26


All times are GMT +1. The time now is 22:22.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.