doc: Updated the README.md to include more important information for setting up Docker for building mGBA. (#2575)

This commit is contained in:
Thompson Lee 2022-07-02 18:25:24 -04:00 committed by GitHub
parent 977b184ecb
commit 116d75c3c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -124,11 +124,13 @@ Compiling requires using CMake 3.1 or newer. GCC and Clang are both known to wor
The recommended way to build for most platforms is to use Docker. Several Docker images are provided that contain the requisite toolchain and dependencies for building mGBA across several platforms. The recommended way to build for most platforms is to use Docker. Several Docker images are provided that contain the requisite toolchain and dependencies for building mGBA across several platforms.
Note: If you are on an older Windows system before Windows 10, you may need to configure your Docker to use VirtualBox shared folders to correctly map your current `mgba` checkout directory to the Docker image's working directory. (See issue [#1985](https://mgba.io/i/1985) for details.)
To use a Docker image to build mGBA, simply run the following command while in the root of an mGBA checkout: To use a Docker image to build mGBA, simply run the following command while in the root of an mGBA checkout:
docker run --rm -t -v ${PWD}:/home/mgba/src mgba/windows:w32 docker run --rm -it -v ${PWD}:/home/mgba/src mgba/windows:w32
This will produce a `build-win32` directory with the build products. Replace `mgba/windows:w32` with another Docker image for other platforms, which will produce a corresponding other directory. The following Docker images available on Docker Hub: After starting the Docker container, it will produce a `build-win32` directory with the build products. Replace `mgba/windows:w32` with another Docker image for other platforms, which will produce a corresponding other directory. The following Docker images available on Docker Hub:
- mgba/3ds - mgba/3ds
- mgba/switch - mgba/switch
@ -141,6 +143,8 @@ This will produce a `build-win32` directory with the build products. Replace `mg
- mgba/windows:w32 - mgba/windows:w32
- mgba/windows:w64 - mgba/windows:w64
If you want to speed up the build process, consider adding the flag `-e MAKEFLAGS=-jN` to do a parallel build for mGBA with `N` number of CPU cores.
#### *nix building #### *nix building
To use CMake to build on a Unix-based system, the recommended commands are as follows: To use CMake to build on a Unix-based system, the recommended commands are as follows: