A few weeks ago Aaron Brazell mentioned on Twitter that he had been unable to run Silverlight on his brand new Macbook Air:
I have never been able to run Silverlight on my 3 month old Macbook Air. Can someone help me solve this? cl.ly/image/2r3U1H38…
Silverlight 64 Bit Download Microsoft Silverlight is an application framework for writing and running rich Internet applications, with features and purposes similar to those of Adobe Flash. Install Silverlight.dmg. Download Microsoft Silverlight for Mac Free. With Microsoft Silverlight Mac version, it is easy to write and run internet apps much similar to Adobe Flash. Microsoft Silverlight is a free web- browser plug-in with which you will be getting interactive media experiences, immersive mobile apps, and rich business applications.
This intrigued me, as many random things do. I love attempting to resolve obscure issues, and after watching him struggle for a few days I decided to help out. I spent about an hour, and learned some really cool things about the installation process for Mac apps packaged as ‘.pkg’ files, and how to go about installing them manually.
I had a hard time finding the information anywhere, and figured that, while this is somewhat specific to Silverlight, that it may be useful to others.
Although I use a Mac, and love the beauty of it’s UI, I spend most of my time on the command line. I am a Linux Systems/DevOps Engineer by trade, so I of course interact with most of my daily tasks from the command line.
I needed to download a copy of the Silverlight.dmg file, but quickly found that if you hit the Silverlight site, and already have Silverlight installed you couldn’t get to the download. Fortunately they link you to an uninstall page on their site, so I just deleted the paths specified there:
I restarted my browser, hit the Silverlight site again, and downloaded the Silverlight.dmg file. I did take this opportunity, to inspect my HTTP requests from my browser, and determined the actual URL where the file lives for future reference.
After downloading and double clicking to mount, you can just navigate directly into /Volumes/Silverlight/Silverlight.pkg from the command line. On Mac ‘.app’ and ‘.pkg’ as well as many other items that appear to be files, are actually just specially named directories. Mac styles them to look like files. If you really want, you can right click on such an item and select ‘Show Package Contents’.
Once inside, I took a look around, and quickly noticed that the Contents/Archive.pax.gz
file was where the majority of the data was located based on size, and looking in the Contents/Resources
directory, I found some simple shell scripts and perl scripts.
There is an InstallationCheck perl script, that is used to validate that your system meets the requirements. After looking into it, I couldn’t determine why it would fail to succeed, and neither could Aaron. Attempting to modify this file and install, resulted in the installer reporting some generic error, which was the result of the signature of the InstallationCheck file being different than the stored value. With that option gone, I took a look at the other files.
I found preflight
was a shell script version of the uninstall instructions on the site. And postflight
went around cleaning some things up and generating CPU specific optimized libraries for Silverlight to use, as opposed to just-in-time compilation.
Back to Archive.pax.gz
…
I quickly recognized the ‘.gz’ extension, as that is a standard gzip file extension. I however, did not recognize the ‘.pax’ file extension, although after reading a little about it), I am a little surprised I didn’t.
In any case, after gunzipping and unarchiving using pax
, You basically get a directory hierarchy that can be dropped into the root (/) partition on your Mac. So to keep from wasting any more of your time, let’s get on to the actual steps to get it working:
Neooffice for mac. Note: I wouldn’t try just copy/pasting that whole block. Run each command separately to avoid potential issue.
Close your web browser(s) and reopen visiting the following URL to test Silverlight:http://www.microsoft.com/getsilverlight/default.aspx
At this point you should have a Silverlight working on your Mac, or at least it was for Aaron:
My Silverlight issue was solved manually by @sivel with this series of commands. Free software mac. Sheer brilliance. gist.github.com/b56105b0748f7e…
— Aaron Brazell (@technosailor) December 27, 2012That Github Gist, still exists, and contains the same steps as outlined above.
Most of those instructions are pretty self explanatory, the one that is not is probably the sed
command. Basically in postflight
it kicks off a number of commands into the background that utilize a binary called coregen_i386
. It also deletes the coregen_i386 binary. In my testing I found that it often deleted the coregen_i386 binary before all of the coregen_i386 commands had executed, causing some of them to fail. So the sed command does an inplace edit of the postflight file to remove the rm -rf
commands to delete the coregen_i386 and coregen_x86_64 binaries.
Anyway, hopefully this helps someone else. Enjoy!