Sunday, October 19, 2008

Released into the wild

Open source development has been a roller coaster ride in the most extreme sense.

It's been like trying to climb a vertical wall, and facing a challenge that just doesn't seem possible. Moments of "EUREKA!! I'VE GOT IT!!!!" are proceeded almost immediately with "Wait, that's not what I'm supposed to do at all...", and followed soon by "Yet another dragon to slay. *sigh*".

It's not like other courses, where intuition nets me a B+ and can finish assignments in a midnight rush. Here, my intuition leads me into confusion and circular mazes. I used to be able to think up contingency plans effortlessly until the problems get solved; with Open Source, none of these plans work out in the end... ever. It's like being Superman, but without the power of the yellow sun.

Here's how yesterday started:

I thought I had achieved a peak of pure genius when I changed MyBrowser's application.ini file to recognize Gecko 1.9 (which C3d needs). Sadly, it refused to install the extension through addons.mozilla.org. So, I default to using a Minefield build, which installed C3d just fine, but it didn't carry the extension when rar'd and sent to another computer.

At the brink of despair, I plodded back into #seneca, where I was greeted with welcome arms and a new strategy. Instead of hacking Firefox to store everything locally, I could just run "make profile" to do almost the same thing. Extensions became simple to include, too. I suppose I had wandered alone long enough to earn the one answer I needed to finally achieve the goal.

Then, mfinkle pops in and tells me I can still do what I need to do, but through MyBrowser instead. After several loops through editing rdf's and ini's, I am now back to coercing MyBrowser to use the C3d extension...

Here's the details on the mixed adventure, rephrased so I sound like I almost know what I'm doing.

Thursday, October 16, 2008

XULRunner progress

I look at the clock and groan.

Tweaking application.ini for MyBrowser lets me run it for Gecko 1.9 (the same platform that Canvas 3d is limited to), but it still won't let me install the C3D extension for it.

I decided that it'd be easier to start with Firefox and remove unnecessary features, than try to improve on Smedberg's MyBrowser. For one, Firefox has documentation...

I now have a Minefield build that can render a 3d context. Yay! But, as Jesse has pointed out, I can't just zip the bin folder and send it to someone; the homepage settings and installed extensions for it seem to be buried somewhere else in my computer. It's like ripping a heart out and expecting it to work without the veins.

I am now delving through source code, looking for places where FF stores data in "Documents and Settings" so that I can tell it to store data in the same location as the executable. Finding these places is one nightmare, figuring out how to change it is salt in the wound. Despite that, I plod onwards; there are people awaiting the results.

Sunday, October 5, 2008

A first look at XULRunner

I spent the weekend figuring out how to make extensions in Firefox. The goal is to figure out what's needed to port Canvas3D into XULRunner. It was supposed to be a straightforward operation, but reality is rarely kind. The ride went like this:
  1. Get recipe.
  2. Execute recipe.
  3. Taste the cake.
  4. The cake explodes.
  5. Look for another recipe...
One example? I download the XULRunner SDK, and it seems the SDK is more for building XULR rather than building extensions for XULR. (I could be wrong.) Another? The sample extension didn't appear like they promised, until I added a second test extension. Of course, the features overwrote each other.


So far, this guide has been the most helpful for getting something up and running to work with:
http://developer.mozilla.org/en/Building_an_Extension

At the end of the day, I've learned how to make a simple extension. Woo! Also, I've got a working version of Canvas3D 0.2 running on my main Firefox3, and it's looking good. Downloading the C3D extension wasn't quite the nightmare I was taught to fear.


Next on the todo list:
  • figure out what files are installed by Canvas3D
  • update my C3D Library 0.2 to the 0.5 version
  • build an extension that works on a portable XULRunner package
It seems running things in XULR will be a whole 'nother beast...