Author Topic: Compiling and Editing ML on Mac with Xcode  (Read 3050 times)

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Compiling and Editing ML on Mac with Xcode
« on: September 10, 2013, 04:58:55 AM »
I've setup an xcode project for compiling and editing ML on a Mac. I'll have to say it's pretty dang spiffy. The Xcode editor is very nice, syntax aware, auto-indent, auto-complete and 'Jump to Definition' works very well (Jump to Definition is invaluable for newbies to the ML code base like myself). You can search in project files for symbols, regex, etc. When building, Xcode automatically jumps to and highlights code errors and warnings. It's all pretty sweet.

I thought I'd share the project file in case anyone else would like to use it:

https://bitbucket.org/dmilligan/magic-lantern/downloads/magic-lantern-xcode.xcodeproj.zip

Download the project file to the root of your ML source, which needs to be: ~/magic-lantern
You will need to change PWD build setting if you want to locate it somewhere else. Also depending on your setup you may need to modify PATH. The PATH I setup assumes you used brew to install various things ML needs to compile.

There's a target called 'do-not-build' this is to get all of the autocomplete stuff to work, if you create new source files or modules, make sure to add them to this target so that auto-complete and such will work with them.

TODO:
Get the emulator setup and be able to run it automatically from Xcode with the debugger.

EDIT: zipped the project file b/c apparently it wasn't working

fpena06

  • New to the forum
  • *
  • Posts: 42
  • 7D
Re: Compiling and Editing ML on Mac with Xcode
« Reply #1 on: September 10, 2013, 05:19:49 AM »
Thanks! Will take a look.

fpena06

  • New to the forum
  • *
  • Posts: 42
  • 7D
Re: Compiling and Editing ML on Mac with Xcode
« Reply #2 on: September 10, 2013, 05:53:52 AM »
Doesn't open xcode running and confirmed extension with another file which opens.

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Compiling and Editing ML on Mac with Xcode
« Reply #3 on: September 10, 2013, 02:02:18 PM »
Xcode project files are actually folders so maybe something like that got screwed up in my upload. I'll try zipping it and uploading that.