Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HOWTO: Use the new dev tools as of 01-01-2016 v1.1

17 views
Skip to first unread message

Larry Laffer

unread,
Jan 2, 2016, 9:57:38 AM1/2/16
to
This presumes that you are using a 64-bit OS. If you are only using
32-bit OS, the files you need to download and some of the steps will
be different.

1) Download both files
https://github.com/mamedev/buildtools/releases/download/1.1/msys64-2016-01-02.exe
and
https://github.com/mamedev/buildtools/releases/download/1.1/msys32-2016-01-02.exe
which are links found at this web site (in case you have to redownload
updated files): http://www.mamedev.org/tools/ (if you are only
compiling 32-bit, then the latter is all you need).

2) Run the programs, giving it an unused directory to install the
tools. I gave it g:\mamedev You can even give it g:\ (or whatever
drive letter), as it will then create a subdirectory of that called
"msys64" and "msys32" that contains everything else. Give both files
the same path as you run them.

3) Inside "installed path"\msys32 you should see a directory
"mingw32". Copy that directory and copy that into "installed
path"\msys64 so you have "mingw32" and "mingw64" directories side by
side. (This is only needed if you plan on compiling both 32-bit and
64-bit. If only compiling one or the other, this is not neeeded).

From this point on, all paths that I will give will be relative to
"installed path"\msys64. So depending on where you installed your
files, you'll have to change up as needed.

3) Double click on the file "autorebase.bat". (a window will open up
then go away with nothing inside it. That's fine)

4) Double click on the file "conemu.bat", then click "OK" on the
window that pops up. (a new UNIX-like window will open, running
"bash")

5) Run the following command to make sure you have the most current
compiler tools: "pacman -Su". If there are updates, you may have to
manually redownload and install the 32-bit tools since we manually
moved them before.

6) Make the src directory from here by typing in "mkdir src" and
ENTER.

7) Exit this new window for now by typing "exit" and ENTER. The
process of running it the first time created your user directory, and
that's what we need to play with now.

Depending on what your user name is on your Windows machine, it will
create a user in this environment of the same name. In my case, it
created /home/Jesse

This will be different for you, so if I say /home/user, this is the
directory that I mean, and I don't mean the name "user" specficially.

8) Now we create our shell scripts. I'll state the full path of where
to place the file, and the name that I used, followed by the contents
of the file. There are two of them, each checking various arguments
to run one set of code or another, depending if you want 32-bit
compiling or 64-bit compiling. I think this will make more sense once
we actually start it, but for now, just copy the files as-is.

To make these files, using "notepad" is fine, or any text editor of
your choosing. Don't use a "word processor" like "word", it needs to
be a flat text editor.

/home/user/go.txt
-----------------------
if [ $# == "1" ]
then
if [ $1 == "32" ]
then
/mingw32_shell.bat
else
/mingw64_shell.bat
fi
else
echo "Enter:"
echo "$0 32"
echo "or"
echo "$0 64"
fi

/home/user/src/go.txt
----------------------------
if [ $MSYSTEM == "MINGW64" ]
then
cd mame

echo Compiling MAME64...

make clean
make -j5 PTR64=1 STRIP_SYMBOLS=1

mv mame64.exe ..

echo Compiling MAMEUI64...

cd ../mameui

make clean
make -j5 OSD=winui PTR64=1 STRIP_SYMBOLS=1

mv mameui64.exe ..
else
cd mame

echo Compiling MAME...

make clean
make -j5 PTR64=0 STRIP_SYMBOLS=1

mv mame.exe ..

echo Compiling MAMEUI...

cd ../mameui

make clean
make -j5 OSD=winui PTR64=0 STRIP_SYMBOLS=1

mv mameui.exe ..
fi

NOTE: These scripts are set up for my environment, which is a
quad-core processor. The -j5 argument should be the number of
processors/cores plus 1. So if you only have a dual-core processor,
use -j3. If you have a 6-core processor, use -j7.

9) Double click on the file "conemu.bat" again to re-open the
UNIX/bash window that we had before. Now we will run commands to make
the .txt files that we created executable shell scripts.

10) Type in the following commands, as written, starting from the
directory that it places you (/home/user):

ren go.txt go
chmod +x go
cd src
ren go.txt go
chmod +x go
cd ..

If you did this correctly, the two go.txt files that you made in
notepad are now only "go" files with no extension, and flagged to be
executable. The last "cd .." puts you back to where you started.

11) Now download the source code from
http://www.mamedev.org/release.html and
https://github.com/Robbbert/mameui (use the "Download Zip" button on
the right just above the directory structure shown)

Unzip and create and/or rename directories as needed so you have the
source code in the following directories, respectively:

/home/user/src/mame
/home/user/src/mameui

12) Back in your UNIX window, type in the following command:

go 64

or

go 32

Depending on if you want to compile the 64-bit versions of the code,
or the 32-bit versions of the code.

Either way, a new window will open. In this new window:

13) Type in the following commands:

cd src
go

This will start the compiling process and compile the command-line
version and the UI version for the 32-bit or 64-bit set, depending on
what you entered above. This process will take a while. On my
machines, it takes near two hours to complete the compiling of two
programs.

14) When done, go back to the original window and "go 32" or "go 64",
whichever one you didn't do before to open a new window, then repeat
step 13 to compile the other 2, if you want to compile all 4. If you
don't, then you can skip this step.

When done, the executables will reside in the /home/user/src directory
for you to move to wherever else you need them.

If at any time you want to update the development tools (and probably
should before compiling each new version of MAME), run the main batch
file to open up the UNIX window and run this command:

pacman -Su

Hope this helps.
0 new messages