install apple developer tools in the command line

Since years I work on a couple of computers via command line. Since they are real unix computers it all works remarkably well. For a specific solution I need to run osacompile. AppleScript needs to get compiled. I did not find a way to distribute it as text. So finally I got a hold of an OS X machine in the internet. More on that part later. osacompile really wants to run the application that it will talk to later. Also rather odd. But, hey, we talk Apple here. A sect in disguise of a technology company. So everything is possible. Or rather impossible. Like adding a development environment. The Box happened to have no Dev Tools installed. Usually that’s maybe a bit timely but overall straight forward. Installing development tools on a unix computer.
With Apple OS X 10.4.11 it turns out that doing so via ssh is not as trivial. You can download the source code. But first you need to create a developer account with ADC. It’s free. It’s annoying. They keep forgetting my password. Once you logged in,
you could download the dmg file to your local machine. I could have done that and waited only a couple of weeks for my DSL to upload the 900+ MB file to the final server I need it on. Downloading the dmg directly did not work. I had to fake a login. Which is easier as it seems. In the browser that is logged in (firefox I assume) you look for a cookie called ADCDownloadAuth. This you copy paste into the following command line:

curl -b "ADCDownloadAuth=SomeVeryLongCookieString" -O \
http://adcdownload.apple.com/Developer_Tools/xcode_2.5_developer_tools/xcode25_8m2558_developerdvd.dmg

At least that’s the valid file of today.
Once you have the file you attach (aka mount) it via:

hdiutil attach xcode25_8m2558_developerdvd.dmg

and navigate into

/Volumes/Xcode Tools/Packages

to then run:

sudo installer -verbose -pkg XcodeTools.mpkg -target /

Don’t run this against XcodeTools.mpkg in /Volumes/Xcode Tools directly. This results in the error message:

2008-01-09 03:47:43.889 installer[2843] IFPkg::_parseOldStyleForLanguage - can't find .info file (XcodeTools)

which does not google very sucessful.

The install seems to work, from what I can tell so far. I have gcc and make. And that’s all I cared for.

6 Responses to “install apple developer tools in the command line”

  1. Micheal Says:

    Thanks a lot. I was stressing over this problem and I didn’t want to walk over to the server room to do it graphically. All I had to do was cd into the Packages folder. Thanks.

    -Mike

  2. Geoff Says:

    Thanks for this post, it directly addressed the issue I had. I had tried running
    installer in /Volume/Xcode Tools and got the error message you mentioned.

  3. Hakan Kuecuekyilmaz Says:

    Thanks a lot! I had exactly this problem with can’t find .info file.

  4. Andreas Wacker Says:

    just a test to see if the comment system works now

  5. quizno50 Says:

    Thanks! I’m stuck at school and needed to install the dev tools on my box at home and this worked like a champ!

  6. Paul Walker Says:

    Thanks for the post. The lastest (4.0.2) does not have XcodeTools.mpkg, but instead XcodeTools.pkg.

Leave a Reply

You must be logged in to post a comment.