Updated Building for macOS (markdown)

Steveice10 2023-05-06 11:07:07 -07:00
parent 9ed5028ea9
commit ca01a51ca3

@ -4,10 +4,9 @@ It's recommended that you use [homebrew](http://brew.sh/) to install dependencie
You'll need to download and install the following to build Citra:
* [CMake](https://cmake.org/) (`brew install cmake`)
* [Qt5](https://www.qt.io/download/) (`brew install qt5`) (**Note:** If you have Qt4 installed, then you will need to remove it before building. `brew unlink qt4`)
* [Python 3](https://www.python.org/) (`brew install python3`)
* The version included with the default developer tools may run into an issue downloading Qt.
* A recent version of Xcode and the Xcode command line tools
* **Optional dependencies**:
* [FFmpeg](https://www.ffmpeg.org/download.html#build-mac) 4.0+ is needed for HLE AAC Decoding on macOS (`brew install ffmpeg`)
### Cloning Citra in Git:
@ -18,19 +17,13 @@ cd citra
### Using CMake:
First of all, you have to tell CMake where your Qt5 is installed (add this line to ~/.profile if you want to make this permanent.):
```
export Qt5_DIR=$(brew --prefix)/opt/qt5
```
Now you can generate makefiles for the build:
Create a build folder and generate makefiles for the build:
```
mkdir build
cd build
cmake .. -DCMAKE_OSX_ARCHITECTURES="x86_64;x86_64h" -DCMAKE_BUILD_TYPE=Release
```
* To enable HLE AAC Decoding, include the cmake flag `-DENABLE_FFMPEG_AUDIO_DECODER=ON` (make sure FFmpeg is installed first.)
* To enable HLE AAC Decoding, include the cmake flag `-DENABLE_FFMPEG_AUDIO_DECODER=ON`
This builds a fat binary that has slices targeting early and late x64 machines.
@ -40,17 +33,15 @@ This builds a fat binary that has slices targeting early and late x64 machines.
make -j4
```
A `citra-qt.app` application bundle will now be present under `build/bin/`. Note that this is non-portable and only works on your machine.
For portability of the appbundle between machines please refer to [this script](https://github.com/citra-emu/citra/blob/master/.ci/macos/upload.sh).
A `citra-qt.app` application bundle will now be present under `build/bin/`. Note that this is non-portable and only works on your machine. You can create distributable bundles as well by running `make bundle` and checking the output in `build/bundle/`.
### About building on Apple Silicon machines
To build Citra targetting MacOS on ARM, the process is largely the same.
To build Citra targeting macOS on ARM, the process is largely the same.
A few things to note are:
* Make sure the Homebrew version you have installed is the ARM version
* When running the cmake command, you'll want to use this command instead:
* If you are cross-compiling, when running the cmake command you'll want to use this command instead:
```
cmake .. -DCMAKE_OSX_ARCHITECTURES="arm64" -DCMAKE_BUILD_TYPE=Release
```
You can similarly enable HLE AAC decoding by appending the flag `-DENABLE_FFMPEG_AUDIO_DECODER=ON` to the cmake command.
You can similarly enable HLE AAC decoding by appending the flag `-DENABLE_FFMPEG_AUDIO_DECODER=ON` to the `cmake` command.