HOW IT WORKS:
1. 1-update-tools.cmd script updates MAME compiling tools (last operation is performed twice, because sometimes not all components are updated on the first run).
2. 2-patch-diff.cmd script applies a diff to MAME or HBMAME sources (patch.exe is included).
3. 3-patch-binary-diff.cmd script applies a diff to MAME or HBMAME sources with --binary parameter (patch.exe is included).
4. 4-compile-mame-x64.cmd script compiles MAME (x64) and tools executables (replace 5 in -j parameter with number of your CPU cores + 1).
5. 5-compile-mame-x86.cmd script compiles MAME (x86) and tools executables (replace 5 in -j parameter with number of your CPU cores + 1).
6. 6-erase-mame.cmd script removes everything except MAME and chdman executables.
7. 7-compile-hbmame-x64.cmd script compiles HBMAME (x64) executable (replace 5 in -j parameter with number of your CPU cores + 1).
8. 8-compile-hbmame-x86.cmd script compiles HBMAME (x86) executable (replace 5 in -j parameter with number of your CPU cores + 1).
9. 9-erase-hbmame.cmd script removes everything except HBMAME executable.
INSTRUCTIONS:
1. Extract MAME or HBMAME sources to buildtools/src or msys2/src folder.
2. Extract the contents of this archive to your buildtools or msys2 folder.
3. Go to buildtools/src or msys2/src folder, and run needed scripts.
MAME-BuildTools.zip 58.88 kBWEB PAGEThanks to Mucci for help with 1-update-tools.cmd script.
Thanks to ozfalcon for help with 3-patch-binary-diff.cmd script.