Compiling MameUI

Important!

The version of MameUI that you want to compile must match the version of MAME in the source folder. If you have applied any diff updates then thats the only version of MameUI that will compile successfully. Be Careful!

The Final Checks

Find your c:\mamesrc folder in My Computer. You'll see this...

mamesrc folder

If you have put mingw in a different folder other than c:\mingw then you need to set the path for it in both batch files. Right click the makemameui.bat file and select "Edit". This will open the file in notepad like this...

makemame.bat

Where it says set path= change the path to where the mingw folder is.

Right click the makehelpui.bat file and select "Edit". This will open the file in notepad like this...

makemame.bat

Where it says set path= change the path to where the mingw folder is.

Do the same for the PatchMAME.bat file like this...

PatchMAME.bat

Double click the command prompt icon and you'll see this...

command prompt

Type makemameui, press enter and the compilation process will take place. This can take from minutes to hours depending on you processor. It take between 8 and 9 minutes on my C2D E8400 @ 3.3ghz with compiler optimizations. You can abort the process at any time by pressing ctrl+c. The screen will say "Terminate Batch Job Y/N" press y to exit.

Repeat the above process but type makehelpui and this will create the MameUI help file.

Once its done

The compiler will create all the "EXE" files that you normally get with MameUI and the MameUI help file too. These will get deposited in your c:\mamesrc folder and include...

mameui32.exe
ledutil.exe
jedutil.exe
romcmp.exe
chdman.exe
makemeta.exe
regrep.exe
srcclean.exe
src2html.exe
MameUI.chm

Compile After

You need to copy them to your normal MameUI folder and overwrite the old files. If the version is newer than your old one you may need to follow the Mame Updates page here.

You will also notice a folder called obj which contains the ready compiled parts of MAME. If you update the source then the compiler will use the ready compiled parts in this folder and only have to compile the updated ones. It's only worth deleting this folder if you get compiler errors.

Speeding Things Up!

MingW can be optimized for different processor both for compiling and for the programs created. To produce optimized build you need to edit the makemameui.bat file again. You need to add an option to the mingw23-make line. Here are the options...

 

These will give a bit more speed to MameUI but not to how long it takes to compile. For that you need a dual or quad core processor and then you need to add -j3 (dual core) or -j5 (quad core) to the mingw32-make line. For example here is the line in my makemameui.bat file...

mingw32-make -j3 ARCHOPTS="-march=pentium-m -msse3" -f mameui.mak

 

back