Back home
Building WinQuake for Linux
This tutorial describes how to build squake and quake.x11. I don't have
a 3dfx card, so I won't go into building qlquake.3dfxgl ( although it should
relatively straight forward if you've got everything installed ). I will
try glquake in a later installment.
My system is a Redhat 6.1 on a Celeron 300A ( clocked at 450 ) with 128MB RAM.
I have a Soundblaster AWE 64. I'm running kernel version 2.3.25.
Building squake and quake.x11
- cp q1source.zip to a directory ( for the purpose of this
tutorial, I'm assuming "/usr/src" ) and unzip q1source.zip.
Once q1source.zip is unpacked, you should have two directories, QW
for QuakeWorld and WinQuake for, you guessed it: WinQuake! There's
also a couple text files, including the GPL license.
- cd /usr/src/WinQuake and mv Makefile.linuxi386 Makefile
( I couldn't get make -f Makefile.i386 to work, so renaming
to Makefile is the easiest thing to do... )
- Now, we need to edit Makefile ( using vi or emacs or whatever ).
We have to make a few system-specific modifications, so here goes:
- make the following chage to line 16:
"GLIBC=-glibc" to "GLIBC=.glibc"
This may seem strange, but when we're building the rpm, the dash
is flagged as an illegal character... All this affects is the
names of a few things.
- change "MOUNT_DIR" to your source dir, in this case "/usr/src/WinQuake".
- change "MASTER_DIR" to point to where the maps, etc. are located.
For instance, I have mine on the CD ( which is mounted at "/mnt/cdrom" ).
Therefore, I set "MASTER_DIR=/mnt/cdrom". If you have the
shareware version or quake already installed, just point "MASTER_DIR"
to that directory ( I believe it's quake_sw ).
- If you have Mesa installed and/or want to build the 3dfx version, then
update "MESA_DIR" and "TDFXGL_DIR", respectively. Also, change instances
of "Mesa-2.6" to the version you're using ( e.g. "Mesa-3.1" ).
- Now change "EGCS" to point to your C++ compiler. In RH 6.1, it's in
"/usr/bin", so I set "EGCS=/usr/bin/egcs". If you don't know where the
C++ compiler is, try "whereis egcs".
- Now, because I don't yet want to build glquake and qlquake.3dfxgl, I'm
going to comment out those targets and move quake.x11 up. Watch those "\"s
Therefore, lines 68-73 should look like this:
TARGETS=$(BUILDDIR)/bin/squake \
$(BUILDDIR)/bin/quake.x11
#$(BUILDDIR)/bin/glquake \
#$(BUILDDIR)/bin/glquake.glx \
#$(BUILDDIR)/bin/glqlquake.3dfxglgl \
# $(BUILDDIR)/bin/unixded
You can comment out the gl and 3dfx directory creation in "build_debug" "build_release"
if you want, but it really makes no difference.
- If you use Redhat and want to build the rpm, go to line 1111 and comment
out any of the targets you didn't build, in this case glquake, etc. Then
at line 1129 ( and on ), comment out the cp instructions for the targets
you didn't build.
- Now, from "/usr/src/WinQuake", type make build_release or make build_debug.
This should build the release version of Quake.
- That's it! Check "/usr/src/WinQuake/releasei386.glibc/bin" and your targets, in
this case squake and quake.x11 should be in there!
Building the quake rpm
- This part is a pain...
- edit quake.spec.sh and remove any of the targets ( and libs ) you didn't create.
- If you're building from the shareware version, comment-out any references to pak1.pak
by editing quake-data.spec and Makefile.
- If you don't have hipnotic and/or rogue, comment out those targets on
line 1108 ( i.e. the line defining rpm: ).
- This is strange, but all the files in "/usr/src/WinQuake/data" are in upper-case, but
they're referenced in lower case, so mv 'em all to lower case.
- su to root and from "/usr/src/WinQuake", type make rpm.
- This should create two rpm files ( quake and quake-data ) in "/usr/src/WinQuake/RPMS".
- Use rpm -Uvh quake*.rpm to install!
Questions and Comments to:church@webzone.net