Permalink
b9f3a65 May 16, 2016
@mb14 @jangler
116 lines (80 sloc) 3.94 KB

Building on Linux

Since Linux is the primary development platform for Schism Tracker, it's probably the easiest to compile on, and those familiar with automake-based projects will find few surprises here.

Prerequisites

You'll need autoconf, automake, gcc, make, Python and LibSDL at a minimum. Additionally, Git is strongly recommended. If all you're planning on doing is building it once, you can just as easily grab the source tarball from the repository and build from that, but having Git installed makes it easier to keep up-to-date, help with debugging, and (if you're so inclined) development.

See below for distro-specific instructions on how to get everything installed in order to build Schism Tracker.

To get the source:

git clone https://github.com/schismtracker/schismtracker.git
cd schismtracker && autoreconf -i

You can then update your schismtracker source directory by going to this schismtracker directory and running:

git pull

Building Schism Tracker

To build Schism Tracker, you should set up a build-directory. From the schismtracker directory:

mkdir -p build && cd build && ../configure && make

The resulting binary schismtracker is completely self-contained and can be copied anywhere you like on the filesystem.

Packaging Schism Tracker for Linux systems

The icons/ directory contains icons that you may find suitable for your desktop environment. The sys/fd.org/schism.desktop can be used to launch Schism Tracker from a desktop environment, and sys/fd.org/itf.desktop can be used to launch the built-in font-editor.

ALSA problems

The configure script should autodetect everything on your system, but if you don't have the ALSA development libraries installed, Schism Tracker won't be built with ALSA MIDI support, even if your SDL libraries include ALSA digital output.

See below for information on what packages you should install for your distribution in order to build a full-featured Schism Tracker binary.

Cross-compiling Win32

Schism Tracker can be built using the mingw32 cross-compiler on a Linux host. You will also need the SDL MINGW32 development library. If you unpacked it into /usr/i586-mingw32/, you could use the following to cross-compile Schism Tracker for Win32:

mkdir win32-build
cd build
env SDL_CONFIG=/usr/i586-mingw32/sdl-config \
    ../configure --{host,target}=i586-mingw32 --without-x
make

If you want to build an installer using the nullsoft scriptable install system, copy some files into your build directory:

cd build
cp /usr/i586-mingw32/bin/SDL.dll .
cp ../COPYING COPYING.txt
cp ../README README.txt
cp ../NEWS NEWS.txt
cp ../sys/win32/schism.nsis .
cp ../icons/schismres.ico schism.ico

and run the makensis application:

makensis schism.nsis

Distribution-specific instructions

Getting the prerequisites covered is fairly straightforward in most Linux distributions.

Ubuntu / Debian

apt-get install build-essential automake autoconf autoconf-archive    \
                libx11-dev libxext-dev libxv-dev libxxf86misc-dev     \
                libxxf86vm-dev libsdl1.2-dev libasound2-dev mercurial \
                                    libtool

Additionally, for cross-compiling win32 binaries:

apt-get install mingw32 mingw32-binutils mingw32-runtime nsis

Arch Linux

pacman -S base-devel mercurial sdl alsa-lib libxv libxxf86vm

For cross-compiling win32 binaries:

pacman -S mingw-w64-gcc
yaourt -S mingw-w64-sdl nsis

Note: yaourt isn't strictly necessary, but since mingw-w64-sdl and nsis are AUR packages, you'll have to build them by hand otherwise or use a different AUR helper.