It's about time I updated this place. This time my information should be current for version .98. When all else fails, ask your questions on the Compiling forum.
The following is a list of items you will need to begin;
|
|
A file compression utility, such as WinZip |
|
|
The MAME (not dmame) source code from the Official Site's Download Page |
|
|
The source code for MAME32 |
|
|
MinGW-3.2.0-rc-3 |
|
|
MinGW-over-092 |
The first thing to do is install/extract the tools (I install them to c:\MinGW). They must be installed/extracted in the exact order they are listed above. When you are asked if you are sure you want to overwrite files, say YES!. If you use a command line compression (zip) utility, be sure to use the /d option to keep the directory structure of the zip file, or in Winzip, click the use folder names box before you extract your files. Next, extract the MAME source into it's own directory, followed by the Mame32 source. I also recommend copying the files in htmlhelp/include and htmlhelp/lib into the mingw/include and mingw/lib directories, respectively. This just makes setup easier for some people, but be sure to copy those files with every new release, in case of changes.
Now most people will tell you to set up your path by editing your c:\autoexec.bat file. I have a grudge against this because some people use multiple utilities for different programs and mixing includes and libs and such will make you pull your hair out! I recommend going to your windows/command directory and opening a new text file. In the text file, type " path=c:\mingw\bin;%path% " with the correct path for your mingw, of course, and save it as mingw.bat. From now on, you will be able to just type "mingw" (without the quotes) at the command prompt from anywhere and your path will be set up. When you close that command prompt and open a new one, your path will be as default.
Note: ALL versions of windows have a command prompt. Don't let people referring to it as a DOS prompt confuse you. If you don't have a handy dandy icon to click to get to it, just click start, run, and type "cmd" or "command", depending on your version of Windows. Also, if you use a batch file and when you type mingw you get a "too many parameters" message or something, it's because you have a long path already in your autoexec.bat. In this case, I suggest making your mingw.bat simply
"path =c:\mingw\bin;"
You are all set up! To compile the command line version of Mame, go to a command prompt, go to your mame32 directory, type "mingw" (if you followed my suggestions, including copying the htmlhelp stuff to your mingw folders), then type "mingw32-make". To build the Mame32 version (with GUI), type "mingw32-make WINUI=1 SUFFIX=32". Type it exactly as shown, please. This stuff is case sensitive and also I've heard that it doesn't like spaces in paths, so don't use any folders with spaces in the names. You may also use I686=1, K6=1, ATHLON=1, or P4=1 (ie. "mingw32-make WINUI=1 I686=1 SUFFIX=32" ) to build your optimized versions (SUFFIX isn't absolutely necessary) .
If you want to build the help file as well, you will need 2 files that I've included here placed into your Mingw/bin directory. All you need to do from there is type "makehelp".
UPDATE: Makehelp.bat is now in the /src folder and must be moved to the root folder (ie. move from c:\mame32\src to c:/mame32"). Additionally, for those with a fresh windows install and don't plan on installing Microsoft Office or the like, you will need 2 additional .dll files. You can get those HERE. If you do need these, extract them to your mingw/bin directory, then click start -> run -> and type "regsvr32 c:\mingw\bin\itcc.dll" (of course you should change the c:\ for whatever you use).
Special thanks goes out to Petr1fied for the helpfile update :).