yuzu-wiki/Building-for-macOS.md

58 lines
1.8 KiB
Markdown
Raw Normal View History

2020-02-25 04:53:10 +00:00
# **MacOS is no longer supported due to Apple deprecating OpenGL and their current version not supporting the OpenGL extensions we require.**
2018-11-18 07:24:59 +00:00
2018-01-18 17:14:37 +00:00
### Dependencies
2018-01-14 06:14:58 +00:00
2020-02-25 04:53:10 +00:00
It's recommended that you use [Homebrew](https://brew.sh) to install dependencies.
2018-01-14 06:14:58 +00:00
You'll need to download and install the following to build yuzu:
2020-02-25 04:53:10 +00:00
* [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/) - `brew install pkgconfig`
* [SDL2](https://www.libsdl.org/download-2.0.php) - `brew install sdl2`
* [Qt5](https://www.qt.io/download/) - `brew install qt5`
* If you have Qt4 installed, then you will need to remove it before building: `brew unlink qt4`
* [CMake](https://cmake.org/) - `brew install cmake`
* A recent version of Xcode and the Xcode command line tools
2018-01-14 06:14:58 +00:00
2018-01-18 17:14:37 +00:00
### Cloning yuzu with Git
2018-01-14 06:14:58 +00:00
2019-10-19 16:08:33 +00:00
**Master:**
2020-02-25 04:53:10 +00:00
```bash
git clone --recursive https://github.com/yuzu-emu/yuzu
cd yuzu
git submodule update --init --recursive
```
2018-01-14 06:14:58 +00:00
2019-10-19 16:08:33 +00:00
**Mainline (no assert):**
2020-02-25 04:53:10 +00:00
```bash
git clone --recursive https://github.com/yuzu-emu/yuzu-mainline
cd yuzu-mainline
git submodule update --init --recursive
```
2019-10-19 16:08:33 +00:00
2018-01-18 17:14:37 +00:00
### Using CMake
2018-01-14 06:14:58 +00:00
2018-01-18 17:14:37 +00:00
First of all, you have to tell CMake where Qt5 is installed (add this line to ~/.profile if you want to make this permanent):
2018-01-14 06:14:58 +00:00
2020-02-25 04:53:10 +00:00
```bash
export Qt5_DIR=$(brew --prefix)/opt/qt5
```
2018-01-14 06:14:58 +00:00
Now you can generate makefiles for the build:
2018-01-18 17:14:37 +00:00
2020-02-25 04:53:10 +00:00
```bash
export MACOSX_DEPLOYMENT_TARGET=10.14
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
```
2018-01-14 06:14:58 +00:00
### Building yuzu
2018-01-18 17:14:37 +00:00
```bash
2018-01-14 06:14:58 +00:00
make -j4
```
2018-01-21 14:03:35 +00:00
A `yuzu_qt.app` application bundle will now be present under `build/bin/`. Note that this is non-portable and only works on your machine.
2018-01-14 06:14:58 +00:00
For portability of the appbundle between machines please refer to [this script](https://github.com/yuzu-emu/yuzu/blob/master/.travis/macos/upload.sh).