Build From Source (Linux)

sergio-br2 edited this page May 11, 2015 · 3 revisions

Building From Source (Linux)

Overview

This is a quick guide on how to successfully build GLideN64 on Linux. As long as you have an understanding of basic terminal commands and you are familiar with your distros package manager you should be all set!

Dependencies

I can only list the Fedora package names but a quick search on the net should be able to the equivalent packages on your distro. If someone could update the wiki to add Ubuntu dependencies it would be appreciated :)

Fedora

gcc gcc-c++ cmake boost-devel boost-static libstdc++-static libX11-devel mesa-libGL-devel freetype-devel

Ubuntu

sudo apt-get install gcc g++ cmake libgl1-mesa-dev libboost-system-dev libboost-filesystem-dev libfreetype6-dev libmupen64plus-dev zlib1g-dev

You will need to compile libpng 1.4.xx from source too, since Ubuntu uses an old version of this library (1.2.xx). Take a look at issue #461 for more details.

Initial Setup

At the moment the sources are only available in the binary zip file. Download and extract to a location of your choice.

Open Terminal and change the directory to the folder containing "getRevision.sh" (Typically src/src folder).

Run the following commands (might need root permissions use either su or sudo):

chmod +x getRevision.sh
./getRevision.sh

Note:The step above might fail because we did not get the files from a git repository. There is no easy solution to this other than to manually create a Revision.h file in the /src directory containing #define PLUGIN_REVISION "1". This should be resolved in the future.

mkdir build
cd build

Build

First we need to generate the makefile. Run the following command:

cmake -DMUPENPLUSAPI=On ..

Assuming there are no Dependency errors this should generate a Makefile in the build folder we created earlier.

Make

The final stage. All that we have to do now is compile it. Run the following command:

make

Note: If you have a quad core processor you can use make -j5 to speed up the process but this can make debugging build errors more difficult.

If all goes well the compile should complete with no errors and a plugin folder will be created in the build folder we created at the start.

Usage

Given that this is a linux guide I am going to assume that you are using mupen64plus. Run the following commands to copy the plugin to the correct directory:

cd plugin/release
cp mupen64plus-video-GLideN64.so /usr/local/lib/mupen64plus

Note: You will need root permisions for the copy command. Use su on Fedora and sudo on Ubuntu.

When you launch mupen64plus from the command line use the following command:

mupen64plus --gfx mupen64plus-video-GLideN64.so rom.ext

Done :)