{"id":1924,"date":"2011-07-20T10:10:38","date_gmt":"2011-07-20T14:10:38","guid":{"rendered":"http:\/\/www.red-sweater.com\/blog\/?p=1924"},"modified":"2011-07-20T10:41:07","modified_gmt":"2011-07-20T14:41:07","slug":"get-lion","status":"publish","type":"post","link":"https:\/\/redsweater.com\/blog\/1924\/get-lion","title":{"rendered":"Get Lion"},"content":{"rendered":"<p>Today <a href=\"http:\/\/www.apple.com\/macosx\/\">Apple released OS X Lion<\/a>, aka Mac OS X 10.7,\u00a0the latest in the decade-long run of incredible updates to Mac OS X.<\/p>\n<p>I encourage everybody to <a href=\"http:\/\/itunes.apple.com\/us\/app\/os-x-lion\/id444303913?mt=12\">upgrade to Lion<\/a>. I&#8217;ve been running it for months in pre-release form, and even while the bugs were being ironed out, I found the experience of using it to be (mostly) superior to running 10.6.<\/p>\n<p>If you want a more detailed analysis of Lion&#8217;s features, sit down with a tall glass of your favorite beverage, and read John Siracusa&#8217;s <a href=\"http:\/\/arstechnica.com\/apple\/reviews\/2011\/07\/mac-os-x-10-7.ars\">famously detailed review<\/a>. If you&#8217;re looking for a quicker overview, check out Jason Snell&#8217;s <a href=\"http:\/\/www.macworld.com\/article\/161026\/2011\/07\/osx_lion_review.html\">Macworld review<\/a>, or my developer buddy Matt Gemmell&#8217;s <a href=\"http:\/\/www.guardian.co.uk\/technology\/2011\/jul\/20\/mac-osx-lion-review\">guest appearance at the Guardian UK<\/a>.<\/p>\n<h3>Supported Systems<\/h3>\n<p>We have known for some time that Mac OS X Lion would drop support for a number of Macs. In particular, all Macs that do not support Intel&#8217;s 64-bit memory addressing are not qualified to install the OS. But I was curious to know a bit more about how Apple makes this determination when, say, a user is browsing the Lion &#8220;product&#8221; in the Mac App Store.<\/p>\n<p>As I described <a href=\"http:\/\/www.red-sweater.com\/blog\/1566\/the-future-of-mac-app-store-installs\">in an an earlier post<\/a>, you can learn a lot about a product in the App Store by inspecting the HTML that makes up the product page, and by manually loading the references resources. In the case of Lion, the &#8220;Buy Now&#8221; button contains a number of parameters intended to inform the Mac App Store client about whether a sale should be allowed, and what some of the conditions of sale are. In the case of Lion, here is the raw HTML:<\/p>\n<pre style=\"font-size: 1em; white-space: pre-wrap;\">&lt;button is-rental=\"0\" dk-id=\"30\" is-pre-order=\"0\" preflight=\"http:\/\/a5.mzstatic.com\/us\/r1000\/\n065\/Purple\/cd\/82\/29\/mzm.tvvarwmu.pfpkg\" item-name=\"OS X Lion\" bundle-id=\"com.apple.InstallAssistant.Lion\" version-string=\"10.7\" buyparams=\"productType=C&amp;amp;price=0&amp;amp;salableAdamId=444303913&amp;amp; pricingParameters=STDRDL\" large-icon=\"http:\/\/a4.mzstatic.com\/us\/r1000\/083\/Purple\/00\/00\/00\/ lion.170x170-75.png\" is-install-button=\"0\" is-update=\"0\" check-is-osx-server=\"http:\/\/r.mzstatic.com\/static\/isOSXServer.pfpkg\" is-free-download=\"0\" adam-id=\"444303913\" metrics-leaf=\"1\" metrics-loc=\"Buy\" class=\"button-area\" aria-label=\"Install, OS X Lion, Free\"&gt;\u00a0 \u00a0 &lt;span class=\"price\"&gt;Install&lt;\/span&gt;\u00a0 \u00a0 &lt;span class=\"left-cap\"&gt;&lt;\/span&gt;\u00a0 \u00a0 &lt;div class=\"inner\"&gt;&lt;span&gt;Install&lt;\/span&gt;&lt;\/div&gt;\u00a0 \u00a0 &lt;span class=\"right-cap\"&gt;&lt;\/span&gt;\u00a0 &lt;\/button&gt;<br \/><\/pre>\n<p>If you load the &#8220;preflight&#8221; URL content from the command line, and unarchive it with the &#8220;xar&#8221; tool, you get a few files including a file called &#8220;Distribution&#8221;:<\/p>\n<pre style=\"font-size: 1em; white-space: pre-wrap;\">% mkdir TestFolder; cd TestFolder\n% curl -O http:\/\/a5.mzstatic.com\/us\/r1000\/065\/Purple\/cd\/82\/29\/mzm.tvvarwmu.pfpkg\n% xar -x -f mzm.tvvarwmu.pfpkg\n% more Distribution\n<\/pre>\n<p>Inside you will see a number of constant constraints such as <strong>hostArchitectures=&#8221;x86_64,i386&#8243;<\/strong>, but also more nuanced tests that, for example, test the current computer&#8217;s motherboard model ID with a fixed list of allowed values. Presumably this will prevent the App Store from allowing (without some hacking) downloading Lion and installing it, for example, on a Dell PC that happens to meet the ostensive hardware requirement.<\/p>\n<p>Perhaps the most heartwarming bit of code in this relatively complex document is a small function call from the start of the test for whether the install should be allowed on this computer:<\/p>\n<pre style=\"font-size: 1em; white-space: pre-wrap;\">function isSupportedPlatform(){\n\n        if( isVirtualMachine() ){\n                return true;\n        }\n<\/pre>\n<p>It has already been announced that Lion 10.7 will finally support virtualization, e.g. with the use of products such as VMWare or Parallels. This install-time test seems to drive home how true that is.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today Apple released OS X Lion, aka Mac OS X 10.7,\u00a0the latest in the decade-long run of incredible updates to Mac OS X. I encourage everybody to upgrade to Lion. I&#8217;ve been running it for months in pre-release form, and even while the bugs were being ironed out, I found the experience of using it [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[63,14,20],"tags":[],"class_list":["post-1924","post","type-post","status-publish","format-standard","hentry","category-app-store","category-apple","category-hacking"],"_links":{"self":[{"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/posts\/1924","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/comments?post=1924"}],"version-history":[{"count":9,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/posts\/1924\/revisions"}],"predecessor-version":[{"id":1933,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/posts\/1924\/revisions\/1933"}],"wp:attachment":[{"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/media?parent=1924"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/categories?post=1924"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/tags?post=1924"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}