Jump to content
Visual Boy Advance-M
Sign in to follow this  

How to build VBA-M from the SVN code in Linux.

Recommended Posts

I have made a guide covering it more or less and posted it in the Emuforums forum. I'll post it here too:


This is a guide for people who would like to build VBA-M from its development source code in Linux and use it either through the SDL or the GTK+ interfaces.


First of all, dependencies. As far as I know you'll need the following programs and libraries:


cmake subversion sdl libpng zlib sfml mesa cairo libxv gtkglext gtkglextmm gtkmm glibmm glademm


A minimum development environment is assumed (e.g. C/C++ compiler, the make utility, ...). The ones marked in red indicate that development packages of them are needed as well (e.g. mesa-dev).


Now, once all of that is installed create a directory named VBA-M (for example) where ever you wish to build it. Open a terminal window and navigate to the directory you just created. Now follow this steps:


1. Get the source code, check out the trunk branch:


[user@machine VBA-M]# svn co https://vbam.svn.sourceforge.net/svnroot/vbam/trunk .


*Note the dot in the end of the last line, it's necessary too.


2. Generate the makefile:


[user@machine VBA-M]# cmake . -DCMAKE_INSTALL_PREFIX=/usr


3. Build and install VBA-M:


[user@machine VBA-M]# make && sudo make install


4. Run VBA-M: gvbam for the GTK+ interface and vbam for the SDL one.




1. When looking for the dependencies, some of them might be available in your distribution with "lib" prefixing them (e.g.: libgtkmm instead of gtkmm) or not available at all (you'd need to get and build them yourself).

2. In the second phase CMake may warn about things not found, if that's the case verify you have installed all the dependencies as well as their development packages. E.g.: gtkmm-dev or something like that.

3. In that phase too, you may specify a different dir for CMAKE_INSTALL_PREFIX, the one I posted should make VBA-M available for system-wide.

4. In the third phase, make install have to be called as root or with administrative privileges as it will write to /etc (unless you changed the directories through additional options). E.g.: I've put sudo there because it's common to have that installed and configured.

5. There are more options to be used when generating the build script: disabling one of the interfaces, using some assembly parts, ... This "walk-through" is kind of generic. If you wish to know more take a look at CMakeLists.txt.

Share this post

Link to post
Share on other sites

An update to this little thread, as it could be extremely helpful for people running the latest Linux systems and are having trouble. Please not this only pertains so far to Fedora 17 and Ubuntu 12.04


For compiling on Ubuntu, the following commands are required to install the required packages:


sudo apt-get update


sudo apt-get install build-essential subversion cmake zlib1g-dev libpng12-dev libopenal-dev libsdl1.2-dev libgtkmm-2.4-dev libgtkglextmm-x11-1.2-dev libavformat-dev libswscale-dev libwxgtk2.8-dev imagemagick wx-common libsfml-dev


These will install the dependencies necessary to compile vba-m.



The next set of commands will be required for Fedora 17:


You first need to install the rpmfusion repositories, which can be found on this site and page: http://rpmfusion.org/Configuration

Be sure to update your system a few times after you install the repositories.


sudo yum groupinstall "Development Tools"


sudo yum install libpng-devel SDL-devel gtkmm24-devel gtkglextmm-devel ffmpeg-devel openal-soft-devel wxGTK-devel ImageMagick-devel libgdiplus-devel SFML-devel cmake


The required ffpmeg-devel files can only be found on RPMFusion, which is why it's first on the list.


After you install the packages, you then follow the instructions from the post above, starting with downloading the source through SVN.


This has been tested on vanilla Ubuntu and Fedora systems, installed into virtual machines without any reconfigurations to make them better run inside the VM, so I'm sure this will work for everyone. Even able to compile the wx version.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this