These instructions are for the source tarball from the stable Slash’EM Page (0.0.7E7F3 at the time of this writing). I assume that you have unpacked it and moved your bash to the top of the extracted filesystem.
pushd sys/unix/ ; sh setup.sh
You have to uncomment the BSD #define in line #22 of include/unixconf.h
, then change line #963 of win/tty/termcap.c
(this is a single line):
#if !defined(LINUX) && !defined(__FreeBSD__) && !defined(__APPLE__) && !defined(__MACH__)
Next comment out line #340 of the generated src/Makefile
, and uncomment the line above (WINTTYLIB = -lncurses
). Also make sure you set PREFIX
, GAMEUID
and GAMEGRP
from Makefile
to sensible values (example):
PREFIX = /Users/dirk/install
GAME = slashem
# GAME = slashem.prg
GAMEUID = dirk
GAMEGRP = staff
As suggested by Patric, instead of modifying GAMEUID
and GAMEGRP
, you can also edit the two lines that set CHOWN
and CHGRP
, and simply set them to true
:
CHOWN = true
CHGRP = true
Then all there is left to do is to compile and install:
make
make install
If everything went fine, you will have your slashem binary in ~/install/games/local/bin
. To start it cd there and invoke it in your bash: ./slashem
.
To customize, I added the following line to .bash_profile:
export SLASHEMOPTIONS="@.slashem.rc"
And the file ~/.slashem.rc
with the following contents:
OPTIONS=DECgraphics,number_pad:0,time,autopickup,showexp,pickup_types:$!?+"=/,name:Dirk
OPTIONS=norest_on_space
OPTIONS=runmode:walk
OPTIONS=color
OPTIONS=!hilite_pet
Your config will probably vary.
Have fun playing!
If you set CHOWN,CHGRP,CHMOD to true, the game gets automatically installed as the current user.
I would be interested how to package this compiled version in a mac-like way.
Oh yes, will change that (never saw that comment in the Makefile).
As for packaging I think you have to patch it so it doesn’t rely on NETHACKDIR anymore, and probably mess with the dlb stuff, and also do some tricks with AppleScript to start it in a terminal.
Okay so I am familiar with computers but not at all with coding in terminal or any other program. I really enjoy NetHack and Slash’Em seems like it would enhance that but I can only run OSX so I have to do these adjustments(I’m guessing) to the files within the zipped out file but I really have no idea where to start. I know a bash file is the first item in terminal or something but apart from that I am clueless. I think that once I got started with it I could make the nescesary changes but the problem is I don’t know where to start.
Please help 🙂
What exactly do you want to achieve?
If you just want to play Slash’EM I have a dist ready for download: http://code.google.com/p/slashem-macosx/downloads/list (just unzip and double click the executable).
There is also a native Mac OS X port of NetHack in the making based on my iHack code base (will soon blog about it). This will behave like any other app.
If you need/want to compile Slash’EM yourself let me know and I can give you some more pointers.
Sweet thanks Dirk, so the slash’em you have posted will only run in terminal and not like regular nethack? What I mean by this is that it won’t load in graphical form but only in ASCI?
Yes it’s ASCII terminal only, as are the instructions on this page. For gfx on Mac you need to build for X or Qt.