getting started on OSX

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cinereaste
    Scout
    • May 2010
    • 43

    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?
  • d_m
    Angband Devteam member
    • Aug 2008
    • 1517

    #2
    Originally posted by cinereaste
    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

    Comment

    • Derakon
      Prophet
      • Dec 2009
      • 9022

      #3
      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...

      Comment

      • cinereaste
        Scout
        • May 2010
        • 43

        #4
        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.

        Comment

        • Derakon
          Prophet
          • Dec 2009
          • 9022

          #5
          You shouldn't need to mess with configuration at all. Just use the OSX Makefile.

          Comment

          • cinereaste
            Scout
            • May 2010
            • 43

            #6
            So you're saying skip the ./autogen.sh and ./configure --prefix SANDBOX steps and proceed directly to make? I can give that a try.

            Comment

            • d_m
              Angband Devteam member
              • Aug 2008
              • 1517

              #7
              I think Derakon is right... the OSX Makefile works differently than the default unix one.
              linux->xterm->screen->pmacs

              Comment

              • takkaria
                Veteran
                • Apr 2007
                • 1951

                #8
                Originally posted by cinereaste
                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.
                takkaria whispers something about options. -more-

                Comment

                • cinereaste
                  Scout
                  • May 2010
                  • 43

                  #9
                  Thank you d_m, Derakon, and takkaria! With your guidance that was way easier than I imagined it would be. Now to start tinkering . . .

                  Comment

                  Working...
                  😀
                  😂
                  🥰
                  😘
                  🤢
                  😎
                  😞
                  😡
                  👍
                  👎