How to install Xcode from downloaded package I recently uninstalled all dev tools from OS X after having issues with gcc and realizing both Xcode 3 and 4 were installed - but not before saving an Xcode package file to the desktop. It's over 3 GB and I assumed that in some way I could use that to re-install it.

How can I use it to re-install Xcode?

The purpose for re-installing is so that I know for certain that the latest version of Xcode is being used for any future attempts at compiling code which I call from the terminal (for a local build of Google's V8).

P.S. Do I even need to re-install at all? I don't understand why double-clicking on this 3 GB Xcode file does seem to load the IDE just fine which seems to indicate it's relying on compilation tools and other components held inside the package, rather than looking for them elsewhere in the system. (Which I imagine should be the case considering the fact that I just *un*installed dev tools from OS X.)
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 &gt; 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!