Building EDuke32 on Linux: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
Prelude
= Compiling From Source =
==Installation Notes==
* You need an actual copy of Duke Nukem 3D. The shareware vesion can be found here. [http://www.3drealms.com/duke3d/]
* Proper 3d acceleration drivers. NVIDIA has classically had the best linux drivers. Ubuntu/Debian can use <code>envyng</code>.
* Proper MIDI install. The eduke32 will appear to "randomly" crash without one. Use <code>timidity</code> for an easy software midi solution.


All Linux distributions do pretty much the same things but a bit different. Below are some instructions for getting EDuke32 running on Fedora 6, 7, or 8.
==Acquire & unzip the source packages==
You need the eduke32 source source files. Download them to from [http://www.eduke32.com/downloads here]. Once you have download it unzip it. You should have a folder like "eduke32_src_xxxx".


==Prerequisites for the build==
Linux needs some packages installed before you can properly build.
* basic dev environment (gcc, make, etc); Ubuntu package build-essential
* SDL development & runtime files (ubuntu packages libsdl1.2-dev  libsdl-mixer1.2-dev)
* nasm
* libstdc++ (part of build-essential)


 
==Build the EDuke32==
Installation Notes:
<br />
# You need an actual copy of Duke Nukem 3D. The shareware vesion can be found here. [http://www.3drealms.com/duke3d/]
# Proper 3d acceleration drivers. NVIDIA has classically had the best linux drivers. Ubuntu/Debian can use <code>envyng</code>.
# Proper MIDI install. The eduke32 will appear to "randomly" crash without one. Use <code>timidity</code> for an easy software midi solution.
 
 
'''Step #1 - You need to acquire and unzip the source packages for EDuke32. '''
 
You need the eduke32 source source files. Download them to your desktop from [http://www.eduke32.com/downloads here]. Once you have download it, you must unzip , as a result, you will have the folder: "eduke32_src_xxxx".
 
 
'''Step #2 - Prepare Linux for the build process'''
 
Fedora needs some packages installed before you can properly build the required files. So, what files do you need? Under Yum Extender GUI or in a terminal window you need to install these files. Here's the list:
 
# basic dev environment (gcc, make, etc); Ubuntu package build-essential
# SDL development & runtime files (ubuntu 8.04 packages were libsdl1.2-dev  libsdl-mixer1.2-dev)
# nasm
# libstdc++
 
 
'''Step #3 - Building the EDuke32 files.'''
 
In a terminal window move to the "duke3d" folder and type <code>make</code>.
In a terminal window move to the "duke3d" folder and type <code>make</code>.


NOTE: with eduke32_src_20080924 and newer gcc versions (4.2.3) remove; <code>-finline-small-functions -fpredictive-commoning</code> options from <code>debug=</code> options in <code>eduke32/Makefile</code> and <code>build/Makefile</code>
NOTE: with eduke32_src_20080924 and newer gcc versions (4.2.3) remove; <code>-finline-small-functions -fpredictive-commoning</code> options from <code>debug=</code> options in <code>eduke32/Makefile</code> and <code>build/Makefile</code>


==Confirm successful compile==
These files should now be present in the eduke32 directory.
* mapster32.sym
* mapster32 (executable)
* eduke32.sym
* eduke32 (exectuable)


'''Step #4 - Confirm that the following files were created.'''
==Use the game files==
 
You need to have the original Duke Nukem files and the newly created EDuke32 executables in the same place. So, you could create a new folder (example eduke32_linux) and copy the original game files and the newly created EDuke32 executables there.
# mapster32.sym
# mapster32 (executable)
# eduke32.sym
# eduke32 (exectuable)
 
'''Step #5 - Combine all the files.'''
 
You need to have the original Duke Nukem files and the newly created EDuke32 files in the same place. So, you could create a new folder on your desktop (example eduke32_linux) and copy the original game files and the newly created EDuke32 files there.
 
 
'''Step #6 - Run the game!'''


==Run the game!==
To run the game open up a terminal window, move to the proper directory and type:
To run the game open up a terminal window, move to the proper directory and type:
<code>./eduke32</code>
<code>./eduke32</code>


If you have done everything correctly then the game should run great.
= Installing EDuke32 globally =
 
==Why==
== Installing EDuke32 globally ==
Installing EDuke32 as an application that you could run anywhere brings some useful advantages and is surprisingly easy to do.
Installing EDuke32 as an application that you could run anywhere brings some useful advantages and is surprisingly easy to do.


EDuke32 will use the directory you are currently in as the directory to work in, as well as ~/.eduke32 (/home/yourname/.eduke32). This means that you could have a directory, copy a Duke Nukem TC (or mod) in there, cd to that directory and run the global EDuke32 binary without having to make even more copies of the same EDuke32 binaries. EDuke32 will adapt to use the GAME/USER.CON files it finds in the CURRENT directory.
EDuke32 will use the directory you are currently in as the directory to work in, as well as ~/.eduke32 (/home/yourname/.eduke32). This means that you could have a directory, copy a Duke Nukem TC (or mod) in there, cd to that directory and run the global EDuke32 binary without having to make even more copies of the same EDuke32 binaries. EDuke32 will adapt to use the GAME/USER.CON files it finds in the CURRENT directory.


 
==How==
'''How?'''
 
All you'll have to do to get EDuke32 to run from anywhere is copy the eduke32 and mapster32 binaries to /usr/bin. After doing this, copy (or move) the Duke Nukem GRP file to /home/yourusername/.eduke32 (it's hidden, so try to cd to it or show hidden files). After this you'll be able to run EDuke32 from any directory on your hard disk!
All you'll have to do to get EDuke32 to run from anywhere is copy the eduke32 and mapster32 binaries to /usr/bin. After doing this, copy (or move) the Duke Nukem GRP file to /home/yourusername/.eduke32 (it's hidden, so try to cd to it or show hidden files). After this you'll be able to run EDuke32 from any directory on your hard disk!


 
= Notes =
 
== Lowercase/Uppercase problems ==
 
== Notes ==
 
=== Lowercase/uppercase problems ===
'''Shareware'''
'''Shareware'''
<br />If you are using the Shareware files located on the 3D Realms website, after you build and combine all the files into one folder and try to run the game you will get an error about the TABLES.DAT file. To correct the error simply rename the DUKE3D.GRP to all lowercase letter. After that the game should run.
If you are using the Shareware files located on the 3D Realms website, after you build and combine all the files into one folder and try to run the game you will get an error about the TABLES.DAT file. To correct the error simply rename the DUKE3D.GRP to all lowercase letter. After that the game should run.
 


'''Maps with extra resources'''
'''Maps with extra resources'''
<br />Some maps that include extra resources might have trouble finding these new files (for example, an older version of Duke Plus won't be able to find Step#.wav and Grate#.wav sounds). The EDuke32 log will output a "file not found" error every time this happens. To fix this, change the names of these files to match the exact case given in EDuke32's log (for example, GRATE#.wav instead of Grate#.wav).
Some maps that include extra resources might have trouble finding these new files (for example, an older version of Duke Plus won't be able to find Step#.wav and Grate#.wav sounds). The EDuke32 log will output a "file not found" error every time this happens. To fix this, change the names of these files to match the exact case given in EDuke32's log (for example, GRATE#.wav instead of Grate#.wav).
 


'''ART file inconsistency'''
'''ART file inconsistency'''
While most standard resources are referred to as UPPERCASE by EDuke32 (for example, GAME.CON), ART files are not as consistent and should be renamed to lowercase if you want to use custom art (tiles014.art instead of TILES014.ART).
While most standard resources are referred to as UPPERCASE by EDuke32 (for example, GAME.CON), ART files are not as consistent and should be renamed to lowercase if you want to use custom art (tiles014.art instead of TILES014.ART).


=== Running with HRP Notes ===
== Running with HRP Notes ==
* Running EDuke32 with an ATI card is slow for some reason. Even though most ATI cards are supported in Linux nowadays.
Running EDuke32 with an ATI card is slow for some reason. Even though most ATI cards are supported in Linux nowadays.
 
A WIP kind of like DNF. ;)

Revision as of 20:38, 9 October 2008

Compiling From Source

Installation Notes

  • You need an actual copy of Duke Nukem 3D. The shareware vesion can be found here. [1]
  • Proper 3d acceleration drivers. NVIDIA has classically had the best linux drivers. Ubuntu/Debian can use envyng.
  • Proper MIDI install. The eduke32 will appear to "randomly" crash without one. Use timidity for an easy software midi solution.

Acquire & unzip the source packages

You need the eduke32 source source files. Download them to from here. Once you have download it unzip it. You should have a folder like "eduke32_src_xxxx".

Prerequisites for the build

Linux needs some packages installed before you can properly build.

  • basic dev environment (gcc, make, etc); Ubuntu package build-essential
  • SDL development & runtime files (ubuntu packages libsdl1.2-dev libsdl-mixer1.2-dev)
  • nasm
  • libstdc++ (part of build-essential)

Build the EDuke32

In a terminal window move to the "duke3d" folder and type make.

NOTE: with eduke32_src_20080924 and newer gcc versions (4.2.3) remove; -finline-small-functions -fpredictive-commoning options from debug= options in eduke32/Makefile and build/Makefile

Confirm successful compile

These files should now be present in the eduke32 directory.

  • mapster32.sym
  • mapster32 (executable)
  • eduke32.sym
  • eduke32 (exectuable)

Use the game files

You need to have the original Duke Nukem files and the newly created EDuke32 executables in the same place. So, you could create a new folder (example eduke32_linux) and copy the original game files and the newly created EDuke32 executables there.

Run the game!

To run the game open up a terminal window, move to the proper directory and type: ./eduke32

Installing EDuke32 globally

Why

Installing EDuke32 as an application that you could run anywhere brings some useful advantages and is surprisingly easy to do.

EDuke32 will use the directory you are currently in as the directory to work in, as well as ~/.eduke32 (/home/yourname/.eduke32). This means that you could have a directory, copy a Duke Nukem TC (or mod) in there, cd to that directory and run the global EDuke32 binary without having to make even more copies of the same EDuke32 binaries. EDuke32 will adapt to use the GAME/USER.CON files it finds in the CURRENT directory.

How

All you'll have to do to get EDuke32 to run from anywhere is copy the eduke32 and mapster32 binaries to /usr/bin. After doing this, copy (or move) the Duke Nukem GRP file to /home/yourusername/.eduke32 (it's hidden, so try to cd to it or show hidden files). After this you'll be able to run EDuke32 from any directory on your hard disk!

Notes

Lowercase/Uppercase problems

Shareware If you are using the Shareware files located on the 3D Realms website, after you build and combine all the files into one folder and try to run the game you will get an error about the TABLES.DAT file. To correct the error simply rename the DUKE3D.GRP to all lowercase letter. After that the game should run.

Maps with extra resources Some maps that include extra resources might have trouble finding these new files (for example, an older version of Duke Plus won't be able to find Step#.wav and Grate#.wav sounds). The EDuke32 log will output a "file not found" error every time this happens. To fix this, change the names of these files to match the exact case given in EDuke32's log (for example, GRATE#.wav instead of Grate#.wav).

ART file inconsistency While most standard resources are referred to as UPPERCASE by EDuke32 (for example, GAME.CON), ART files are not as consistent and should be renamed to lowercase if you want to use custom art (tiles014.art instead of TILES014.ART).

Running with HRP Notes

Running EDuke32 with an ATI card is slow for some reason. Even though most ATI cards are supported in Linux nowadays.