Create D:\mingw folder with the Explorer Move folder D:\buildtools\vendor\mingw32 to D:\mingw Double-click on D:\buildtools\vendor\qt\mingw32\setup-Qt.bat Move folder D:\buildtools\vendor\qt\mingw32\Qt to D:\mingw\mingw32
Edit D:\mingw\mingw32\Qt\bin\qt.conf and changed Prefix = D:/buildtools/vendor/qt/mingw32/Qt to Prefix = D:/mingw/mingw32/Qt
Copy the files mkdir.exe, rm.exe and msys-1.0.dll from D:\buildtools\installer-tmp\bin to D:\mingw\mingw32\bin
Create a compile batch (cp.bat) with the following lines and copy the file into your Windows folder (c:\window) @ECHO OFF set path=d:\mingw\mingw32\bin;d:\mingw\mingw32\opt\bin;d:\mingw\mingw32\Qt\bin;C:\WINDOWS\system32;C:\WINDOWS d: cd \mingw\mame make -j3
Delete D:\buildtools
Download MAME source from http://mamedev.org/release.php Extract src files into D:\mingw\mame Open Command Prompt and type cp and press ENTER.
Note: For MAMEUI download also http://www.mameui.info/MameUIs.7z and extract winui in MameUIs.7z\MameUIs\SRC\OSD to D:\mingw\mame\src\osd\
Edit cp.bat and replace make -j3 with make -j3 OSD=winui