Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old April 9, 2011, 21:17   #1
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,054
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate Send a message via Skype™ to Magnate
Getting Angband from Github and compiling it

This tutorial assumes that you are using git at a command line. If you are using git via a GUI or IDE, you probably know all this already. Besides, there are too many possible GUIs to cover them all.

If you are seeking to build v4 rather than V, follow the instructions below, but everywhere you see github.com/something/angband, use github.com/something/v4 instead.

1. First, create yourself an account at github.com. We'll call this account yourname. You don't strictly have to do this: if you really don't want a github account, skip step 2.

2. Having logged into your github account, go to http://github.com/angband/angband and click the Fork button. This will create a fork of the official repo at your github account.

3. On your local machine do "git clone git://github.com/yourname/angband dirname". This will create a local copy of your fork of the official repo in dirname. If you didn't create a github account, just clone git://github.com/angband/angband instead, and that will create a local copy of the official repo directly. This means that you won't be able to push any changes back to github, so you can't share your brilliant fixes and customisations with the rest of us, but never mind.

4. Change directory into dirname, and that's basically it - you are now able to build the latest nightly version of angband yourself. How you do this will depend on your build environment, but don't forget to "make clean" in between builds - and if you're on *nix, you'll need to use "./autogen.sh; ./configure" the first time you build, and after every "make distclean".

You can use "configure --help" to see the different options available. The ones you may want to consider are

--with-no-install, if you want to play it from the git directory, rather than installing it elsewhere on your system

--enable-sdl, to build the SDL port (start it with "angband -msdl")

(the rest of these are irrelevant on Windows, but useful on unix/mac)

--enable-gtk, to build the GTK port (start with "angband -mgtk")

--disable-x11, if you don't want it to build the x11 port

--disable-curses, if you don't want it to build the console port

--with-setgid=groupname, if you want a system-wide installation (i.e. for all users)

Last edited by Magnate; October 24, 2011 at 16:07. Reason: Added note about v4.
Magnate is offline   Reply With Quote
Old April 9, 2011, 22:05   #2
myshkin
Angband Devteam member
 
Join Date: Apr 2007
Posts: 334
myshkin is on a distinguished road
Mac OS X users will need to have the Developer Tools installed, or some other means of getting at a compiler. Also, while the autoconf/configure toolchain works on Mac OS X, it won't yet generate Mac OS X application bundles. If you want to play under the terminal or in X11, that's fine. Otherwise, instead of Magnate's step 4, cd into the src directory and run make -f Makefile.osx. I intend to add Mac OS X support to configure.ac, but would welcome patches, as it's not highest on my to-do list.
myshkin is offline   Reply With Quote
Old May 12, 2011, 22:10   #3
Spacebux
Adept
 
Join Date: Apr 2009
Posts: 231
Spacebux is on a distinguished road
Little help, please... ( * o *)/~~

Quote:
Originally Posted by Magnate View Post
(Pav - I thought I'd offer this because the stickied SVN thread is now out-of-date for V - feel free to nuke it if it's not helpful enough. Maybe it's obsolete now we have nightlies?)

This tutorial assumes that you are using git at a command line. ...
I cannot get past this compile error for z-file.c on Windows using Cygwin/MinGW.

gcc -DWINDOWS -Wall -Wextra -Wno-unused-parameter -std=c99 -Wdeclaration-after-s
tatement -O2 -I. -c -o z-file.o z-file.c
z-file.c:25:21: direct.h: No such file or directory
z-file.c: In function `dir_create':
z-file.c:713: error: too few arguments to function `mkdir'
z-file.c:716: error: too few arguments to function `mkdir'

make: *** [z-file.o] Error 1
I have looked, but I fail to see the issue in the code. More specifically, I'm not sure how many arguments and which are missing from mkdir.

I've fallen and cannot get up....

Also, I had to resort to the 3.2.0 source Makefile to get it to go... couldn't get any of the newer Makefiles to work with my Cygwin setup, even after updating MinGW. clueless...

-SBux-
Spacebux is offline   Reply With Quote
Old May 12, 2011, 23:00   #4
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 37
Posts: 1,516
d_m is on a distinguished road
To build for Windows, you're supposed to cd into src and then run "make -f Makefile.win"... is that what you're doing?
__________________
linux->xterm->screen->pmacs
d_m is offline   Reply With Quote
Old May 13, 2011, 00:06   #5
Spacebux
Adept
 
Join Date: Apr 2009
Posts: 231
Spacebux is on a distinguished road
Quote:
Originally Posted by d_m View Post
To build for Windows, you're supposed to cd into src and then run "make -f Makefile.win"... is that what you're doing?
Yeah, that is what I was doing...

It couldn't locate that certain header file, so I yanked that section out of the code, and it compiles.

direct.h <-- file not found... so, no directory creation for me.

-SBux-
Spacebux is offline   Reply With Quote
Old May 13, 2011, 02:15   #6
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,825
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by Spacebux View Post
Yeah, that is what I was doing...

It couldn't locate that certain header file, so I yanked that section out of the code, and it compiles.

direct.h <-- file not found... so, no directory creation for me.

-SBux-
do you not mean dirent.h?
__________________
"Physician, heal thyself."
takkaria is offline   Reply With Quote
Old May 13, 2011, 03:35   #7
Spacebux
Adept
 
Join Date: Apr 2009
Posts: 231
Spacebux is on a distinguished road
Quote:
Originally Posted by takkaria View Post
do you not mean dirent.h?
Did not thunk of that it might be a simple mis-spelling:

https://github.com/angband/angband/b...c/z-file.c#L18
#ifdef WINDOWS
# include <windows.h>
# include <io.h>
# include <direct.h>
#endif
Spacebux is offline   Reply With Quote
Old May 13, 2011, 08:39   #8
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,825
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by Spacebux View Post
Did not thunk of that it might be a simple mis-spelling:

https://github.com/angband/angband/b...c/z-file.c#L18
#ifdef WINDOWS
# include <windows.h>
# include <io.h>
# include <direct.h>
#endif
Actually, it's not just a simple misspelling, because that works absolutely fine when building the game for me. But if it fixes it for you, excellent.
__________________
"Physician, heal thyself."
takkaria is offline   Reply With Quote
Old May 13, 2011, 13:45   #9
Tobias
Adept
 
Tobias's Avatar
 
Join Date: Dec 2009
Posts: 172
Tobias is on a distinguished road
How do you pull changes from the main repo into your personal fork?
Tobias is offline   Reply With Quote
Old May 13, 2011, 15:15   #10
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,825
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by Tobias View Post
How do you pull changes from the main repo into your personal fork?
If you branched from the official github repository, then 'git pull' should automatically merge them in for you.
__________________
"Physician, heal thyself."
takkaria 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 on MS-DOS Zababa Development 8 May 27, 2011 17:36
Compiling Angband 3.0.9 w/ xcode on OSX Iemortal Vanilla 8 April 16, 2011 16:41
Compiling Z+Angband under Windows Altefcat Variants 8 December 11, 2008 09:44
compiling vanilla angband on msvc++ 9 express hugh Vanilla 6 March 17, 2008 15:49
Trouble compiling angband 3.0.9 on linux RastaRuedi Vanilla 2 August 1, 2007 17:28


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


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.