Installing DeSmuME from source on OS X

From DeSmuME
(Difference between revisions)
Jump to: navigation, search
(Set Up the Build Environment)
(Set Up the Build Environment)
Line 143: Line 143:
 
* If you want to build the OpenEmu Plug-in, you must install Xcode 4.
 
* If you want to build the OpenEmu Plug-in, you must install Xcode 4.
  
==== Download Xcode ====
+
 
 +
==== Download Xcode 3 ====
 
You can download Xcode 3 from the Apple Developer Connection website. Note that before you can download anything from the ADC website, you must log in using an Apple Developer ID. Once you are logged in, you may use the provided download links to download Xcode 3.
 
You can download Xcode 3 from the Apple Developer Connection website. Note that before you can download anything from the ADC website, you must log in using an Apple Developer ID. Once you are logged in, you may use the provided download links to download Xcode 3.
 +
  
 
If you do not have an Apple Developer ID, you can register one for free.
 
If you do not have an Apple Developer ID, you can register one for free.
Line 152: Line 154:
 
* ADC Downloads: https://developer.apple.com/downloads
 
* ADC Downloads: https://developer.apple.com/downloads
  
Once you are logged in to ADC, you can use the following download links for Xcode 3 and Xcode 4.
+
Once you are logged in to ADC, you can use the following download links for Xcode 3.
 
* Xcode v3.1.4 Direct Download Link (for Leopard): http://adcdownload.apple.com/Developer_Tools/xcode_3.1.4_developer_tools/xcode314_2809_developerdvd.dmg
 
* Xcode v3.1.4 Direct Download Link (for Leopard): http://adcdownload.apple.com/Developer_Tools/xcode_3.1.4_developer_tools/xcode314_2809_developerdvd.dmg
 
* Xcode v3.2.6 Direct Download Link (for Snow Leopard): http://adcdownload.apple.com/Developer_Tools/xcode_3.2.6_and_ios_sdk_4.3__final/xcode_3.2.6_and_ios_sdk_4.3.dmg
 
* Xcode v3.2.6 Direct Download Link (for Snow Leopard): http://adcdownload.apple.com/Developer_Tools/xcode_3.2.6_and_ios_sdk_4.3__final/xcode_3.2.6_and_ios_sdk_4.3.dmg
 +
 +
 +
==== Download Xcode 4 ====
 +
Downloading Xcode 4 is very easy! If you are running Lion or later and have any Apple ID, then you can download Xcode 4 directly from the Mac App Store.
 
* Xcode 4 Mac App Store Link (for Lion): http://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12
 
* Xcode 4 Mac App Store Link (for Lion): http://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12
 +
  
 
==== Uninstall Previous Versions of Xcode ====
 
==== Uninstall Previous Versions of Xcode ====
Line 167: Line 174:
 
'''Note:''' ''You must be logged into an Administrator account to use this command.''
 
'''Note:''' ''You must be logged into an Administrator account to use this command.''
  
'''Note:''' ''This command assumes that Xcode was installed at the default location. The path to the uninstall-devtools script may be different if you did not use the default location when installing Xcode from before.''
+
'''Note:''' ''This command assumes that Xcode was installed at the default location, /Developer. The path to the uninstall-devtools script may be different if you did not use the default location when installing Xcode from before.''
 +
 
  
 
==== Set Up Xcode 3 ====
 
==== Set Up Xcode 3 ====
Line 181: Line 189:
 
Continue the installation as normal and let the installation finish.
 
Continue the installation as normal and let the installation finish.
  
==== Set Up Xcode 4 ====
 
When you download Xcode 4 from the Mac App Store, the application should already install itself to the Applications folder once the download is complete.
 
  
 +
==== Set Up Xcode 4 ====
 
'''Note:''' ''If you do not require the build options that Xcode 4 provides, then you may skip this step. See the Xcode Setup section for more details.''
 
'''Note:''' ''If you do not require the build options that Xcode 4 provides, then you may skip this step. See the Xcode Setup section for more details.''
 +
 +
'''Note:''' ''When you download Xcode from the Mac App Store, Xcode should automatically install itself to the Applications folder once the download is complete. If you do not need to make builds that run on Leopard or earlier, then you may skip the rest of this step.''
  
 
To support SDKs older than OS X v10.6 in Xcode 4, you must first install Xcode 3, then make symbolic links from the Xcode 3 SDKs directory into the Xcode 4 SDKs directory. To do this, open Terminal and type the following commands into the command line:
 
To support SDKs older than OS X v10.6 in Xcode 4, you must first install Xcode 3, then make symbolic links from the Xcode 3 SDKs directory into the Xcode 4 SDKs directory. To do this, open Terminal and type the following commands into the command line:

Revision as of 21:18, 31 March 2012

Contents

About the Build Targets

DeSmuME for OS X may be built using several different configurations. Each build configuration is listed in an Xcode project as a "build target." The Xcode project files (provided with the DeSmuME source,) provide several build targets to suit your needs. Many build targets are similar to each other, and so they have been organized into the following categories, based on what the build target produces.


Standard App (Universal)

These build targets produce a self-contained OS X application package (or "app bundle"). These builds use our official OS X frontend to run the DeSmuME emulator, and are designed to run on both PowerPC and Intel processors. In addition, built app bundles are compatible with OS X v10.5 or later.

Build Target Goals:

  • Fully featured.
  • Wide build target compatibility.
  • Wide binary compatibility.

Advantages:

  • Produces a universal binary.
  • Binaries run fast.
  • Can be built on machines running OS X v10.5 or later.

Disadvantages:

  • Requires Xcode 3 to build.
  • Since Xcode 3 is required, builds do not produce the fastest binaries for Intel compared to the Intel-only builds.


Standard App (Intel-only)

These build targets are just like the universal builds, except they only run on Intel processors. Since builds no longer need to rely on Xcode 3 for PowerPC compatibility, build targets can be configured to take advantage of all the latest compiler features available, resulting in faster binaries.

Build Target Goals:

  • Fully featured.
  • Fastest performance.

Advantages:

  • Produces the fastest running binaries compared to all other build targets.

Disadvantages:

  • Must be built on a machine running OS X v10.7 or later.


Legacy App (Universal)

These build targets produce a self-contained OS X application package that uses our legacy OS X frontend to run the DeSmuME emulator. These build targets are deprecated, but continue to exist for historical reasons, and also for people who need an app bundle that can run on OS X v10.4.

Build Target Goals:

  • Binary compatibility with OS X v10.4.
  • Retain legacy code for historical reference.

Advantages:

  • Produces a universal binary.
  • Can be built on machines running OS X v10.5 or later.
  • Built applications are backwards compatible with OS X v10.4.

Disadvantages:

  • These builds are deprecated. We no longer do any active development work on the legacy code.
  • Built applications use the legacy user interface, which does not expose all of DeSmuME's features to the user.
  • Requires Xcode 3 to build.
  • Produces the slowest running binaries compared to all other build targets.


OpenEmu Plug-in

These build targets produce a plug-in bundle that is compatible with the OpenEmu application (http://openemu.org/). These build targets exist to prove that our DeSmuME source code is modular enough to be adapted easily into other applications. In this case, the plug-in contains the DeSmuME emulator backend, while OpenEmu acts as the frontend that runs the emulator.

Build Target Goals:

  • Compatibility with OpenEmu.
  • Proving good code modularity in the source.

Advantages:

  • Compatible with OpenEmu.
  • Built plug-ins are much smaller in size than full application builds.

Disadvantages:

  • Must be built on a machine running OS X v10.7 or later.
  • Binaries only run on machines with 64-bit Intel processors running OS X v10.7 or later.
  • The frontend is handled by a third-party application, which will not expose all of DeSmuME's features to the user.


Available Build Targets

The following chart is a summary of all of the available build targets. The chart shows where each build target resides in which project, and also which operating system that may be targeted.

Project File OS X v10.4 (Tiger) OS X v10.5 (Leopard) OS X v10.6 (Snow Leopard) OS X v10.7 (Lion) OS X v10.8 (Mountain Lion)
Standard App (Universal) DeSmuME (Xcode 3).xcodeproj No Yes Yes No No
Standard App (Intel-only) DeSmuME (Xcode 4).xcodeproj No Yes Yes Yes No
Legacy App (Universal) DeSmuME (Legacy).xcodeproj Yes Yes Yes No No
OpenEmu Plug-in DeSmuME (XCode 4).xcodeproj No No No Yes No

Set Up the Build Environment

All DeSmuME build targets must be built using Apple's Xcode IDE. The Xcode project files, included in the desmume/src/cocoa directory of the source code, are supported for the following versions of Xcode:

Project File Name Supported Xcode Version
DeSmuME (Xcode 3).xcodeproj v3.1.4 (if running on Leopard); v3.2.6 (if running on Snow Leopard or later)
DeSmuME (Xcode 4).xcodeproj v4.3 or later
DeSmuME (Legacy).xcodeproj v3.1.4 (if running on Leopard); v3.2.6 (if running on Snow Leopard or later)

Xcode Setup

It is usually best to install both Xcode 3 and Xcode 4 so that you can use all of the build targets and all of the build options. However, depending on your needs, you may not necessarily need to install both versions of Xcode.

  • If you want to build a standard DeSmuME application that runs on PowerPC machines, you must install Xcode 3.
  • If you want to build a legacy DeSmuME application, you must install Xcode 3.
  • If you want to build a standard DeSmuME application that runs on Leopard, but does not require the build enhancements of newer compilers, then you must install Xcode 3, but you may skip installing Xcode 4.
  • If you are running Lion and you want to build a standard DeSmuME application that does not require backwards compatibility with Leopard, then you may skip installing Xcode 3 and only install Xcode 4.
  • If you are running Lion, and you want to build a standard DeSmuME application that runs on Leopard and also includes the build enhancements of newer compilers, then you must install both Xcode 3 and Xcode 4.
  • If you want to build the OpenEmu Plug-in, you must install Xcode 4.


Download Xcode 3

You can download Xcode 3 from the Apple Developer Connection website. Note that before you can download anything from the ADC website, you must log in using an Apple Developer ID. Once you are logged in, you may use the provided download links to download Xcode 3.


If you do not have an Apple Developer ID, you can register one for free.

If you are not already logged in to ADC, you can log in by accessing the ADC Downloads page.

Once you are logged in to ADC, you can use the following download links for Xcode 3.


Download Xcode 4

Downloading Xcode 4 is very easy! If you are running Lion or later and have any Apple ID, then you can download Xcode 4 directly from the Mac App Store.


Uninstall Previous Versions of Xcode

We highly recommend that you uninstall any previous versions of Xcode before you begin your installation. Doing so will better guarantee that you will have a clean build environment for DeSmuME. The easiest method for uninstalling Xcode is to use the uninstall-devtools script, located in the Library folder of your Xcode installation.

Note: You do not need to uninstall any versions of Xcode that are v4.3 or later. These versions of Xcode are self-contained application packages, which do not conflict with other Xcode versions.

To uninstall Xcode, open Terminal and type the following command into the command line:

sudo /Developer/Library/uninstall-devtools -mode=all

Note: You must be logged into an Administrator account to use this command.

Note: This command assumes that Xcode was installed at the default location, /Developer. The path to the uninstall-devtools script may be different if you did not use the default location when installing Xcode from before.


Set Up Xcode 3

Note: If you do not require the build options that Xcode 3 provides, then you may skip this step. See the Xcode Setup section for more details.

After Xcode 3 is downloaded, you will have a .dmg disk image containing a package installer. Start the Xcode 3 installation by opening the installer, and follow the onscreen instructions until you get to the installation list.

Once the installation list is shown, do the following:

  • Select the Mac OS X 10.4 SDK.
  • If you are planning on installing Xcode 4, take note of the install location. You will need it later for when you need to make symbolic links between Xcode 3 and Xcode 4. We recommend using the default location, /Developer.
  • If you are planning on installing Xcode 4, then deselect the iOS SDK, which is listed under Essentials. Since Xcode 4 already has a newer version of the iOS SDK, installing the version included with Xcode 3 will be a waste of time and disk space.

Continue the installation as normal and let the installation finish.


Set Up Xcode 4

Note: If you do not require the build options that Xcode 4 provides, then you may skip this step. See the Xcode Setup section for more details.

Note: When you download Xcode from the Mac App Store, Xcode should automatically install itself to the Applications folder once the download is complete. If you do not need to make builds that run on Leopard or earlier, then you may skip the rest of this step.

To support SDKs older than OS X v10.6 in Xcode 4, you must first install Xcode 3, then make symbolic links from the Xcode 3 SDKs directory into the Xcode 4 SDKs directory. To do this, open Terminal and type the following commands into the command line:

cd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
sudo ln -s /Developer/SDKs/MacOSX10.4u.sdk
sudo ln -s /Developer/SDKs/MacOSX10.5.sdk

Note: You must be logged into an Administrator account to use these commands.

Note: These commands assume that Xcode 3 was installed at the default location, /Developer. The path to the SDKs directory may be different if you did not use the default location when installing Xcode 3.

The OS X v10.4 and v10.5 SDKs should now be available in Xcode 4.

Download the DeSmuME Source Code

TBD

Download via SourceForge

TBD

Download via Command Line

TBD

Build the DeSmuME Source

TBD

Standard App Build Using the Xcode 3 Project

TBD

Standard App Build Using the Xcode 4 Project

TBD

Official-like App Build Using lipo

TBD

Legacy App Build Using the Legacy Project

TBD

OpenEmu Plug-in Build Using the Xcode 4 Project

TBD

Appendix A: Comparison Charts of Different Builds

TBD

Build Compatibility

TBD

Standard App (Xcode 3) Standard App (Xcode 4) Official-like App (lipo) Legacy App (Xcode 3 Legacy) OpenEmu Plug-in (Xcode 4)
PowerPC, 32-bit Yes No Yes Yes No
PowerPC, 64-bit Yes No Yes Yes No
Intel, 32-bit Yes Yes Yes Yes No
Intel, 64-bit Yes Yes Yes Yes Yes
OS X v10.4 (Tiger) No No No Yes No
OS X v10.5 (Leopard) Yes Yes Yes Yes No
OS X v10.6 (Snow Leopard) Yes Yes Yes Yes No
OS X v10.7 (Lion) Yes Yes Yes Yes Yes
OS X v10.8 (Mountain Lion) Unknown Unknown Unknown Unknown Unknown


Feature Comparison of App Builds

TBD

Standard App (Xcode 3) Standard App (Xcode 4) Official-like App (lipo) Legacy App (Xcode 3 Legacy)
Relative Performance Fast Fastest Fastest Slow
User Interface Current Current Current Based on v0.9.7
Personal tools