Instructions for compiling MrBayes executables for Geneious plugin

Place the executables in the plugin resources directory following the naming convention
mbN_N_N_OS where N_N_N is the MrBayes version and OS is one of linux, linux64, MacOSX, win32.exe

Note: Edit the version number in file resources/plugin.properties when updating to a new version of MrBayes

Linux:

autoconf
./configure --with-beagle=no
make

The output of ./configure will indicate if SSE support was detected.
SSE will not be enabled in 32 bit, should be enabled in 64 bit.
It used to be the case that SSE was always disabled on a VirtualBox VM,
but modern versions of VirtualBox do allow building with SSE on a 64 bit VM.

We currently build separate 32 bit and 64 bit versions on CentOS 5 32 bit and 64 bit VMs.
Building on CentOS 5 is best for ensuring compatibility with the widest range of OS versions.

Windows:

The Windows binary installers from SourceForge require .Net installed so can't be bundled
with our plugins and need to be recompiled:

Use MinGW (from any Windows) environment and compile the standard UNIX code. This only produces
a 32 bit binary but it will run on all Windows machines without issue.

Instructions for compiling in MinGW are in a text file in the source directory.
It is necessary to edit src/bayes.h to change #define SSE_ENABLED 1 to instead
say #undef SSE_ENABLED because MinGW does not contain a function that is called by
MrBayes in some code that is used when it is built to use SSE. This is the case even
though MinGW would allow for the use of SSE.

Mac:

We don't support 32bit any more since Geneious R10, but we still need to recompile the 64 bit version from
sourceforge in order to remove dependency on beagle.
SSE and 64bit should be automatically enabled (as long as it's compiled on a 64bit system).
To make sure you can check the flags in config.h after running the ./configure step.
However, we still support older Mac versions down to 10.6, for which we have to set a special
flag when running the make command. So all in all, that is:

autoconf
./configure --with-beagle=no
make CFLAGS="-mmacosx-version-min=10.6"

Check the minimum version that we support and put the corresponding version number into it.
Try running MrBayes there to make sure it works.


Beagle:

Instructions can be added to the plugin for users who want to add their own binaries
compiled with whatever support they want.  For Beagle user they need to edit the
command block and add set usebeagle=yes; and set beagledevice=gpu; if they want to use
a CUDA card.