Wiki

Clone wiki

wxMupen64Plus / Compiling_from_source

Build System

The source includes a simple wscript file for the Waf build system. Waf is included in the source, and only python 2.7 is required to use this build script.

Under all systems, you will need wxWidgets 2.9.x (wxWidgets 2.8 is not supported), and a version of mupen64plus more recent than 1.99.4 (which at this time means from latest hg. See http://code.google.com/p/mupen64plus/wiki/CompilingFromHg on how to get the very latest mupen)

Mac OS X

You will need to apply the patch from http://trac.wxwidgets.org/ticket/13443 to your wxWidgets build if you are using wxWidgets 2.9.2 or earlier

You may find below an example to build wxMupen64Plus on mac OS X 10.6. Adapt path as needed. The *FLAGS exports are used to build a 32-bit binary on 64-bits OS X; adapt as needed. The --wxconfig flag is optional if you have a single wx-config around. Use waf --help while in the correct directory for more help about possible options.

$ export LDFLAGS="-arch i386"
$ export CXXFLAGS="-arch i386"
$ export CFLAGS="-arch i386"
# Configure only needed the first time
$ ./waf configure --mupenapi=~/mupen64plus-core/src/api --wxconfig=/usr/local/bin/wx-config --debugger=false
$ ./waf
$ ./waf install

Note that I disabld debugger support, since it requires GCC 4.6

The waf install command will create an application bundle

You will need to install the mupen core and plugin libraries where wxMupen64Plus will search for them (under OSX, this is wxMupen64Plus.app/Contents/PlugIns), and place the data files of mupen and of plugins in wxMupen64Plus.app/Contents/Resources

Linux / Other Unices

You may find below an example to build wxMupen64Plus. Adapt path as needed. The --wxconfig flag is optional if you have a single wx-config around. Use waf --help while in the correct directory for more help about possible options.

# Configure only needed the first time
$ ./waf configure --mupenapi=~/mupen64plus-core/src/api --wxconfig=/usr/local/bin/wx-config --libdir=/usr/local/lib --pluginsdir=/usr/local/lib/mupen64plus
$ ./waf
$ ./waf install

The --libdir argument should specify where your mupen64plus libraries are; the --pluginsdir argument specifies where to look for the mupen64plus plugins librarie by default.

The waf install command will install wxMupen64Plus into the prefix specified during configure (or the default of /usr/local if none is passed) - depending on the target prefix you may need to run this step as root.

You will need to install the mupen core and plugin libraries where wxMupen64Plus will search for them (under Unices, it's generally ${prefix}/lib/wxmupen64plus/), and the data files of mupen and the plugins in the share data (typically ${prefix}/share/wxmupen64plus/)

Windows

On Windows, the build command would look like :

$ python C:\waf-1.6.2 configure --check-cxx-compiler="g++" --check-c-compiler="gcc"
--mupenapi=C:\mupen64plus-bundle-src-1.99.4\source\mupen64plus-core\src\api 
--sdlconfig="C:\SDL-devel-1.2.13-mingw32\SDL-1.2.13\bin\sdlconfig.exe" 
--wxconfig="C:\wx-config.exe" --wxhome="C:\wxWidgets-2.9.1"
$ python C:\waf-1.6.2

Adapt paths as needed, of course. SDL on Windows does not provide a sdl-config so I wrote one : sdl-config . I am using the wx-config.exe shipped along CodeLite. After the app is built, place mupen core and plugin DLLs, as well as dependencies such as SDL and wxWidgets DLLs, in the same directory as the executable, and place the Mupen64Plus and wxMupen64Plus data files where they are expected to be found (generally in the same directory as the executable)

Debug build

Add

--debug=true

when configuring

Updated