Getting TortoiseHG working on OSX

These are the steps I took to get TortoiseHg working on OSX (Snow Leopard), using pygtk and the hgtk script included with the TortoiseHg installation.

  1. Download TortoiseHg. The Windows exe or msi files won’t work, so you’ll need to follow the links to download from source, or go straight here and get the latest version. Extract it somewhere memorable (I went with /tortoisehg/) and take note of the path to the hgtk script (for me it was /tortoisehg/hgtk)
  2. Make sure X11 and XCode are installed. If you’ve got a developer setup they probably are already, otherwise you can install X11 from the Snow Leopard disk and download XCode from Apple. X11 and the tools included with XCode are used to display the TortoiseHg GUIs. If you have XCode and the in Applications you’re good to go.
  3. Download and install MacPorts. The Snow Leopard package is what I used. MacPorts will let us install pygtk, which is needed to run the TortoiseHg GUIs from Python. It also turns out to be really helpful for installing everything else.
  4. Install pygtk. You’ll need to open up a Terminal window and use MacPorts for this:
    sudo port install py26-gtk
    There’ll be a bunch of dependencies that will download and build, this took a few hours on my Mac Mini, and a whole day on my virtual mac.
  5. At this point, I had issues with Python. This may not be the case for you, but when I typed “python” at the command line it was launching the Apple version of python that couldn’t import pygtk, instead of the MacTools version. Try loading up Python and typing ‘import pygtk’ then pressing ENTER to see if it works. If there’s an error message you may need to change your Python version – I used python_select to do this, which I installed using MacPorts:
    sudo port install python_select
    and then
    python_select –l
    to see what versions you have. Pick the one that’s not Apple with e.g.
    sudo python_select python26
    (note the sudo: you may not have permissions if you try the command without it)
  6. Install mercurial. I’m putting this as step 6 because if you do it before you’ve selected the Python version you can end up installing it to the wrong Python. Just grab the OSX 10.6 version and install it from the website, or I’ve found using MacPorts works just fine too
    sudo port install mercurial
  7. Install iniparse. This is needed to get the settings working properly for tortoisehg. You can use the website link, or MacPorts again
    sudo port install py26-iniparse
  8. /path/to/hgtk should work now, but it will only display a list of options and then quit out. Create a symlink of hgtk in one of your PATH directories (I went with /usr/bin/ but use “env $PATH” at the command line to find one that works for you)
    sudo ln –s /path/to/hgtk /usr/bin/
  9. Find yourself a Mercurial repository, navigate to it in the Terminal and type hgtk commit. If you get some warnings about RANDR just ignore them, it’ll still work. TADA!!! There’s our favourite commit window!

Okay, now just make sure your username is properly set up in both the global and repository settings, and you’re good to go.

Now get back to work Smile


I had intended this week to be a treatise on the benefits and drawbacks of some of the distributed version control systems I’ve used recently, but instead it has become necessary for me to discuss a series of unfortunate events.

Several weeks ago I happily registered my shiny new business name – Dinosaur Party Software – and contacted Apple to upgrade to a Company developer program in preparation for my upcoming first game. Unfortunately, I was told in no uncertain terms that Apple had changed their policies “on advice from their legal department” and they were no longer accepting ABNs as a proof of company registration, only ACNs. When I pressed further on this, I was told outright that Apple would no longer accept Partnerships or Sole Traders as business entities. I would either have to incorporate (start a corporation, for the low low starting fee of $600+) or live with my own name stuck to my apps.

I don’t even know where to start on this topic. Sole traders, single programmers, teams of motivated hobbyists are the people that made the App Store what it is!! Giving them the finger is tantamount to bending over for Google to take its sweet Androidy time to jam home its share of the market. Certainly it’s moves like this that paint Apple as the new Microsoft.

The next piece of news is that I’ve lost my iPhone. With some sense of irony the universe deemed to remind me how much I suckle at the technological teat of Steve Jobs creativity right at a time when I most despise it. So with a gathering anger, and a hope that I can switch my plan over when the new iPhone gets released, I bought myself an Android phone outright to tide me over until the Jobs-milk runs anew.

Until a new phone gets announced and ends up in my hot little hands though, there’s little way for me to be able to release my game on iPhone in the next few weeks. Development will continue, but I can’t release without proper testing on hardware. The cross-platform code I’ve written will also prove useful for an Android port…or that’s what I was thinking before I stumbled upon something I definitely should have checked earlier: Google isn’t allowing Australian iPhone Developers to release paid apps onto their marketplace. They have no timeframe for when they expect them to be able to. Fuck. Just….just fuck.

Half the battle is getting it working

Unit testing in XCode.  Using Git with ProjectLocker (or at all).  Using Eclipse for C++ development.  These and many other things had been lingering on my todo list far too long before they actually got done.  And basically this is because I tried them once, and it wasn’t a straightforward path to get them working.

When adopting a new tool, or trying out a new way of doing things, half the battle can turn out to be actually getting it working the way it’s supposed to.  Sometimes, such as when changing to Scrum or XP, learning 3D modelling, or trying to use any of Adobe’s top-shelf applications, this is because it’s hard to learn.  Old ideas or techniques or heuristics need to be thrown out and I have to try and learn from step one in a strange new world that looks eerily like the same computer I was just happily using Visual Studio on.

Some other times, however, it’s not so much a challenge as it is a bare-knuckles bar brawl with the ghost in the machine.  Unit testing with XCode, for example, threw up a random “unknown error” message that Google was powerless against.  It could only be fixed by completing removing, reinstalling and then updating XCode to the Snow Leopard exclusive version.  Eclipse seemed to gag on its own shirt shortly after the installation procedure finished, and a tutorial that was almost 3 versions behind didn’t help.  Eventually a friendly guru helped me to set it up, and I now have a half-dozen *nix-based command-line tools installed on my system that I’m only slowly learning about one at a time.

Git is a similar story.  Like Eclipse, it seems like a damn good idea in theory.  In practice, it requires setting up security keys, which requires ssh, which requires installing yet another half-dozen unknown nix-based command line tools into my windows with blurred lines regarding where the Windows prompt ends and the Nix-prompt begins.  In the end – and I thought I’d never say this – thank god I had a Mac.  With everything already set up in it’s distant-cousin-to-Unix OS, installing and setting up git finally become a “follow the tutorial” affair.  Which was all prompted by wanting the latest version of the fantastic App-Sales Mobile.

Anyway, rambling aside my message for this week is: sometimes trying something new is hard because it takes a refocus, sometimes it’s just not as easy to set up as possible.  If anyone reads this thing, feel free to leave your own comments about installs or set-ups that were way harder than they needed to be, and how you eventually conquered them.

Life on the App Store – one week later

It’s….pretty quiet.  The release day for my app wound up being swamped by more than 40 other apps released in the same category – pushing PlusContact back to page 3.  A miserable position for what was my main hope for visibility on the App Store.  There is an important lesson to be learned from this experience: the Utilities category is a catch-all.  If it’s possible to place an app in a different category, use that as the primary.  Everyone uses Utilities.

Here are some other lessons learned the hard way from my first App Store experience:

/**Read the documentation!**/
I’m in that point in my career where I’ve been using computers for long enough that a lot of documentation is just empty words, and I can pull the meaning out of it a lot faster than it would take to read all the text.  Most dialog boxes I just infer their content from the context they pop up in and the buttons on them.  Well, in this case I missed an important part of the documentation that wasn’t as obvious as I expected, and it gave me all sorts of issues trying to make a beta build.  In future I’ll be more thorough as a skim the documentation :)

/**Reserve the name!**/
My original name for PlusContact was actually “Add Contact”.  A simple name for a simple purpose.  Something Apple doesn’t tell you – people can reserve the names for apps before they even begin working on the program.  This is a brilliant idea for most developers, but it’s been leading to people ‘squatting’ on good app names just in case they feel like developing them later.  The lesson learned: reserve the name on iTunes Connect before creating the project or any assets.

/**Seriously, don’t use the Utilities category!**/
Seriously, don’t use the Utilities category.

I hope this advice helps someone in the long run.  The App store has become much better for us serious developers now that Apple has ended the reign of “essentially the same gallery app with different pictures of girls in bikinis” – suddenly there’s a lot more room to move and be visible in the store – but there’s still a lot of work that developers have to put into getting their app visible and downloaded.


P.S. Thank you to all the people who gave my app such lovely reviews.  It was nice to know – even if I wasn’t visible on the front page of anything – that I was the highest rated app of the last 200 that had been released.  Some of you weren’t even my friends – but you can be now :)

Recovering from boot nastiness

I recently went through the process of installing MacOSX on my Dell Studio laptop, eventually (with much swearing) getting a Dual-Boot system with Vista and OSX running.  Along the way I ran into some problems and their respective solutions, which I’ll list here:

Problem: Starting up from the OSX CD was freezing or only booting sometimes, and when it did work I couldn’t see my hard drive to install on.

Solution: The version of OSX install I was using (iDeneb 1.5) had an issue with AHCI SATA – setting the SATA mode in the BIOS to ATA (or IDE or whatever isn’t AHCI) fixed this quite nicely, and from what I read it should be possible to switch it back after installation (which is good because Vista wouldn’t work without the AHCI setting).

Problem: Once OSX was installed, the computer hung on a blinking underscore and wouldn’t boot anything.

Solution: The blinking underscore happens because the system can’t find a valid bootloader.  The OSX install over-rode Vista’s bootloader, but then didn’t actually install its own.  My solution was to stop trying to use iDeneb and switch to a different OSX86 release.  Booting into Vista and replacing the boot file on the Mac drive with a Chameleon or EFI release probably would have worked too.

Problem: I’ve given up on iDeneb and want to go back to Vista, but there’s no bootloader

Solution:  Getting the Vista bootloader back requires the Recovery Console (from a Vista Install disc go to Repair My Installation and skip all the Wizard crap).  Then in the recovery console type:

bootrec /fixmbr

To fix the master boot record, then

bootrec /fixboot

To fix the boot partition.  In my case, the /fixboot command returned an error, which turned out to be because the OSX install had also made my other partition the active one.  So in the recovery console type


Then use the following commands to find your Vista partition and make it active again

list disk
select disk 0

(in my case it was 0)

list partition
select partition 2

(again, in my case)

detail partition 

(this showed the partition was marked as Active:no)


After these steps the bootrec /fixboot worked successfully and the system booted into Vista without problems.

Problem: OSX installs and boots (finally!), but only into a White Screen of Death with the cursor smeared across the screen like a hot girl in a Saw movie

Solution: ATI drivers are baadfood when it comes to the Mobility HD 4570 in my particular model of Dell Studio 15.  Deleting the ATI driver Kernel Extensions (kexts) from System/Library/Extensions on the max drive forced software rendering, which I’m happy with at the moment.

Most of these instructions should also apply for Windows 7 systems.  I recommend downloading and installing EasyBCD to run a dual-boot system using the Vista bootloader.  It’ll also give you a much easier way to restore the Vista bootloader if you’re luckier than I was and OSX installs successfully.

On Money and Music

Before I head into this weeks rant, I wanted to write a quick aside about my previous post: Frozen Heads and the Naked Man. I’ve been thinking a lot more about it, and I realised that it’s not about the Naked Man at all – it’s about being a man and having the courage to ask for what I want. And while I still kinda want to know if the Naked Man works, it’s much less intimidating if the girl knows that the option for her to say no is out there and acceptable. So instead of “Do you want to come back to my place?”, try “Here’s what I want: I want to take you back to my place and make out and maybe do more. What do you think about that?”. It takes a lot more courage to be able to own it all when I want to escalate, and let her own her own opinion on it. And that’s all I’ve have to say about that for a while I think.

So, on to the topic at hand: money matters. How is it that people less successful than me, with smaller pay checks, still have nicer apartments, more furnishings, better TV’s and can also afford to go out Friday and Saturday nights??!?! I has a money. What I do wif it?This really has me stumped, you guys. I always thought the best way to fix money issues (assuming I’m budgeting properly) was to make more money! Now it seems like I actually need to be female! Somehow the combination of what I would consider ‘normal’ financial pressures, plus the need to buy a new pair of shoes every fortnight has made the fairer sex much more penny-wise. Although that said, they’re also willing to pay $400 for a cardigan.

Aaaanyway, while I’m bitching, why the hell are we as a culture so hell-bent on being deaf in 20 years? Last Friday I was in a bar. Now I don’t want to get into trouble for defaming an establishment, so let’s just pretend it’s called ‘The Agincourt’. The music was so loud that *I* couldn’t hear what I was yelling at people. Now I know that bars have found that when they play their music a little louder, they sell more drinks that night. The reason for this is that when I can’t hear what anyone is saying, I (and I expect a lot of other people) tend to stop talking, not my head blankly, and drink. Quickly. Mainly, this is because I want to get this drink over with and go to a nice quiet cafe instead (yeah, I’m that guy). But if that’s the way most of your clientele are feeling while they’re in your pub, you’re doing it wrong!!

And finally, people with iPods. I’d say don’t get me started, but I’m already out the gate. I don’t need to hear your music up the other end of the bus. You don’t need the music to be that loud to hear it. I tried it once. It hurt. The beautiful thing about portable music players is that they let me bring music into so much more of my life. It’s sort of like having my own soundtrack :). But that’s just what it is to me, a soundtrack. Background music as my feet crunch down the footpath, or as I pant around the jogging track, or as the train lumbers into the station. I simply can’t understand people who want their soundtrack to be so loud they can’t hear their life happening around them. They’re overpowering their best moments, and they’ll never know it. And in 20 years they’ll all be fucking deaf.


(picture thanks to and

New iPhones and the Hero

So this Thursday I finally went into the Apple store to get the intermittent issue with my iPhone looked at. Ever since I first got it, the handset speaker has been popping and cracking in my ear whenever I tried to call someone, making them very hard to hear most of the time. In fact, I think a major contribution to my seething hatred of the iPhone was my inability to actually use mine as a phone! That aside, I never wanted to go back to keypad text-messaging, so I put off the inevitable tech support visit for as long as I could. But my warranty is soon due to expire, so I made my appointment and trundled down to the local Apple store on Thursday.

Intermittent issues are annoying little buggers, and always seem to know when you’re getting someone else looking for them and hide away until you get back home. And lo and behold, as I sat on the annoyingly hip couch in the annoyingly hip Apple store surrounded by computers with single mouse buttons that just screamed “Look at me I’m so f**king annoyingly hip!!” and awaited my turn with the ‘Genius’ aka annoyingly named tech-support geek: my intermittent problem disappeared. :(

Not to worry the Genius, he took one look at the bottom of my case, noticed a crack I didn’t even realise was there, and replaced the whole phone with a brand new refurbished one! Go banana! So after re-restoring, re-jail-breaking, and (annoyingly) losing all my Apps, I gots me a whole new iPhone!

Later it was pointed out to me that Apple get so many tech support issues they do this with everyone they can. That way they can keep their annoyingly hip designs away from anyone who might offer cheaper tech-support out-of-warranty, and in fact is Apple’s way of actively screwing their own suppliers. I guess screwing their customers out of a decent media/sync app wasn’t quite enough for them. :(

So despite my brand new Apple-pod, I still eagerly await the arrival of my HTC Hero, my own personal Jesus Christ. Okay, okay, I’m sure it’s not all that and it’ll probably be either really disappointing or only offered by Optus in Australia (I’m actively begging otherwise from Virgin right now). But it’ll certainly be a huge step up from my annoyingly hip iPhone :)