Yesterday I used a piece of technology to solve a problem that I’ve never before used successfully. To call me shocked would be something of an understatement. But before I get to that, let’s get some background.
One of the side effects of ditching cable is that you end up spending your time watching TV series on Netflix that you had completely ignored before. Currently I am one episode away from being done with the first season of Showtime’s The Tudors, a series that more or less tells the story of England’s King Henry VIII.
The real King Henry VIII doesn’t look much like Jonathan Rhys Meyers. Weird.
It just takes the occasional liberty taken with people, places, events and a major liberty taken with overall cleanliness of 16th century England.
It does however capture the general idea of the history that Henry desperately wanted a male heir to the throne but was largely unsuccessful. When his first wife, Catherine of Aragon doesn’t have a son she gets divorced and the Church of England splits from the Catholic Church.
Catherine of Aragon
When his second wife, Anne Boleyn also doesn’t have a son things got a little more drastic and Henry had her head removed from its spot upon her shoulders. This sort of thing would become something of a regular occurrence during the rest of his rein.
Anne Boleyn with head
I actually went on a tour of the Tower of London where Boleyn was beheaded about ten years ago. I even took this picture since I thought it was funny that they had trashcans stationed about every ten feet.
In retrospect I suppose with that many heads rolling you needed somewhere to dispose of them.
During the same trip I was standing on a corner trying to figure out which direction to look before crossing the street when I noticed a guy wearing a shirt like this one:
That’s the corporate symbol of the company Ximian, which along with places like Eazel, were trying to make a living selling open source desktop software. Remember, this was around 2000-2001, the .com bubble hadn’t burst yet and making money in software still meant following the old Slashdot plan:
- Write application
Eazel eventually went belly up, go figure, but Ximian did something that at the time shocked the Linux community. (Had Henry VIII been around he would have been so mad he’d have probably beheaded someone. It didn’t take much.) They started the Mono project to port Microsoft’s .Net framework to Linux/Unix.
At the time I remember thinking things like:
“You’ve got to be kidding.”
“There’s no way this ends well.”
“The day I use .Net code on Linux is they day take my gcc compiler out of my cold, dead fingers.”
Fast forward to present and I’m sure to your relief the actual *point* of this story. Here I find myself using Mono for something where it was the only tool that would solve my problem. The product I work on, the ALM Reporting Platform, is written in Grails with Groovy and Java and is packaged into InstallAnywhere installers for Windows, Mac OS X, and Linux. The problem I was facing was that the Windows installer was showing up as unknown publisher when I installed on Windows 7:
That’s no good. What I needed to do was digitally sign the installer with our certificates so that instead of unknown we’d come up as verified.
The way to do this is to use some tools from Microsoft to sign the installer with your certificate. I even found an example of how to do it in InstallAnywhere’s knowledge base.
Trouble is, my build environment is a Mac. There is no Windows machine for me to use these tools on and I’d really hate to have to setup some convoluted two machine setup for my relative simple build needs. In a moment of a desperation I wondered if I could run signcode.exe under Mono on the Mac. Then I wondered even further if Mono shipped with a version of signcode.exe. Not having much hope I opened up a terminal and blindly gave it a shot.
Oh. My. God.
I ran the command with my cert and my installer, copied it over to my Windows 7 box, double-clicked and crossed my fingers. Here is what I saw:
I then integrated the command into my official build environment and marked the bug as fixed. And to fix it I used Mono, the .Net of Unix. The very thing that ten years ago I thought I’d never use turns into the tool that saved my bacon. Whaddya know.
And I’ll bet when you started reading this you didn’t think I could tie Tudor England into digitally signing a software installer did you? I’m sure Anne Boleyn would be thrilled. Well maybe half thrilled.