Starting a XUL application from scratch (2 minutes)
Hi there!
As I’m currently ending my training period in Rome, Italy, and as I have a lot of important projects (like, I don’t know…find a job!), I don’t have so much time. But it seems I’m not the only one
.
So today, let’s start a XUL application from scratch, in less than 2 minutes.
I work on Windows XP, but the linux way isn’t more difficult as you are familiar to command lines and know how to use a text-editor…
*Option – Install a much more powerfull shell on your windows!
Windows suffers from a lack. The command prompt is so poor…but we will fix it.
So first, I installed Powershell which a very good shell for Windows. You can use the previous command lines from the old shell if you are familiar to it, or the commands from linux! For example, “dir” (windows) and “ls” (linux) will list files and folders in your directory. Furthermore, the features are much more powerfull, such as autocompletion etc.

Set your environment
You can create a folder which will include the xulRunner binaries and your projects sources. We will call it “XULDev”. Then we need to create the project structure
Create the structure of your application
XULRunner has to know some information about your application, the most important is the Gecko supported versions range (Gecko is the rendering engine used by XULRunner).
So, let’s use the Mozilla technology wizzard I spoke about a few weeks ago! That will just make your job easier and faster. You can let the default properties, just to try, and change it later. Don’t worry.
Hit “Create”, unzip in a folder (let’s call it “yourproject”, and…here we are! We have our complete project structure!
Download XULRunner
Yes, we need of course XULRunner. So we just have to download the last version here, and unzip it in a “xulrunner” folder.
Structure overview
XULDev
|-xulrunner
|-xulrunner structure
|-yourProject
|-default project structure (content, chrome, skin…)
Launch!
Open PowerShell, go to the directory we called “XULDev” using the command “cd Path\To\XULDev”.
Tip : in case you don’t know, just try to hit “Tab” key while you type the path to the folder.
Then enter the “xulrunner” directory. Now, just enter this command line
xulrunner.exe “..\yourproject\application.ini”
Using Powershell and the “Tab” autocompletion is very helpful, as in the original command prompt you have to look at slashes/antislashes, quotes etc. Note that Powershell replaces your relative path with an absolute one.
Hack!
Now that we have our example application, all you have to do is to hack! Code, try, read, learn, experiment, re-code, re-try, discuss, share, improve, distribute.
2 minutes wasn’t enough? That’s because you have to practice
Seriously, if you already downloaded xulrunner, and already know how to use the command prompt, then 2 minutes is overmuch.

Thanks a lot!
It’s just what I needed to get started.