Giter VIP home page Giter VIP logo

mame-essentials's Introduction

MAME Build Tools

Table of Contents

The MAME development environment for Windows consists of the GCC compiler (by way of MinGW), and the MSYS2 (POSIX/Unix compatability layer), plus various utilities such as Python and Git. It is available as a prepackaged installer, or can be assembled from upstream components.

Source control is handled by github (https://github.com/mamedev/mame.git), so you'll need to check out a copy. Various modules are disabled by default, but can be enabled through arguments when building and may require additional MSYS2 packages to be installed.

  • 64-bit - msys64-2022-01-12.exe (Only 64-bit tools and libraries are included. To build 32-bit binaries, install the 32-bit MinGW tools, and switch between environments using config32.bat and config64.bat)

If you are installing it in a location other than the default (C:\Users\Public\msys64), after you unpack double-click : autorebase.bat

To open a non-POSIX shell there is a batch file: win32env.bat for regular Windows console.

Important thing is to setup your git environment first

git config --global core.autocrlf true

And if you are a contributor:

git config --global user.email [email protected]
git config --global user.name "Firstname Lastname"

Then, to download the MAME source under your Msys2 user's homedir:

git clone https://github.com/mamedev/mame.git

Alternatively, locate your existing source tree (drives are mapped to hidden dirs /c etc. under the virtual root):

cd /c/Projects/mame

And finally to build:

make

Similar to package managers on Linux like apt-get, yum etc. MSYS2 can automatically update packages for fixes, security updates etc. To update all installed packages to current, from the regular Windows console run the following:

pacman -Sy
pacman -S bash pacman msys2-runtime --noconfirm --needed

Next, exit the console and restart Msys2.

Finally, once back at the console, execute:

pacman -Su --noconfirm

For a simple MSYS32 terminal use mingw64.exe to start or (or mingw32.exe for a 32-bit environment).

For more information about MSYS2, see MSYS2 Introduction.

If you wish to build 32-bit binaries:

pacman -S mingw-w64-i686-gcc mingw-w64-i686-libc++ mingw-w64-i686-lld mingw-w64-i686-python mingw-w64-i686-SDL2 mingw-w64-i686-SDL2_ttf

If you wish to debug with gdb:

For MSYS2 x64

pacman -S gdb

For MinGW x64

pacman -S mingw-w64-x86_64-gdb

For MinGW x86

pacman -S mingw-w64-i686-gdb

If you wish to build with the QT5 debugger:

For x64

pacman -S mingw-w64-x86_64-qt5

For x86

pacman -S mingw-w64-i686-qt5

If you with to build the QMC2 frontend or similar:

For x64

pacman -S mingw-w64-x86_64-qt4

For x86

pacman -S mingw-w64-i686-qt4

To be able to use ccache to speed-up (re)compilation

For x64

pacman -S mingw-w64-x86_64-ccache

For x86

pacman -S mingw-w64-i686-ccache

Used as build system for some other project that can be handy

For x64

pacman -S mingw-w64-x86_64-cmake

For x86

pacman -S mingw-w64-i686-cmake

To build in Windows environment use from build folder:

cmake -G "MinGW Makefiles" .. -DCMAKE_MAKE_PROGRAM=c:\msys64\win32\make.exe

To build in MSYS environment use from build folder:

cmake -G "MSYS Makefiles" ..

If you wish to compile/link with the alternative Clang, go ahead and download:

For x64

pacman -S mingw-w64-x86_64-clang mingw-w64-x86_64-clang-analyzer mingw-w64-x86_64-clang-tools-extra

For x86

pacman -S mingw-w64-i686-clang mingw-w64-i686-clang-analyzer mingw-w64-i686-clang-tools-extra

mame-essentials's People

Contributors

mmicko avatar ppriest avatar stilett0 avatar cuavas avatar couriersud avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.