I'm finding out what a joy it is to write a plugin for pidgin. For those unaware of what that is, it is an opensource instant messaging program that lets you use multiple IM protocols (AIM, YahooIM, MSN Messenger, etc). If you've heard of something called Trillion, it is similar to that. It used to be called Gaim.
Anyways.. here is my problem. I have my power management set up to turn off the monitor after 10 minutes of activity. When I'm home and not using the computer, and someone sends me an IM, I don't usually see it until I use the computer again (or if I get an email, but I'll explain that later). I don't like that. I know I could turn it off, but I'm not gonna do that. So I need to figure out a workaround.
I have my email checking program set up to flash the "scroll lock" on the keyboard when I get an email so the screen saver / power management turns off, like someone is pressing the key every second. So last night I thought, why can't I set up a plugin for pidgin to do something similar? I've never written anything for it before, but since the capability is there and I can stumble through enough c to write the code for it I thought it made sense.
Then I dove into it. Went on the pidgin developer site, looked at the plugin code samples, and realized it was going to be tougher than I thought. The API wasn't very well documented, and the outdated examples (when not " This page is a placeholder pending the completion of this document." -July2007) weren't much help. I managed to write the code for it using the samples there and some code on some guy's blog, then came time to compile it.
If you're a developer of any kind and have a couple free minutes, take a look at the pidgin developer site and see if the compilation instructions make much sense to you. They aren't totally incoherent, but far from straight forward.
- Install cygwin to create a linux-like build environment. The setup of that program was not the friendliest I've used, but I got through it as well as adding the non-default (but necessary for my case) cygwin packages (make, patch, monotone, unzip, wget)
- Running the windows pidgin build environment fetcher using my new cygwin shell to get the needed dependencies (another time-consuming process in itself since it was my first use of it). I especially loved the yes/no question that only allowed "[p/n]" as answers.
- A few compile issues that were no fault of mine, but still had to be researched (and researched) online to figure out how to get it to compile. Finally got down to a single compile error (dealing with ld.exe and -lpurple) and I couldn't figure out how to fix it.
Hours later and I was no further along.
No comments:
Post a Comment