Welcome to GameHourz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Compiling NH and S on Mac OS X 10.4

 
   Game Forums (Home) -> Roguelike -> Nethack RSS
Next:  Anyone here play NetHack on a PSP yet?  
Author Message
jcrippen

External


Since: May 03, 2006
Posts: 4



(Msg. 1) Posted: Mon May 22, 2006 1:53 am
Post subject: Compiling NH and S on Mac OS X 10.4
Archived from groups: rec>games>roguelike>nethack (more info?)

I recently returned to NH after a couple year hiatus, and in the
interim I had switched from my usual Solaris and Linux boxen to using
Mac OS X on my laptop. I was dismayed to find that precompiled NH
binaries assumed the Mac user's preference for a graphical interface. I
much prefer that which I learned on in the late 80s, a plain old TTY.
So I set out to compile NH for myself, something I hadn't done in
years.

Well, it turns out that NH doesn't compile out of the box on Mac OS X
10.4, at least not with only TTY graphics. I did a little tinkering and
got it to work satisfactorily. After a couple weeks of DYWYPI I started
playing with the recent patches, and eventually ended up trying out
Slash'EM for the first time. That necessitated repeating the whole hack
and compile process over again. Here are my notes so others don't have
to do as much error interpretation as I did.

Share and Enjoy!

---8<--- cut here --->8---

Nethack 3.4.3 won't compile on OS X straight out of the box. The same
appears to be true for Slash'EM 0.8.0E0. These are some basic
instructions on getting either running on OS X 10.4.

First set it up as a Unix, ie go to sys/unix and say "sh setup.sh".

Then edit src/Makefile. Comment out this line
WINTTYLIB = -ltermlib
and uncomment this one
# WINTTYLIB = -lncurses
OS X has ncurses built in, so we want to use it. Using termlib is
broken.

While you're editing Makefiles, in the top level Makefile you may also
want to change GAMEUID and GAMEGRP to "unknown" and "admin"
respectively. This fixes a make install complaint. You can substitute
your username, eg "james" instead of "unknown" if you are on a single
user system.

Next, edit win/tty/termcap.c and comment out this line
extern char *tparm();
I'm not quite certain about the rationale behind this, but I think it's
because we're perhaps using terminfo rather than termcap. Anyway, it
works.

OS X Terminal optimizes text output so Nethack's display-slowing tricks
don't work properly. Instead it should use a timer. Edit the file
include/unixconf.h and uncomment this define (but not the wing comment)
/* #define TIMED_DELAY */ /* usleep() */
For best results, use this in combination with the game options !null
and timed_delay, and set runmode to walk or crawl.

If you like the menucolors patch then there's an additional fix
necessary. I couldn't get USE_REGEX_MATCH in config.h to work for me,
so I commented it out. However, in include/unixconf.h it may be
possible to enable the regex matching if a define is tweaked, but I
haven't tested this. The relevant magic is
#if defined(USE_REGEX_MATCH)
# if defined(__FreeBSD__) || defined(__OpenBSD__)
# define POSIX_REGEX
# else
# define GNU_REGEX
# endif
#endif
Presumably something like || defined(__Darwin__) or whatever should be
added. GNU Regex isn't built in, but a POSIX one does seem to exist (ie
"apropos regex" pointed me to regex(3) which looks BSDish). I'm too
lazy to figure this out because all I want are the blessed and cursed
colors which don't need fancy regexps.

In addition, if you want nicer dungeon walls instead of the -- and | |
cruft, you can use the free (libre) DejaVu Sans Mono font which has
good support for the VT100 line drawing characters. This with Nethack's
DECgraphics option gives nice continuous lines for the dungeon walls
among other minor enhancements. Make sure for your Terminal window you
play Nethack in that the "Wide glyphs for Japanese/Chinese/etc." option
in "Display" is unchecked. Terminal tries to be smart and assumes that
the VT100 line drawing characters (mostly found only in CJK fonts
nowadays) are doublewidth, which is wrong for our purposes. Also
necessary is setting the "Character Set Encoding" to "Unicode (UTF-Cool".

Other Terminal settings I've found pleasant include using white (or 90%
gray) text on black background, a cursor color that is not among the 16
ANSI colors, a block cursor so you can pick out your own @ easily,
disabled scrollback buffer, and a large font size with antialiasing - I
use 20 point on a 15 inch PowerBook G4. To wrap up the whole thing in a
clickable pseudoapp you can use Terminal's "Save As..." and create a
..term file. In the save options select "Execute this command" and put
in something like
/usr/local/games/nethack
but note that you can't type the initial / at first (the dialog tries
too hard to be smart). If you check "Execute command in a shell" you
get a shell after DYWYPI happens so you can return to the dungeons with
ease.

 >> Stay informed about: Compiling NH and S on Mac OS X 10.4 
Back to top
Login to vote
stormy

External


Since: Apr 03, 2006
Posts: 20



(Msg. 2) Posted: Mon May 22, 2006 3:45 am
Post subject: Re: Compiling NH and S on Mac OS X 10.4 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I never had any problems with the precompiled version of nethack for
MacOS X looking strange or anything; it looked the same as the windows
precompiled one to me, but black on white, and a separate window for
messages. Same with precompiled Slash'EM, but that was the macos 9
version, as I couldn't find a OS X one.

 >> Stay informed about: Compiling NH and S on Mac OS X 10.4 
Back to top
Login to vote
jcrippen

External


Since: May 03, 2006
Posts: 4



(Msg. 3) Posted: Mon May 22, 2006 3:15 pm
Post subject: Re: Compiling NH and S on Mac OS X 10.4 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Too many windows for me. I only like playing on plain old terminals.
Plus I can telnet in from elsewhere and play when I'm not at home.

If only I could find a good VT340 (the one with color support) I'd be
in TTY heaven.
 >> Stay informed about: Compiling NH and S on Mac OS X 10.4 
Back to top
Login to vote
Roy L. Fuchs

External


Since: Dec 24, 2005
Posts: 100



(Msg. 4) Posted: Tue May 23, 2006 4:19 am
Post subject: Re: Compiling NH and S on Mac OS X 10.4 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 22 May 2006 01:53:01 -0700, "jcrippen" <jcrippen.RemoveThis@gmail.com> Gave
us:

>I recently...

Hahaha... snip


Why not just run the emulator that the Mac has, and run a
pre-compiled version? It's not like NetHack chews up timeslices while
it waits for your next keystroke entry, so you won't be losing
anything via an emulation setup.

Good job getting it working, BTW. ;-]
 >> Stay informed about: Compiling NH and S on Mac OS X 10.4 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
YASD Ring of what?? - Being the newbie that I am, I decided to equip both the rigs I started with as a wizard. They gotta be good, right? Wrong! First move after checking my inventory, I Put on my Ring of Conflict. Next turn I move to pick up the gold next to me, but I don't....

You hear a loud click! - My useless Samurai, is wandering around Delphi when I get the message "You hear a loud click!" I googled for this message but didn't find anything specific. What the heck does this mean??

[S] barbarian spellcaster - Fip the Level 29 Chieftain's got In:21 and Wi:23, but still he's casting Magic Missile at 100% failure (no metal armor, etc.). Why do Barbarians get a couple classes of unrestricted spellcasting if they can't use it? Am I overlooking something? ..

Stupid Pet Trick: Never lose pets to starvation. (Spoiler) - Stupid Pet Trick: Never lose pets to starvation. Note: In the following: - dog refers to: - small dog - dog - large dog - cat refers to: - kitten - cat - large cat - horse refers to: - pony ...

More than once guilty in the same case? - In my recent game, playing too fast, I got confused by an umber hulk and killed my pet unicorn by accident. Even if I was confused I felt guilty of course (luck-5) and I heared "the rumble of distant thunder" (align-15). So I zapped a turn unde...
   Game Forums (Home) -> Roguelike -> Nethack All times are: Ekaterinburg, Islamabad, Karachi, Tashkent (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]