Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Vanilla (http://angband.oook.cz/forum/forumdisplay.php?f=3)
-   -   Universal Binary? (http://angband.oook.cz/forum/showthread.php?t=127)

fyonn July 9, 2007 19:38

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 July 10, 2007 02:22

No idea how to do a universal binary, but a couple compiles for mac can be picked up here for now:
http://www.ualberta.ca/~aphillip/angband.html
(both intel and ppc)

takkaria July 10, 2007 11:06

Quote:

Originally Posted by Big Al (Post 1415)
No idea how to do a universal binary, but a couple compiles for mac can be picked up here for now:
http://www.ualberta.ca/~aphillip/angband.html
(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.

Omnipact July 10, 2007 20:34

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.

Nolendil July 10, 2007 22:29

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.
http://julien.labatut.free.fr/AboutAngband308.png

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.

Big Al July 11, 2007 03:29

Quote:

Originally Posted by takkaria (Post 1416)
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.)

Quote:

Originally Posted by Nolendil (Post 1425)
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.)
Quote:

Originally Posted by Nolendil (Post 1425)
Was this one compiled from the exact same source revision as the Windows version?

Yes, I believe.

Quote:

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.

fyonn July 11, 2007 18:48

Quote:

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

Nolendil July 11, 2007 20:32

Quote:

Originally Posted by Big Al (Post 1428)
Yes, this a mac-specific thing. I updated the src/osx/English.lproj/main.nib file in the above build.

Nice, thanks.

Quote:

Originally Posted by Big Al (Post 1428)
Yes, I believe.

Ok, so I'll post proper bug reports when I have some time to have another look and test for longer.

Quote:

Originally Posted by fyonn (Post 1442)
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).

Big Al July 12, 2007 06:00

Quote:

Originally Posted by Nolendil (Post 1444)
Weird, it works on my own laptop (native PPC though).

On my intel-MacbookPro, it remembers window positions fine also.

takkaria July 12, 2007 12:40

Quote:

Originally Posted by Big Al (Post 1415)
No idea how to do a universal binary, but a couple compiles for mac can be picked up here for now:
http://www.ualberta.ca/~aphillip/angband.html
(both intel and ppc)

Disk image now at the proper rephial.org website. Thanks for that!


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

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