Skip to content

Instantly share code, notes, and snippets.

@Gumichan01
Last active September 7, 2018 09:48
Show Gist options
  • Save Gumichan01/0731cb32832df3ff293b90601b34e0dc to your computer and use it in GitHub Desktop.
Save Gumichan01/0731cb32832df3ff293b90601b34e0dc to your computer and use it in GitHub Desktop.
LunatiX - Build

How to build LunatiX

This is a simple way to install LunatiX on Linux. This method works on Ubuntu 14.04+ and Debian. It should also work on other Linux distributions.

Duration : 30-60 mins

Commands

Those are the commands you need to execute in order to install Lunatix properly.

# You must install pkg-config first
$ sudo apt install pkg-config

# SDL2 needs those dependencies
$ sudo apt install build-essential mercurial make cmake autoconf automake \
  libtool libasound2-dev libpulse-dev libaudio-dev libx11-dev libxext-dev \
  libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev \
  libxss-dev libgl1-mesa-dev libesd0-dev libdbus-1-dev libudev-dev \
  libgles1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev 

# Optional: You can test the joystick if you want
# $ sudo apt-get install evtest
# You can test the joystick if you want
# $ sudo evtest

# SDL2_image needs those dependencies
$ sudo apt install libjpeg-dev libpng-dev libwebp-dev libtiff5-dev libtiff-opengl 

# SDL2_ttf needs this dependency
$ sudo apt install libfreetype6-dev 

# SDL2_mixer need those dependencies
$ sudo apt install libflac-dev libflac++-dev libogg0 libogg-dev libvorbis-dev liboggz2-dev libmodplug1 \
  libmodplug-dev fluidsynth libfluidsynth* libsmpeg*

# Download SDL2, SDL2_image, SDL2_ttf, SDL2_mixer and execute those commands in each directory
$ ./configure; make; sudo make install

# Note: ./configure can report some warnings related to some dependencies, so take care about that.

# Install git-lfs - the easiest way
https://packagecloud.io/github/git-lfs/install
$ sudo apt install git-lfs

# At this point, SDL2 and its plugins are installed, and you have git-lfs installed.
# Now you can clone LunatiX

$ git clone https://github.com/Gumichan01/lunatix.git
$ cd lunatix/
$ git-lfs pull
$ make lunatix-demo && ./lunatix-demo   # Just the demo program 
$ make test && ./test/test.sh           # Just for testing
$ make                                  # generate the library files and install them
$ sudo make install

# If you don't have any problem, or any weird behaviour, congratulations!
# Now you can use LunatiX in your project

Known issues

SDL2_mixer - modplug.h: no such file or directory

  1. open configure.in in an editor
  2. You should find this piece of code:

AC_CHECK_HEADER([modplug.h], [have_libmodplug_hdr=yes])

replace it with:

AC_CHECK_HEADER([libmodplug/modplug.h], [have_libmodplug_hdr=yes])

In dynamic_modplug.h replace

#include "modplug.h"

with

#include "libmodplug/modplug.h"

And rebuild SDL2_mixer

The demo program cannot display the image.

1.Did you provide the good path to the image you want to load? 2.Did you check if libPNG, libJPEG, libWEBP and libTIFF are properly installed? -> If ./configure displayed warnings.

Other problems?

Open an issue on Github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment