Compiling and Editing ML on Mac with Xcode

Started by dmilligan, September 10, 2013, 04:58:55 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dmilligan

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


fpena06

Doesn't open xcode running and confirmed extension with another file which opens.

dmilligan

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.