Sophie

Sophie

distrib > Mandriva > 2010.0 > x86_64 > by-pkgid > cb0ef37e45731c65404a70dd167b3673 > files > 4

d2x-rebirth-0.55.1-3mdv2010.0.x86_64.rpm

Compiling D2X-Rebirth Sourcecode

This file describes how to compile D2X-Rebirth from Source.


Requirements

   1.
      C/C++ compiler (gcc/g++)
   2.
      SCons
   3.
      SDL(-devel)
   4.
      PhysFS(-devel)
   5.
      GLU/GL
   6.
      NASM (optional for Assembler-based Texture-mapper in non-OpenGL Build)


Compiling

For Mac OS X, an Xcode project is available (requires Xcode 2.1 or later). Xcode includes the compiler and OpenGL. For Mac OS 9, an MPW Makefile is available. MPW includes the compiler. For the sources to compile, they will need to be made into text files using a typecode changing program, if they were downloaded outside of Mac OS 9 (including Mac OS X). This will also need to be done after any Terminal command (diff, svn update etc) edits the source files.

The SConstruct file provides various options to compile this program.
To get a full list of all available commands, type scons -h within the Source directory.

Currently, the following variables are supported:

'sharepath=DIR'   (non-Mac OS *NIX only) use DIR for shared game data. (default: /usr/local/share/games/d2x-rebirth)
'sdl_only=1'      don't include OpenGL, use SDL-only instead
'sdlmixer=1'      use SDL_Mixer for sound (includes external music support)
'asm=1'           use ASSEMBLER code (only with sdl_only=1, requires NASM and x86)
'debug=1'         build DEBUG binary which includes asserts, debugging output, cheats and more output
'profiler=1'      do profiler build
'editor=1'        build editor !EXPERIMENTAL!
'arm=1'           compile for ARM architecture

‘editor’ is currently *not* supported and will not work.

To compile the source, type:

scons


If you wish to add additional commands, just add them to the scons command.
Example:

scons sdl_only=1 asm=1


To install the compiled binary to your system (/usr/local/bin/), type (as root):

scons install

You can also add the ‘install’ command while compile-time. SCons will compile and install the binary right after that.

For Windows and Mac however, it is instead recommended to manually drag the program to the folder containing the Descent data instead of using the install command, or use the -hogdir option when running.

To clean up the source directory after installation, type:

scons -c


Needed files

Since D2X-Rebirth is a Sourceport of the Descent2-Engine you will need the Game-Content data files to run the game.

For non-Mac OS *NIX all data files need to be copied to the Sharepath, which is (if not specified with the SCons ‘sharepath’-variable) /usr/local/share/games/d2x-rebirth/. For all other systems the data files go in the folder containing the application, as with the original version. For *NIX systems (including Mac OS X) there is also the option of placing them in a folder you specify using d2x.ini (see end).

Following files are needed to run the game:

descent2.ham
descent2.hog
descent2.s11
descent2.s22
alien1.pig
alien2.pig
fire.pig
groupa.pig
ice.pig
water.pig
intro-h.mvl and/or intro-l.mvl
other-h.mvl and/or other-l.mvl
robots-h.mvl and/or robots-l.mvl

With the PC version, these files - except the Movies (*.mvl) - are archived in the file

descent2.sow

on the Descent2 CD-Rom.
This is an ARJ-archive and can be extracted with an adapted archiver like ‘unarj’ or by installing the game on a Windows/DOS system. Otherwise, for the Mac CD-ROM, the data files will need to be installed from the CD using a Mac system earler than OS X. Classic will work. If you know of any other way, please tell me at chris at icculus.org.

Note that with non-Mac OS *NIX, the above files must be lowercase.

They may go in a subdirectory called 'Data'.


Optional files

D2X-Rebirth is expandable. You can add additional content to the game.

Supported content:

    *
      Vertigo series AddOn
      Can be added by copying the files

      d2x-h.mvl and/or d2x-l.mvl
      hoard.ham

      with the files required above and

      d2x.hog
      d2x.mn2

      to ‘missions/’ subdirectory. All these files should be located on the ‘Vertigo Series’ CD-Rom

    *
      Custom/AddOn missions
      Those can be found on several websites. Add them to the game by copying them to subdirectory ‘missions/’. They can also go in subdirectories of 'missions/', unlike with the original version.

    *
      Language Packs
      German translation: http://www.dxx-rebirth.com/download/dxx/res/D2XBDE01.zip
      Copy the txb-files to the Sharepath (non-Mac OS *NIX)/program directory (otherwise). Will be activated automatically

    *
      Custom Music (like MP3 or OGG)
      Custom Music can be played either used via the Jukebox by specifying the path to your music in the Sound Options menu.
      Please note that all custom music has to be in 44Khz format.


Launching the program

On Windows and Mac OS, simply double-click "D2X-Rebirth".

After compiling and installing, the program can be launched with the command

d2x-rebirth-gl

or - if it has been compiled with SCons parameter ‘sdl_only=1’ -

d2x-rebirth-sdl

To see a full list of available command-line options append ‘-h’, ‘-?’ to the command or refer file

d2x.ini


On *NIX systems, the game will create a config-directory. On non-Mac *NIX systems this will be called ‘.d2x-rebirth’ and reside in the Home directory of the user.
On Mac OS X this directory will be called ‘D2X Rebirth’, in the Preferences folder in the user’s Library.
On all other systems (Windows and Mac OS 9) the application directory is used.
It is used to read/save

    *
      Configuration files
    *
      Pilot profiles and Savegames
    *
      Demos
    *
      Screenshots
    *
      d2x.ini for parsing command-line arguments (the config directory is searched first, then the directory containing the program)

Thanks to PhysFS, on *NIX systems data files can also go in here. In addition, demos could be moved from the config directory to the Sharepath/program directory to make them viewable by other users.


Appendix

http://DXX-Rebirth.com