I was pretty busy with other classes last week, so I was unable to actually make a post on my Open-Source class, but here’s the update on my progress.
I picked my project, which is going to be the XULRunner Application Packager. This wasn’t one of my original options, but I took an interest in XUL and XULRunner after the Mozilla Developer Days and wanted to do something with it.
Once my project was selected, I moved on to the first logical step, which was LEARN XUL! It was actually pretty easy, well… writing the ‘Hello World’ program was easy. There is a tutorial on the Mozilla site which I followed:
- Download XULRunner, it ends up being a self-contained .zip file since I was using Windows at the time.
- Originally I extracted that zip file in my ‘Program Files’ directory into a folder called ‘xulrunner-sdk’.
- Next I had to set the folder stucture for the application I was going to make.
- There are three files which I had to create and put into directories, ‘main.xul’ went into the ‘content’ directory; ‘chrome.manifest’ goes in the ‘chrome’ directory; ‘prefs.js’ goes in ‘preferences’; and the ‘application.ini’ goes in your main application directory.(I’ll try and make a pic to add to this post).
- There’s some basic code which goes in each of the files, but I won’t go that deep, however I will show you my main.xul code:
<?xml version=”1.0″?>
<?xml-stylesheet href=”chrome://global/skin/” type=”text/css”?><window id=”main” title=”My App” width=”300″ height=”300″
xmlns=”http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul”>
<caption label=”Hello World”/>
</window>As you can see, it is basically just XML, combined with some css to make the app look good. And here’s what it looks like:
First step complete! Create an XULRunner application, now I’m going to look for some advanced applications, since at least now I can understand the structure of the program and how it may work.