summaryrefslogtreecommitdiffstatshomepage
path: root/docs/source/initialsetup/compilingmame.rst
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2020-11-04 03:12:38 +1100
committer Vas Crabb <vas@vastheman.com>2020-11-04 03:12:38 +1100
commit9e71712b3ba9d7215539cc1c2cd46325d73f7d9b (patch)
treed63933f24a50c1d271982f1f6f30a7d3e47172b1 /docs/source/initialsetup/compilingmame.rst
parenta028db4e8c99a606c6c755872b90564e9e4fc9ab (diff)
-General maintenance on emu/devfind:
* Harmonised memory region/share finder/creator APIs. * Moved .found() to optional object finders. * Added truth test operator to optional object finders. * Fixed things that were testing .found() on required object finders. * Improved Doxygen API documentation. -dec8.cpp: Moved csilver to its own state class. -docs: Added some notes about setting up and using MSYS2.
Diffstat (limited to 'docs/source/initialsetup/compilingmame.rst')
-rw-r--r--docs/source/initialsetup/compilingmame.rst67
1 files changed, 67 insertions, 0 deletions
diff --git a/docs/source/initialsetup/compilingmame.rst b/docs/source/initialsetup/compilingmame.rst
index e9e931238de..8e5998a3a5e 100644
--- a/docs/source/initialsetup/compilingmame.rst
+++ b/docs/source/initialsetup/compilingmame.rst
@@ -119,6 +119,28 @@ with MSYS2 and the **pacman** package manager.
empty string (e.g. using the command **export MINGW32=/mingw32 MINGW64=** in
the Bash shell).
+For example you could use these commands to ensure you have the packages you
+need to compile MAME, omitting the ones for configurations you don’t plan to
+build for or combining multiple **pacman** commands to install more packages at
+once::
+
+ pacman -Syu
+ pacman -S curl git make
+ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-libc++ mingw-w64-x86_64-lld mingw-w64-x86_64-python
+ pacman -S mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_ttf
+ pacman -S mingw-w64-x86_64-qt5
+ pacman -S mingw-w64-i686-gcc mingw-w64-i686-libc++ mingw-w64-i686-lld mingw-w64-i686-python
+ pacman -S mingw-w64-i686-SDL2 mingw-w64-i686-SDL2_ttf
+ pacman -S mingw-w64-i686-qt5
+
+You could use these commands to install the current version of the
+mame-essentials package and add the MAME package repository to yur pacman
+configuration::
+
+ curl -O "https://repo.mamedev.org/x86_64/mame-essentials-1.0.6-1-x86_64.pkg.tar.xz"
+ pacman -U mame-essentials-1.0.6-1-x86_64.pkg.tar.xz
+ echo -e '\n[mame]\nInclude = /etc/pacman.d/mirrorlist.mame' >> /etc/pacman.conf
+
Building with Microsoft Visual Studio
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -137,6 +159,51 @@ Building with Microsoft Visual Studio
* The MSYS2 environment is still required to generate the project files, convert
built-in layouts, compile UI translations, etc.
+Some notes about the MSYS2 environment
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+MSYS2 uses the pacman tool from Arch Linux for package management. There is a
+`page on the Arch Linux wiki <https://wiki.archlinux.org/index.php/Pacman>`_
+with helpful information on using the pacman package management tool.
+
+The MSYS2 environment includes two kinds of tools: MSYS2 tools designed to work
+in a UNIX-like environment on top of Windows, and MinGW tools designed to work
+in a more Windows-like environment. The MSYS2 tools are installed in
+``/usr/bin`` while the MinGW tools are installed in ``/ming64/bin`` and/or
+``/mingw32/bin`` (relative to the MSYS2 installation directory). MSYS2 tools
+work best in an MSYS2 terminal, while MinGW tools work best in a Microsoft
+command prompt.
+
+The most obvious symptom of this is that arrow keys don’t work in interactive
+programs don’t work if you run them in the wrong kind of terminal. If you run
+MinGW gdb or python from an MSYS2 terminal window, command history won’t work
+and it may not be possible to interrupt an attached program with gdb. Similarly
+it may be very difficult to edit using MSYS2 vim in a Microsoft command prompt
+window.
+
+MAME is built using the MinGW compilers, so the MinGW directories are included
+earlier in the ``PATH`` for the build environments. If you want to use an
+interactive MSYS2 program from an MSYS2 shell, you may need to type the absolute
+path to avoid using the MinGW equivalent instead.
+
+MSYS2 gdb may have issues debugging MinGW programs like MAME. You may get
+better results by installing the MinGW version of gdb and running it from a
+Microsoft command prompt window to debug MAME.
+
+GNU make supports both POSIX-style shells (e.g. bash) and the Microsoft cmd.exe
+shell. One issue to be aware of when using the cmd.exe shell is that the
+``copy`` command doesn’t provide a useful exit status, so file copy tasks can
+fail silently.
+
+It is not possible to cross-compile a 32-bit version of MAME using 64-bit MinGW
+tools on Windows, the 32-bit MinGW tools must be used. This causes issues due
+to the size of MAME. It is not possible to link a full 32-bit MAME build
+including the SDL OS-dependent layer and the Qt debugger. GNU ld and lld will
+both run out of memory, leaving an output file that doesn’t work. It’s also
+impossible to make a 32-bit build with full local variable symbols. GCC may run
+out of memory, and certain source files may exceed the limit of 32,768 sections
+imposed by the PE/COFF object file format.
+
.. _compiling-fedora: