How to build Lix on a Linux machine =================================== I expect that Mac builds will be very similar to Linux builds. I don't have a Mac to test. Follow the same Install a D environment ----------------------- You need: * a D compiler: I encourage LDC. DMD is also supported, GDC is untested. * the D standard library Phobos (might be called libphobos or liblphobos), * the build system dub. Look into your package manager how to install these. E.g., for Arch linux, you can install the group package "dlang" to get everything. On other systems, look for packages called "ldc"/"ldc2" and "dub". If you don't use a package manager, here are some links. LDC from here might already ship with Phobos? Experiment. https://github.com/ldc-developers/ldc/releases http://dlang.org/download.html https://code.dlang.org/download Is LDC or DMD better? If you only build Lix occasionally, use LDC. Its compile times are longer, but it produces faster code. DMD is best for debugging versions, it compiles Lix faster than any other compiler would. Install required libraries -------------------------- Even though dub can download the libraries' D bindings from the dub website and install them in ~/.dub for you, it cannot install the shared libraries themselves to your system. This part of the instructions is about installing binary files that can be called from various programming languages. It's not particular to D. If you use a package manager, install: * pkgconf * On Arch/Debian/Ubuntu, this is package "pkgconf". * On Fedora 29, this is package "pkgconf-pkg-config". * Allegro 5 * On Arch, this is package "allegro". * On Debian/Ubuntu, this is package "liballegro5-dev". * On Fedora 29, you need the 5 packages "allegro5-devel", "allegro5-addon-acodec-devel", "allegro5-addon-audio-devel", "allegro5-addon-image-devel", and "allegro5-addon-ttf-devel". * enet * On Arch, this is package "enet". * On Debian/Ubuntu, this is package "libenet-dev". * On Fedora 29, this is package "enet-devel". After you've installed these via package manager, skip the next section "Installing dependencies manually", instead proceed with "Build Lix" below. Installing dependencies manually -------------------------------- (Skip this section if you've installed the libraries by package manager, see above.) If you prefer to build or install Allegro 5 manually (not via package manager), install the following libraries in the order listed because Allegro 5 relies on everything above it. You can get away without dumb, but Lix won't play any tracked music then. * pkgconf or pkg-config * zlib * libpng * libvorbis * freetype * dumb 2.0 or 0.9.3 * Allegro 5 * enet Now (since August 2016), I rely on enet 1.3.x. Download it from enet.bespin.org, or clone from github: git clone https://github.com/lsalzman/enet Lix uses enet via Derelict-enet. Derelict is a set of D library bindings and wants dynamically linked libraries, not static libraries. Therefore, we will build enet as a shared object: autoreconf -vfi ./configure --enable-shared=yes --enable-static=no make sudo make install If the game doesn't find the newly-built lib, run sudo /sbin/ldconfig. Build Lix --------- Open a shell, navigate to Lix's root directory, and run: dub build This builds a debug version. To play the game, run: ./bin/lix If the debugging version compiles, links, and runs with no problems, build a release version for performance: dub build -b release --compiler=ldc Add music --------- Lix has music, but the music is not in version control. I encourage you to add the music for a more complete experience. To get the music, download: http://www.lixgame.com/dow/lix-music.zip Extract this into Lix's directory, you'll get a subdirectory `./music/'. Get help -------- If you run into any kind of roadblock, don't be shy and ask: Web: http://www.lixgame.com Issues: https://github.com/SimonN/LixD/issues E-Mail: s.naarmann@gmail.com IRC: irc.quakenet.org #lix, I'm SimonN or SimonNa Forums: lemmingsforums.net, I'm Simon