Geek@Paris

Install Xcode 3.2.6 on Lion & Mountain Lion

2013-04-12

Although I figured out how it works by myself, I still wanted to find some simpler procedures. Finally, I found these 2 tutorials from Eugene’s blog, which are so perfect that I’d like to share them.

The original URLs are:
http://hamstergene.github.io/blog/2012-04-03-xcode3-lion
http://hamstergene.github.io/blog/2012-11-13-xcode3-mountain-lion

In case they are not available one day in the future (best not, it’s hosted on github…), I copied its content here as a backup.

How to Install Xcode 3 on Lion

  1. If Xcode 3 is on a DMG, mount it.
  2. Open Terminal and cd to whereever the installation package is.
        $ cd "/Volumes/Xcode and iOS SDK"
        $ ls -1
        About Xcode and iOS SDK.pdf
        Packages
        Xcode and iOS SDK.mpkg
  3. Open the installation package like this:
        $ COMMAND_LINE_INSTALL=1 open "Xcode and iOS SDK.mpkg"
  4. Even though the installer ends with “Install failed” message, everything is installed and works properly.
    It works because the installation package does this check for whatever reason:

    Xcode and iOS SDK.mpkg/Contents/iPhoneSDKSL.dist
    function isDevToolsCompatible()
    {
        if ( system.env.COMMAND_LINE_INSTALL == 1 ) { return true; }
        if( system.compareVersions(my.target.systemVersion.ProductVersion, '10.6.6') >= 0
            && system.compareVersions(my.target.systemVersion.ProductVersion, '10.7') < 0 ) {
     
                return true;
             }
        return false;
    }

    Note how they check for == 1 instead of != 0. Not good!

Posted by Eugene Apr 3rd, 2012

How to Install Xcode 3 on Mountain Lion

Unlike with Mac OS X Lion, installing Xcode 3 on OS X Mountain Lion is not problem-free: the kernel extensions render the system unbootable and you will have to repair it. Also, Interface Builder plugins from iOS platform won’t load, so you can’t use iOS SDK with Xcode 3 anymore.

  1. Make sure you know how to boot into single-user mode (hit Cmd+S on boot).
  2. Save a repair script somewhere:
    /Users/my-user-name/repair-script
    fsck -fy
    mount -uw /
    rm -rf /System/Library/Extensions/AppleProfileFamily.kext
    rm -rf /System/Library/Extensions/CHUD*.kext
  3. If Xcode 3 is on a DMG, mount it.
  4. Open Terminal and cd to whereever the installation package is.
    $ cd "/Volumes/Xcode and iOS SDK"
    $ ls -1
    About Xcode and iOS SDK.pdf
    Packages
    Xcode and iOS SDK.mpkg
  5. Run the installation package like this:
    $ COMMAND_LINE_INSTALL=1 open "Xcode and iOS SDK.mpkg"
  6. Uncheck iOS SDK option, or the Interface Builder will not be able to start.
  7. You get kernel panic and your system won’t boot anymore. Hooray. Turn the power off.
  8. Turn the power back on and hit Cmd+S once gray screen appears, then run the repair script:
    # . /Users/my-user-name/repair-script
    # exit

    Done.

Posted by Eugene Nov 13th, 2012

Author:admin | Categories:DeviOSIT | Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


Clickcha - The One-Click Captcha