[NPP] Compiling on Mac OS X

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chem
    Adept
    • Sep 2007
    • 150

    [NPP] Compiling on Mac OS X

    I have the latest beta of NPP in source form, and want to compile it on my Intel Mac running OS X 10.4.10. The latest Xcode is installed. Attempting to use the Makefile.osx or Makefile_crb.osx fails for me. There is also no ./configure script that I can find. I can't find any docs in the source with details on what to do, and while I may be able to hack it together myself, it seems like this should "just work." I compiled vanilla 3.0.9 from source without any trouble at all (a simple "make -f Makefile.osx" for [V]).

    Any help? Comments? Could this possible be made to work "out of the box" in the next NPP beta?

    Also, I think I can provide universal binaries of [V] 3.0.9 if the site needs it. I think maybe in a .dmg form although I did not try making with dist yet.

    Thanks!
  • Big Al
    Swordsman
    • Apr 2007
    • 327

    #2
    For me running Intel OS X 10.4.9, getting makefile.osx to compile involved only commenting out the two lines:
    Code:
    CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc
    LIBS += -arch i386 -arch ppc -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk
    I think it's something to do with trying to make a universal build. I recall having some problem with the "-arch i386 -arch ppc" part before, trying to compile vanilla. I'm think that this will make a copy of the game that will only run on intels, but not certain.

    Hope that helps.
    Come play Metroplexity!
    Un, V MX H- D c-- f- PV s- d+ P++ M+
    c-- S I++ So+ B+ ac- !GHB SQ RQ+ V+

    Comment

    • chem
      Adept
      • Sep 2007
      • 150

      #3
      Hmm okay, I think I've found the problem. Those lines are recommended for universal binaries, yes:

      ...but that SDK is not installed by default with Xcode, and is in fact missing from my machine too.


      I'll install the SDK from disc and try again. I bet it works. Thanks for the pointer!

      EDIT: success. It compiled fine and starts up ok. Universal binary.
      I can provide universal binary compiles of NPP 050BETA4 and Vanilla 3.0.9 upon request. I imagine making a .dmg file will be trivial.
      Last edited by chem; September 3, 2007, 05:16.

      Comment

      • Big Al
        Swordsman
        • Apr 2007
        • 327

        #4
        Good to know, thanks. I'll have to try that too.
        Come play Metroplexity!
        Un, V MX H- D c-- f- PV s- d+ P++ M+
        c-- S I++ So+ B+ ac- !GHB SQ RQ+ V+

        Comment

        • ewan
          Adept
          • Aug 2007
          • 108

          #5
          Originally posted by chem
          I can provide universal binary compiles of NPP 050BETA4 and Vanilla 3.0.9 upon request. I imagine making a .dmg file will be trivial.
          Yes, please! [And in general, I'm in the 'market' for os x compiles of variants - there are a lot that I would like to try (Entro, Heng, NPP, latest Steam, Zang...) but as far as I know, cannot.

          Hope that the poster is still active!

          Thanks - Ewan

          Comment

          • Lebannen
            Apprentice
            • Apr 2008
            • 61

            #6
            Originally posted by ewan
            Yes, please! [And in general, I'm in the 'market' for os x compiles of variants - there are a lot that I would like to try (Entro, Heng, NPP, latest Steam, Zang...) but as far as I know, cannot.

            Hope that the poster is still active!
            The latest available version of Angband - 3.0.9b - was actually released as a Universal Binary. The direct download link is http://rephial.org/downloads/3.0/angband-3.0.9b-osx.dmg .

            There's been a lot of improvements to the mac code over the last couple of years, thanks to Pete Mack - some of the older variants (certainly Zang) are using much older code, so it'd be nice to get up-to-date ports of the list you mention. I'm doing a few other things at the moment, but if chem or Big Al (who I think has also expressed interest at one point?) don't do it, it's certainly on my list to get automated new builds going.

            Comment

            • Pete Mack
              Prophet
              • Apr 2007
              • 6883

              #7
              In V, there's a Makefile.osx target 'dist:' for building a dmg; there is no similar command in the (old) NPP Makefile.osx version. NPP still uses the old (Quickdraw-based) main-crb.c

              Importing it from V won't work exactly, because V uses the new (Carbon-and-Cocoa) based main-crb.c.

              You may be able to use the 3.0.6 Makefile.osx from V, available here:



              I expect you will need to fix the dist: target specifically for NPP.

              (The 3.0.8+ Makefile.osx is easier to port, but requires the new main-crb.c and supporting files.)

              Comment

              • ewan
                Adept
                • Aug 2007
                • 108

                #8
                Pete/Lebannen: I very much appreciate the replies. Vanilla I have running, no problem (other than the lack of a NumLock option on my laptop!), but I'm insufficiently competent to know what I might do with a Makefile, alas :-(.

                Comment

                • chem
                  Adept
                  • Sep 2007
                  • 150

                  #9
                  I have not played/compiled NPP in forever, and do not have my old NPP compile or Tiger install, but I presume someone has it working under Leopard by now. Anyway this thread still has good info on compiling OS X ports. Need more OS X ports!

                  Comment

                  • Lebannen
                    Apprentice
                    • Apr 2008
                    • 61

                    #10
                    Did you see the recent thread on OS X ports of variants, chem?

                    Comment

                    • chem
                      Adept
                      • Sep 2007
                      • 150

                      #11
                      Originally posted by Lebannen
                      yes, good stuff. I wanted to bump this thread anyway :P

                      Comment

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