Well I suggest using a gaming distro and running the cab on Linux:
https://fossbytes.com/gaming-linux-distros-best/
This is how to run a shell script(file with a .SH extension) to compile the ROMs:
https://www.cyberciti.biz/faq/run-ex...-shell-script/