Derived from Compiling MAME
Default install folder is c:\MSYS64
Start "MSYS2 MINGW64"
Update installation:
pacman -S --noconfirm --refresh --sysupgrade
MSYS2 may close afterwards. If so, re-open MSYS2 and run this again.
This will speed up compilation, but it optional, as it adds risk!
Open elevated PowerShell prompt and run:
Add-MpPreference -ExclusionPath 'C:\MSYS2'
mkdir ~/tmp && cd ~/tmp
curl -O 'https://repo.mamedev.org/x86_64/mame-essentials-1.0.6-1-x86_64.pkg.tar.xz'
pacman -U --noconfirm mame-essentials-1.0.6-1-x86_64.pkg.tar.xz
echo -e '\n[mame]\nInclude = /etc/pacman.d/mirrorlist.mame\nSigLevel = Never' >> /etc/pacman.conf
pacman -S --noconfirm --refresh --sysupgrade
pacman -S --noconfirm git make unzip mingw-w64-x86_64-gcc mingw-w64-x86_64-libc++ mingw-w64-x86_64-python
echo "export MINGW64=/mingw64 MINGW32=" >> ~/.bashrc
source ~/.bashrc
git clone https://github.com/mamedev/mame.git
cd mame
make --jobs=4 PTR64=1 OPTIMIZE=3 SYMBOLS=1 SYMLEVEL=1 STRIP_SYMBOLS=1
Binaries will be in C:\MSYS64\home(username)\tmp\mame - mame.exe
Run mame.exe and yhou should see a version with a long identifier, e.g. "mame0277-416-geccbb3d77c8":
.\mame.exe -version
0.277 (mame0277-416-geccbb3d77c8)
while an official release would look like this:
.\mame.exe -version
0.277 (mame0277)
git pull
make clean