Skip to content

Developer Getting Started: OSX Xcode

Cong edited this page Jan 6, 2021 · 18 revisions

Prerequisites

Clone repo: GitHub for Mac

  1. Click the "Clone in Desktop" button in the repo website.

  2. You should now see the repo contents in /Users/username/cdogs-sdl

Run CMake

  1. Run CMake: for "Where is the source code:" and "Where to build the binaries:", input /Users/username/cdogs-sdl

  2. Click "Configure", using Xcode as the generator; click Done

  3. Click "Generate"; you should now see an Xcode project in /Users/username/cdogs-sdl.

Xcode

  1. Open /Users/username/cdogs-sdl/cdogs-sdl.xcodeproj

  2. Set the cdogs-sdl project as the active scheme (32-bit or 64-bit as desired)

  3. Edit the cdogs-sdl scheme (Product > Scheme > Edit Scheme), and set the Working Directory to /Users/username/cdogs-sdl/src

  4. Click the Run button to compile and run. You are ready to go!

If Xcode crashes when running

This is most likely due to SDL2 framework not being signed properly; Xcode will crash when encountering an unsigned framework. See this page for a workaround: http://stackoverflow.com/a/24559954/2038264