Universal Binary?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fyonn
    Adept
    • Jul 2007
    • 217

    Universal Binary?

    Hello all,

    just a quickie, I was wondering if a Universal binary for the OS X port might be available at some point? as a fairly portable game in the first place I would hope that not too much work would be involved.

    are there any plans? it's just that it's the only powerpc code running my this laptop atm, and it makes the little fans whirr

    cheers
    dave
  • Big Al
    Swordsman
    • Apr 2007
    • 327

    #2
    No idea how to do a universal binary, but a couple compiles for mac can be picked up here for now:

    (both intel and ppc)
    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

    • takkaria
      Veteran
      • Apr 2007
      • 1951

      #3
      Originally posted by Big Al
      No idea how to do a universal binary, but a couple compiles for mac can be picked up here for now:

      (both intel and ppc)
      Could you please take the PPC version, run "make -f Makefile.osx dist" inside the src/ directory, and then put the resulting .dmg file online? I can distribute it as the official OS X build then.
      takkaria whispers something about options. -more-

      Comment

      • Omnipact
        Rookie
        • Jun 2007
        • 23

        #4
        For a universal binary try command line option (for gcc) '-arch i386,ppc' or something like that.
        If that doesn't work try creating a simple project in xcode, change the options so it creates a universal binary, then examine the console output when it compiles.

        Omni.

        Comment

        • Nolendil
          Adept
          • May 2007
          • 171

          #5
          Just some quick notes concerning the Mac OS X build provided above (thanks, Big Al) :

          The "About Angband" window is not up to date. I don't know if this window is specific to this platform.


          Otherwise, it seems PNG support for tiles is already in. Great.
          However, I found some bugs more or less related with tiles : interpolate seems to do nothing, I can see lines between floor tiles when font size is not 32, equippy chars won't be displayed when "double wide" (shouldn't it be '"width", btw?) is enabled, "Appearance" menu is sometimes not refreshed, display is not correctly refreshed when changing font size...
          Anyway I still can't manage to play correctly with tiles (just killed my first character at dlvl 2 by stepping on a trap I hadn't noticed which summoned Mughash), I'm switching back to ascii. At least I gave it another try

          It seems roguelike keys and messages are a bit messed up too but I didn't look too far.

          As this thread is not the most appropriate place, I'll submit those to the bug tracker (along with the others I find) when we have a more official Mac OS X build on which I can test again (was this one compiled from the exact same source revision as the Windows version?).

          PS :
          Just noticed something that might be nasty.
          As stated on another thread, under Mac OS X, the data directory containing the .raw files is put inside ~/Library/Preferences/Angband/ so both of my current installs of Angband (3.0.6 and 3.0.8) must read them from there.
          If some changes were made to the edit files between the 2 versions (and I suppose there are), may this produce some weird behaviour or at least not take some changes into account?
          Could the data directory be moved to Angband.app/Contents/Resources/lib/ with the rest, in the next Mac OS X build? The other shared directories should cause few troubles I suppose (bone, save, score) but I'm skeptic about this one.
          Last edited by Nolendil; July 11, 2007, 00:09.
          A(3.2.0) C "Angdiira II" DP L:36 DL:44(2200') A+ R+ Sp w:Whip of Westernesse(+10,+10)(+2)
          A Mx H- D c-- f- PV+ s- d P++ M+
          C- S-- I So B++ ac GHB- SQ+ RQ++ V+

          Comment

          • Big Al
            Swordsman
            • Apr 2007
            • 327

            #6
            Originally posted by takkaria
            Could you please take the PPC version, run "make -f Makefile.osx dist" inside the src/ directory, and then put the resulting .dmg file online? I can distribute it as the official OS X build then.
            You can grab the distribution (PPC) build from the above website now. Good to know about the 'dist' option. (The only way that I made a PPC version and an intel version was compiling it on a PPC and intel-based computer respectively.)

            Originally posted by Nolendil
            The "About Angband" window is not up to date. I don't know if this window is specific to this platform.
            Yes, this a mac-specific thing. I updated the src/osx/English.lproj/main.nib file in the above build. It still needs to be updated in the source though (I can post a copy of the main.nib here to if needed since nib files seem rather hard to edit without XCode/InterfaceBuilder.)
            Originally posted by Nolendil
            Was this one compiled from the exact same source revision as the Windows version?
            Yes, I believe.

            Originally posted by Nolendil
            Could the data directory be moved to Angband.app/Contents/Resources/lib/ with the rest, in the next Mac OS X build? The other shared directories should cause few troubles I suppose (bone, save, score) but I'm skeptic about this one.
            Agreed with this. I often have several versions on Angband on my system.

            Regarding universal binaries: I tried adding to the CFLAGS (in makefile.osx) "-arch ppc -arch i386" (which I'm told is the proper way to make a universal binary). Trying this, it compiled all the files fine until it got to main-crb.c, at which point it ran into problems (too advanced for me). Anyway, I think that any mac new enough to be intel-based is fast enough not to be noticeably hampered by running a PPC version, so just did a PPC version in the above build.
            Last edited by Big Al; July 11, 2007, 03:34.
            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

            • fyonn
              Adept
              • Jul 2007
              • 217

              #7
              Originally posted by Big Al
              Anyway, I think that any mac new enough to be intel-based is fast enough not to be noticeably hampered by running a PPC version, so just did a PPC version in the above build.
              whilst all the intel mac's are easily fast enough to run angband PPC, the rosetta emulation core it what works the machine a bit. the noticeable aspect is that it kicks the fans up on a laptop okay, okay, I'm nitpicking I know but hey, you gotta try haven't you

              glad to see some action though

              now I just need my level 13 paladin to survive a bit longer...

              PS. oh, how about remembering the window positions for the subwindows? whenever I reload angband, it forgets them all

              Comment

              • Nolendil
                Adept
                • May 2007
                • 171

                #8
                Originally posted by Big Al
                Yes, this a mac-specific thing. I updated the src/osx/English.lproj/main.nib file in the above build.
                Nice, thanks.

                Originally posted by Big Al
                Yes, I believe.
                Ok, so I'll post proper bug reports when I have some time to have another look and test for longer.

                Originally posted by fyonn
                PS. oh, how about remembering the window positions for the subwindows? whenever I reload angband, it forgets them all
                Weird, it works on my own laptop (native PPC though).
                Last edited by Nolendil; July 11, 2007, 20:40.
                A(3.2.0) C "Angdiira II" DP L:36 DL:44(2200') A+ R+ Sp w:Whip of Westernesse(+10,+10)(+2)
                A Mx H- D c-- f- PV+ s- d P++ M+
                C- S-- I So B++ ac GHB- SQ+ RQ++ V+

                Comment

                • Big Al
                  Swordsman
                  • Apr 2007
                  • 327

                  #9
                  Originally posted by Nolendil
                  Weird, it works on my own laptop (native PPC though).
                  On my intel-MacbookPro, it remembers window positions fine also.
                  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

                  • takkaria
                    Veteran
                    • Apr 2007
                    • 1951

                    #10
                    Originally posted by Big Al
                    No idea how to do a universal binary, but a couple compiles for mac can be picked up here for now:

                    (both intel and ppc)
                    Disk image now at the proper rephial.org website. Thanks for that!
                    takkaria whispers something about options. -more-

                    Comment

                    • LoneIgadzra
                      Rookie
                      • Aug 2007
                      • 1

                      #11
                      Hey guys, the PPC build of Angband 3.0.9 gives me the following error when run:

                      Cannot create the '/var/root/Library/Preferences/Angband/scores/scores.raw' file!

                      The 'lib' directory is probably missing or broken. Perhaps the archive was not extracted correctly. See the 'readme.txt' file for more information.
                      As far as I can tell, it's compiled wrong or something. The path should be '~/Library/Preferences/Angband/scores/scores.raw'. I mean it's no wonder it can't write to /var without root privileges.

                      (To say nothing of the fact I'm on an Intel Mac, and would also like to know how to make a UB version.)

                      Comment

                      • Big Al
                        Swordsman
                        • Apr 2007
                        • 327

                        #12
                        Heh, odd. I tested this on both 'standard' and 'admin' accounts on both intel and PPC macs when I compiled it (and again just now). In all four cases, angband put the score, save, etc. files exactly where it should be in '~/Library/Preferences/Angband/...'. I'm on a Intel Core Duo, 2GHz, Macbook Pro, OS 10.4.9 and works fine.

                        Figuring out how to do a UB build is on my list of things to do, but I suspect that I don't really know enough about macs and/or compiling to make one. I'll look into it one of these days.
                        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

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