Compile spoiler
- From: "Ron Rogers Jr." <CronoCloud@xxxxxxxxx>
- Date: Sun, 05 Mar 2006 02:23:18 GMT
Stanley Myrick writes:
I am also with you about the compile thing. I even went and did a dual boot
install on my PC so that I could try to compile a Linux source package so
that I could get some of the patches to work, and I have not been able to
compile it yet even after hours of effort, research, and more effort.
I am planning to write a Compile Spoiler that actually will help someone
that doesn't know a PC's programming in binary (overstatement there, but I
am pissed too), once I figure out how to compile myself. I will be a hero.
Compiling Nethack from source is a somewhat annoying thing because it uses manual makefile. The nethack source code predates configure scripts I was told. There is a Nethack fork out there that does use configure scripts.
http://auto-nethack.sourceforge.net
But...it is not too difficult to compile the "traditional" way and once you do it, you can follow your "recipe" the next time.
Here's my recipe, which I use to compile Nethack on my PS2 Linux kit, the main difference between my recipe and "normal" x86 Linux is that I add -lc to LIBS
HOWTO compile Nethack on Linux for Playstation 2
by Ron Rogers Jr. Cronocloud@xxxxxxxxx
This HOWTO is oriented towards those who are new to Linux and compiling in
general.
I will try to make as few assumptions as possible, but this will be much easier
if you know how to get around the filesystem in a terminal and are able use the
vi editor in a basic fashion.
What you will need:
A Playstation 2 with the Linux kit installed (and running).
A copy of the nethack source, which can be acquired from:
http://www.nethack.org
Nothing else is necessary. It is possible to download and compile Nethack on
a freshly installed kit. The first person to report compiling Nethack on Linux
for Playstation 2 (outside of Japan anyway) was user name ps2tunes on June 7 of
2002, very soon after kits had shipped to users in North America.
This HOWTO will create a binary with tty (and terminal in x), X11 tiled mode
and QT support. the QT interface does not display does not display well on tele-
visions. Neither does the console tty because of color issues.
Gnome support is experimental and did not compile for me.
Get the sources from http://www.nethack.org. You want the plain unadulterated
source code.
Bring up a terminal window, I tend to use rxvt.
Might as well become root now:
su
then the root password
Put the nethack sources in /usr/src
mv nh343.tgz /usr/src
cd into the /usr/src directory
cd /usr/src
You can now un-archive the tarball:
tar -xvzf nh343.tgz (or whatever tarball you have)
cd into the created directory
let's take a look at what's here:
ls
It should look like this:
Files Porting README dat doc include src sys util win
Read the README:
less README
cd sys/unix chmod a+x setup.sh
../setup.sh
have to edit /include/config.h
enable X11 graphics
enable Qt graphics
enable #define use_xpm
comment out use compress and compress extension
enable use gzip and gz but use /bin/gzip as the path to it.
enable #define DLB
enable score on botl
enable #define autopickup exceptions
edit include/unixconf.h
enable #define Linux
enable #timed delay
edit src/Makefile
enable CC=gcc
enable compile normally cflags and lflags
disable debugging flags
remove comment from LINKS line in QT section
remove tile.o from WINTQTOBJ
add $(WINX11SRC) to WINSRC
add $(WINQTSRC) to WINSRC
add $(WINX11OBJ) to WINOBJ
add $(WINQTOBJ) to WINOBJ
enable WINTTYLIB lncurses
disable WINTTYLIB termlib
add -lXpm to WINX11LIB
ADD $(WINX11LIB) to WINLIB
add $(WINQTLIB) to WINLIB
add -lc to LIBS
edit util/Makefile
enable CC= gcc
enable Linux compile normally CFLAGS and LFLAGS
disable debugging flags
add -lc to LIBS
disable YACC = yacc
disable LEX = lex
enable YACC = bison -y
enable LEX = flex
edit top Makefile
edit these as follows
GAMEGRP = games
GAMEPERM = 02755
FILEPERM = 0664
EXEPERM = 0755
DIRPERM = 0775
disable the first VARDATND
enable # VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm nhsplash.xpm
go into the win/X11
/usr/X11R6/bin/bdftopcf -o nh10.pcf nh10.bdf
/usr/X11R6/bin/bdftopcf -o ibm.pcf ibm.bdf
cp *.pcf /usr/X11R6/lib/X11/fonts/misc/
cd /usr/X11R6/lib/X11/fonts/misc/
mkfontdir
okay return to the nethack source top directory
you will now have to:
export QTDIR=/usr/lib/qt-2.1.0
and type make, and pray
return to /xin/X11 and copy the two .pcf fonts to /usr/games/lib/nethackdir like so:
cp *.pcf /usr/games/lib/nethackdir/
cd /usr/games/lib/nethackdir
mkfondir
xset fp+ /usr/games/lib/nethackdir
exit to normal user enter win/X11 and copy nethack.rc to your home directory
cp Nethack.cnf .nethackrc
edit as cnessary
cp Nethack.ad in /win/X11 to /usr/X11R6/lib/X11/app-defaults/NetHack
edit as follows for tile support
uncomment the tile file line
graphic tombstone
the pet file
the tombstone text
nethack autofocus
Maybe this will help, maybe not.
CronoCloud (Ron Rogers Jr.)
.
- Follow-Ups:
- Re: Compile spoiler
- From: Shawn Moore
- Re: Compile spoiler
- From: dracony
- Re: Compile spoiler
- Prev by Date: Re: menucolor patch
- Next by Date: Re: [OT] Re: the vanished need for posting "context"
- Previous by thread: menucolor patch
- Next by thread: Re: Compile spoiler
- Index(es):
Relevant Pages
|