I’ve recently become involved in a project where the client application will be developed using the Mozilla Gecko engine and framework. I’m not directly working on the client, but as lead developer I’m at least expected to be familiar with the underlying technology.
I do have played around with XUL and JavaScript before, a long time ago, but at that time the only way to deploy applications was to first install the Mozilla suite (Firefox was almost non-existing back then, or at least unheard of) and then your application on top of it. That meant tons of application specific stuff to the Mozilla suite that your application never had any need for.
Enter the XULRunner — a runtime environment for XUL based application.
Introduction
One of the main ideas about XULRunner is that you can have several applications share the same runtime that the runner provide (henche the “run” part of the name). So one way to deploy it is to install XULRunner separatly and make sure it is in the system path so that your XUL based applications — intalled elsewhere — can find and launch it.
An alternative is to bundle the XULRunner together with your XUL application and install them in one place.
For our development purposes there’s no difference. To keep everyhing clean we will use the former method and keep them separated for this tutorial.
Note: Just as other times before the following intstructions make the assumption that you are developing on GNU/Linux just like me. I will take a concious ignorant position towards other platforms for the time being. But any serious developer will be clever enough to subsitute the instructions for his or hers platform of choice. The difference between them isn’t that big.
8 comments
Ok, that’s all for now. I wrote this very quickly and there probably are some errors and overlooked issues in the tutorial.
Will get bakc to it when time permit.
Hi,
there is indeed one minor error….
The window you give in start.xul is not displayed because it is empty. Better put something in it, a label, button or something like that.
Regards,
Andreas.
Did everything mentioned in the tutorial, double and triple checked, and finally added the following in the start.xul (before the tag):
Alas, no joy (or xulrunner window, or even error messages). Would it be possible to post a zip file containing all the directories and files?
Jeff
Jeffrey, for me i had to modify the xulapp.cmd file on windows to be ..\xulrunner\xulrunner application.ini and then i got a small window to appear with nothing within it… but if you put something in there it works fine…
Aw. Here I was thinking that I was going to get some ideas of what I could do with my Sunday afternoon.
ok
I also followed the instructions to the letter and nothing appeared. xulrunner appeared in the process list and all, but nothing was shown.
I do not know where I got the inspiration but an idea appeared in my mind: I renamed all the directories to lower case and changed the name of the app to lower case in all the files and it finally started! why is this not mentioned anywhere? go figure
All the directories in my blog post are lowercase, so I don’t see why anyone would get the idea of making them uppercase?
Post a comment