Sunday, June 26, 2011

Downloading Massive Files with a Mac

Damn that slow broadband. I needed to download the latest version of the Apple Developer's iOS toolkit. A whopper at 4.1GB. The best I've ever got from my ISP is about 0.7M. I thought I'd click on the HTTP download link and leave it running overnight. Next morning: dismal failure at about 3GB, so no DMG file downloaded :(.

Inspired by this post, I had a go at WGETing the file instead, which should be a faster download, and automatically accommodate errors/breaks in net connection... but I had a few hurdles to clear:

  1. OSX 10.6 doesn't have wget installed. I had previously installed the wonderful Homebrew package manager, and allowed me to install wget with brew install wget. Please note that you do need a version of the OSX Developer's Tools (ie, the one on your OSX install disc) prior to installing Homebrew. Worth installing Homebrew, just to make your future life much easier.
  2. To use wget for the SDK download, you need to indicate to Apple that you have a Developer's account. To grab the cookie, install Firefox's cookie exporter, log in to the the Apple Developer site and export (save) your cookies.txt file.
  3. Navigate via Terminal to the directory you saved cookies.txt, then run the following:

    wget --cookies=on --load-cookies=cookies.txt --keep-session-cookies --save-cookies=cookies.txt https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_3.2.6_and_ios_sdk_4.3__final/xcode_3.2.6_and_ios_sdk_4.3.dmg
    --2011-06-22 19:09:30-- https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_3.2.6_and_ios_sdk_4.3__final/xcode_3.2.6_and_ios_sdk_4.3.dmg
  4. Sit back and make a few cups of tea, or strip your car engine, go for a long walk. Took about 5 hours, despite the download being interrupted twice. The SDK downloaded just fine and now I have the newer SDK and XCode tools installed.

No comments:

Post a comment