Thinking like a mac (old post)
Those of you playing WoW since the latest
patch have probably noticed a few of your favorite mods going
through some growing pains. The most notable of which is probably
Omen. Omen is a great tool but they've been having to update nearly
every day (sometimes 2-3 times) because of the recent changes.
Eventually Nicole and I became frustrated with this and she gave me
a 'programming excersie' to write something to handle this.
My first instinct was to write a shell script
to handle this, then dump it in a copy of the WoW Launcher app so
it could be launched from the Dock as an actual application. This
method is pretty hacky and I wanted to hand this out to some
friends, and I didn't want it to be a complete
hacky pile.
Enter my local Mac fanboy/oracle Dave
(http://freeke.org/ffg) with a suggestion to
use Mac's Automator app. Here is where my normal habits of writing
some shell script on a Unix machine to handle simple tasks get
called in to question. Dave's initial suggestion was to just put my
shell script in an Automator, but this tool is pretty darn useful
on its own. The screen shot below illustrates the simplicity of
grabbing our latest mod version, unziping it, and starting wow.
Something that a shell script could of course do pretty quickly,
but this feels like the Mac way ;)

Uploaded with plasq's Skitch!
I'm quite impressed with how dead simple it
was to get this working, and being a Automator n00b I'm sure I am
going the long way round, it I still find it quite nice. The best
part is the Automator workflow can be saved as a proper 'app' which
can be launched from the Dock, all this in something like 15
minutes with Automator (which brings my life total Automator usage
to 30 min).
The longest part of this whole experiment was
putting the icing on this workflow. Figuring out how to effectively
edit mac .icns files was an interesting experience in itself. (tip:
When in doubt, type 'icon' in spotlight)

Uploaded
with plasq's Skitch!
That is the least impressive icon you've
probably ever seen, but the goal of this was to have an Icon, not
to get an award. Once my app had an icon the next step was
packaging. This was pretty easy once I looked over the hdiutil man
page and used skitch to make a quick and dirty background.

Uploaded with plasq's Skitch!
Overall thinking like a Mac (with a little
help of course) has given me a fairly simple way to keep my Omen
settings up to date, and hopefully it'll help out some of our Mac
WoW guildies. The whole experience was interesting just in learning
a bit about the 'icing' bits like custom disk images with views and
backgrounds, to editing icons. The funny part is it probably took 3
times as long to get all the 'icing' on the cake than it did to
bake the thing.
Maybe someday I'll get off my lazy ass and
write something that takes longer to make, than to package.
permanent link