Structure
We start by creating a directory structure for our project.
So let’s begin with a main directory for our project to keep everything in one place, I call it xulproj:
$> mkdir xulproj
Then create another directory for our application in the xulproj directory, I call it xulapp:
$> cd xulproj
$> mkdir xulapp
Now we need to create additional directory structure in our xulapp directory:
$> cd xulapp
$> mkdir chrome
$> mkdir chrome/content
$> mkdir chrome/content/xulapp
$> mkdir defaults
$> mkdir defaults/preferences
That’s it. Now we got the necessary directory structure in place. But aren’t we missing something?
There Is Only XUL
You might have guessed it already. We need the XULRunner.
Download XULRunner, in our case the stable 1.8 branch, from the Mozilla project [1] site.
Unpack it into our main project directory.
Brief Recap
Our directory structure should now bear the resemblance of something like this:
- xulproj/
- xulapp/
- chrome/
- content/
- xulapp/
- content/
- defaults/
- preferences/
- chrome/
- xulrunner/
- …
- xulapp/
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