How to install Xcode from downloaded package

Solution 1:

As Adam stated, Xcode 4.3 switched over to being a self-contained application. I would suggest uninstalling the old version of Xcode as he stated, then just copying the new .app over into your Applications folder. Finally, delete the whole /Developer directory.


However, Apple decided to make the mistake of not updating the paths for the development tools. So, you need to update those paths manually. If you've put Xcode in your Applications folder, you can run the following in Terminal to switch the paths over to your new app location:

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

If you need to check the current path, you can do the following:

xcode-select -print-path

Solution 2:

The latest Xcode (4.3) does in fact come in its own stand-alone package, so it will run independently of whatever you have in /Developer. Once installed it lives in Applications like every other app on your system. You will probably find (or have found) that it requests permission to install other parts of itself as required.

If it is not in /Applications, just drag it there - simple as installing any other app. This is a big change from the bad old days of having it in /Developer and having to be careful about removing versions with

sudo /Developer/Library/uninstall-devtools –mode=all

(Once you have no need for the old Xcode you can get rid of it like that, and you should do that rather than just putting it in the trash or rm'ing.)

Once the basic Xcode app is available in Applications you can drag it into the dock, again just like any other app. The support applications, like Instruments or FileMerge or OpenGL ES Performance Detective used to live with Xcode in /Developer but now they can be found under the Open Developer Tool > option in the menu bar's Xcode menu.

Some people like to have these frequently-used apps available in the dock; FileMerge for one is useful at times other than when you're running Xcode. You can find them all in the Xcode app bundle, if you navigate to it in the finder and use Show Package Contents in the right-click contextual menu. The stand-alone tools live under Xcode/Contents/Applications and you can drag them into the dock like any app.

Now the basic install of Xcode does not include everything you might need. You should also take a look in Xcode Preferences under the Downloads tab, and at a minimum install the command line tools - it's a smallish download and doing it immediately will save you waiting later. Under Documentation you will find the option to download Documentation bundles for various APIs. If you don't do this then Xcode will go and fetch documents from the web as you require them. It is much faster to have them installed locally.

Xcode is improving rapidly and this change to the way Xcode installs is really helping to simplify updates and moving Xcode to the status of a "normal" app that installs and interacts with the system the way we are used to apps behaving. The last update with this new scheme was a simple 80MB download initiated from the Mac App Store - compare with previous versions where an upgrade meant downloading 4GB and replacing everything!