It is surprisingly easy to package and create an installer for a XUL application that you've written. Anyone who uses your application will thank you for it; it will save them a lot of time and effort. Keep reading to see how it's done.
You may have just finished working through my previous XUL tutorial, or you may have been creating applications for a while now, and find yourself in a position where you have a collection of files that when used together form a working application. You will recall that in order to use a XUL application, be that within the Mozilla browser, or as a standalone application, you need to modify certain core Mozilla files. This may be fine for you, but what about your market? Do you think people will want to download a collection of files, set up directories for them and then modify the Mozilla source files?
It's unlikely that many people will, unless your application is targeted solely at developers that actually enjoy doing that kind of thing of course! What you need is a method of packaging all of the files needed to run your application into effectively one file that can be downloaded, double-clicked and then perform the install itself, putting the right files in the right places and updating the relevant Mozilla source files automatically.
Possibly the only thing that it isn't possible for the install script to do is edit the environment variable, which is a shame, because it means that the application in this case isn't completely automated. This can be achieved in other ways. Additionally, on systems successfully configured with XULRunner, users may not need this environment variable set anyway (I don't know in all honesty as I haven't tried myself). XULRunnner is a project aimed at making applications written in XUL run outside of Mozilla so that Mozilla doesn't even need to be installed to run XUL applications. It's still in its early stages at this point and can be tricky to configure, but it will improve. XUL programs designed to run within Mozilla don't have the environment variable drawback.