Skip to content

Compiling From Source Guide

J-rg edited this page Aug 29, 2023 · 70 revisions

Note: Pre-release software is less tested and therefore may contain bugs that cause crashes and/or data loss. Please make sure to back up your OpenEmu library and save your game progress regularly.

Using the guide below, we will try and walk you through the steps required to download and compile the OpenEmu application from source. You will need a Mac running the latest stable version of Xcode.

If you have used earlier OpenEmu versions (pre-2.0), please see Cleaning Up Previous Versions at the bottom before compiling OpenEmu.

Command Line Install Guide (Advanced users)

Not afraid of the command line? Follow this guide if you already have Xcode or Command Line Tools and want to clone and compile via terminal. Otherwise, please follow the Visual Install Guide.

Alternatively, you can easily install the necessary Command Line Tools by typing xcode-select --install into your command line and clicking “Install”. Xcode is still necessary for successful compilation.

Cloning & Compiling

git clone --recursive https://github.com/OpenEmu/OpenEmu.git
cd OpenEmu
git submodule update --init --recursive
xcodebuild -workspace OpenEmu.xcworkspace -scheme "OpenEmu" -configuration Release

The compiled OpenEmu.app binary is located in the default DerivedData path, ~/Library/Developer/Xcode/DerivedData, within a generated OpenEmu-... folder and then inside Build/Products/Release.

To compile OpenEmu and the core plugins, change -scheme "OpenEmu" to -scheme "OpenEmu + Cores".

Visual Install Guide (Easy mode)

Step 1

Download and install the latest version of Xcode from the Mac App Store.

Xcode on the Mac App Store

Step 2

Warning: Do not download the ZIP! It will not work!

With Xcode downloaded and installed on your Mac, we now need to clone the source code for OpenEmu. Install GitHub Desktop for Mac, then navigate to the OpenEmu repository and click 'Code' > 'Open with GitHub Desktop'.

Clone Panel

In GitHub Desktop, click 'Clone'.

Clone in GitHub Desktop

Step 3

Once GitHub Desktop has finished cloning, browse to the 'OpenEmu' folder it cloned to.

Browse to the OpenEmu Folder

Step 4

Open the 'OpenEmu' folder and browse through the files until you find the Xcode workspace file called 'OpenEmu.xcworkspace'. Double click this file and it should open in Xcode.

OpenEmu Folder

Step 5

With Xcode open, you will see a lot of files and 'cores' that make up the OpenEmu application in the left sidebar. At the top of the application, you need to click on the long bar to the right of the branch selector and select the correct 'scheme'.

The Scheme Bar

Click on the left-most portion of this bar, and be sure to scroll through the popovers and select 'OpenEmu' and 'My Mac'.

Selecting the Correct Scheme

Step 6

With the correct scheme selected in Step 5, you are now ready to compile the application. To do so, either press ⇧⌘I or click on 'Product' > 'Build For' > 'Profiling' in the menu bar. This makes sure that you get a release build that makes use of optimizations.

Build for Profiling

Step 7

OpenEmu will now begin compiling. This process might take a while to complete.

OpenEmu Compiling - Status

Step 8

Once Xcode has compiled OpenEmu, simply click on 'Product' > 'Show Build Folder in Finder' in the menu bar, then navigate to 'Products' > 'Release' in Finder and look for 'OpenEmu'.

OpenEmu.app Inside the 'Release' Folder

You can launch the app directly from this folder or move it over to your Applications folder.

Step 9

From here, you can begin adding and playing your favorite games and using the application as normal (assuming that the source code you downloaded is in a usable state!)

OpenEmu: All Fresh & New

Cleaning Up Previous Versions

If you have installed or used earlier versions of OpenEmu, some things have changed that require manual cleanup to ensure proper functionality of OpenEmu 2.0.

A) Remove older core and system plugins.

Navigate to your ~/Library/Application Support/OpenEmu/Cores/ folder and delete it.

Navigate to your ~/Library/Application Support/OpenEmu/Systems/ folder and delete it (If applicable. This is old and not everyone has this folder).

B) Remove older key bindings.

Navigate to your ~/Library/Application Support/OpenEmu/Bindings/ folder and delete it.

C) Remove older preferences

Run the following command in Terminal.app: defaults delete org.openemu.OpenEmu

D) Proceed to Step 1 to compile OpenEmu.

Clone this wiki locally