Building EDuke32 on Linux: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Bioman (talk | contribs)
update page
Line 11: Line 11:
* [http://dukeworld.duke4.net/eduke32/synthesis Source tarballs] (Lite subversion, it does not include metadata, Apple compiled libraries, third-party jaudiolib and Photoshop files).
* [http://dukeworld.duke4.net/eduke32/synthesis Source tarballs] (Lite subversion, it does not include metadata, Apple compiled libraries, third-party jaudiolib and Photoshop files).
* [http://dukeworld.duke4.net/eduke32/old_versions/source_code/ Older versions].
* [http://dukeworld.duke4.net/eduke32/old_versions/source_code/ Older versions].


==Prerequisites for the build==
==Prerequisites for the build==
Line 23: Line 22:


Note: Ubuntu Terminal Command for full install of Prerequisites ''$ sudo apt-get install build-essential libsdl1.2-dev libsdl-mixer1.2-dev nasm libstdc++6-4.3-dev libgtk2.0-dev''
Note: Ubuntu Terminal Command for full install of Prerequisites ''$ sudo apt-get install build-essential libsdl1.2-dev libsdl-mixer1.2-dev nasm libstdc++6-4.3-dev libgtk2.0-dev''


==Build the EDuke32==
==Build the EDuke32==
Line 34: Line 32:
If it fails again, you can try with another version of GCC, for example :
If it fails again, you can try with another version of GCC, for example :
<pre>make CC=gcc-4.3</pre>
<pre>make CC=gcc-4.3</pre>


==Confirm successful compile==
==Confirm successful compile==
Line 42: Line 39:
* eduke32.sym (this file doesn't seem to be created in newer versions)
* eduke32.sym (this file doesn't seem to be created in newer versions)
* eduke32 (exectuable)
* eduke32 (exectuable)


==Use the game files==
==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.
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!==
==Run the game!==
Line 71: Line 66:
==How==
==How==
All you'll have to do to get EDuke32 to run from anywhere is copy the eduke32 and mapster32 binaries to /usr/local/bin. After doing this, copy the ''duke3d.grp'' file to /usr/local/share/games/eduke32 or ~/.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/local/bin. After doing this, copy the ''duke3d.grp'' file to /usr/local/share/games/eduke32 or ~/.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 =
= Notes =

Revision as of 08:57, 22 November 2010

Compiling From Source

Installation Notes

  • You need an actual copy of Duke Nukem 3D. The shareware version can be found here
  • 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.

Getting source files

  • Current version (You need to install the subversion program) :
svn co https://eduke32.svn.sourceforge.net/svnroot/eduke32 eduke32
  • Source tarballs (Lite subversion, it does not include metadata, Apple compiled libraries, third-party jaudiolib and Photoshop files).
  • Older versions.

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)
  • GTK+ 2.0 development & runtime files
  • libvorbis-devel

Note: Ubuntu Terminal Command for full install of Prerequisites $ sudo apt-get install build-essential libsdl1.2-dev libsdl-mixer1.2-dev nasm libstdc++6-4.3-dev libgtk2.0-dev

Build the EDuke32

In a terminal window move to the EDuke32 sources folder and type make.

NOTE: with eduke32_src_20080924 and older gcc versions (< 4.3) remove; -finline-small-functions -fpredictive-commoning options from debug= options in eduke32/Makefile and build/Makefile. Newer source releases do not have this problem.

NOTE2: If building fails with GCC version 4.4.X, try :

make OPTLEVEL=0

If it fails again, you can try with another version of GCC, for example :

make CC=gcc-4.3

Confirm successful compile

These files should now be present in the EDuke32 directory.

  • mapster32.sym (this file doesn't seem to be created in newer versions)
  • mapster32 (executable)
  • eduke32.sym (this file doesn't seem to be created in newer versions)
  • 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
./eduke32 -g duke3d_hrp.zip hrp_update.zip maphacks.zip eduke32_mus.zip
  • To use the new Polymer HRP you need to pass the -g parameter :
./eduke32 -g polymer_hrp.zip eduke32_mus.zip
  • Using the autoload folder :

Copy mods or HRP files in the ~/.eduke32/autoload folder and it will be automaticaly loaded without additional parameters.


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/local/bin. After doing this, copy the duke3d.grp file to /usr/local/share/games/eduke32 or ~/.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

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

If you want to run Polymer with the HRP you will need to provide the path to polymer_hrp.zip (even if its installed globally): eduke32 -g /path/to/polymer_hrp.zip.

Running EDuke32 with an ATI card is slow for some users. One user has had success with a Radeon 4850 and Fedora 12 with the open source default driver plus the latest Mesa experimental - the game runs smooth and pretty fast.