Skip to main content

Compiling for Linux

ViLE is an open source project at heart, so in an effort to make our technically minded users more comfortable with the build system, as well as helping users of non-supported systems compile a native version, we will document the build process for you. In this first article we will install the necessary software and compile ViLE using a stock Ubuntu 10.10 installation. Later we will follow up and show you how to install tool chains and use the build system to cross-compile native versions for Windows and OSX, so pay attention to these initial steps!



Prerequisites

Lets start off by downloading some software. The last few packages are optional as they provide optional support for formats such as mp3, ogg, etc.

Update: We now offer binary support for Ubuntu

sudo apt-get install build-essential automake autoconf libsdl1.2-dev libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev libavcodec-dev libavformat-dev libswscale-dev libmikmod2-dev libogg-dev libflac-dev libsmpeg-dev

Ubuntu offers packages for the SDL_mixer library as well, but it is old, buggy and not supported by ViLE, so we have to compile this one manually. Just download the latest version from http://www.libsdl.org/projects/SDL_mixer/ and download it like this (Third step is kinda dirty, but it saves a lot of work when configuring SDL):

tar xzvf SDL_mixer-1.2.11.tar.gz
cd SDL_mixer-1.2.11
./configure --prefix=/usr/
make
sudo make install



ViLE

With all the dependencies installed on your system you are ready to build ViLE itself (Here we will compile a published tarball, but compiling from git is exactly the same except that you have to run ./autogen to generate the buildscripts). If you experience any trouble in this stage, you might want to temporarily drop some requirements by appending --disable-video and --disable-audio to the configure string:

tar xzvf ViLE-0.3.24.tar.gz
cd ViLE-0.3.24
./configure
make
sudo make install

You can now launch a game by passing ViLE a directory with game resources like this:
vilevn --game DIRECTORY