Developing in SproutCore with Mountain Lion
So Apple released Mountain Lion, and everybody who cares on the interwebs knows that there is a shift with Xcode. (thanks MacRumors!) It’s now just an app like everything else. Cool.
BUT, this hoses other stuff in a pretty awesome way. Including my ability to run SproutCore Server locally. I’m sure ideally I’d have two dev machines, one dedicated to Mountain Lion, but sadly that’s not economically feasible.
Thus: my workaround to get sc-server working and not display a “No Matching Target” error. Its not pretty, and it may even be a terrible idea. But it worked for me. YMMV, don’t sue me if this wrecks your life.
- install sproutcore from the website
- install xcode, and make sure you download the command line tools from developer.apple.com while you’re at it.
- link /Developer to the xcode internal /Developer folder. I used:
sudo ln -s /Applications/Xcode.app/Contents/Developer /Developer - cc is being looked for, but isn’t in that folder. I just linked it to gcc, because I was too lazy to find it. I cd’d into /Developer/usr/bin/ and did:
sudo ln gcc cc - cd into your project and run sc-server. Should work!
- EDIT: make sure you install a Java Runtime if you plan to run sc-build. Otherwise your first one will fail
This is pretty hacky, and I’m quite certain there’s a better way to do it that will leave things less broken for the future. But hopefully it saves SOMEONE a headache. Or maybe just me, once Apple releases Beta 2 and it wipes out my hard drive again. C’est la vie.
