Home arrow XML arrow Page 2 - Creating an XUL App Installer
XML

Creating an XUL App Installer


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.

Author Info:
By: Dan Wellman
Rating: 5 stars5 stars5 stars5 stars5 stars / 3
May 22, 2006
TABLE OF CONTENTS:
  1. · Creating an XUL App Installer
  2. · Getting Started
  3. · The Installation Process
  4. · Packaging Your Files

print this article
SEARCH DEVARTICLES

Creating an XUL App Installer - Getting Started
(Page 2 of 4 )

I'll be using the application created in the last XUL series as an example for this installer. If you're not, you'll need to adjust the file names and stuff accordingly, but the basic premise should be the same.

You will know from looking at the source files of Mozilla that most of the files needed to run any of the applications of the Mozilla suite are packed into JAR, or Java Archive, files.  These archives then contain the standard directory structure of working XUL applications, making use of content, locale and skin folders.  This means that your XPI file can be made up of just two files: the JAR file containing all of the XUL, RDF and other associated files, and the special JavaScript file that controls the install process. 

This JavaScript file must be called install.js and is a surprisingly small and simple file when used with relatively small and simple applications. We will look at how to construct this file now.  As usual when working with XUL, you'll need nothing more complex than a text editor at this point.

First, we need to set a few variables:

appName = "XUL Edit Lite";
author = "Dan Wellman";
chromeName = "interface";
version = "1.0";

These variables represent information also found in the contents.rdf file located with your main application file.  Next, create a variable to hold the name of the file that will be copied to the user's system:

file = "xuleditlite.jar";

Finally, we can save time later by creating variables to hold the information to be written to the installed-chrome file:

contentPath = "content/"+chromeName+"/";
localePath = "locale/en-US/"+chromeName+"/";


blog comments powered by Disqus
XML ARTICLES

- Open XML Finally Supported by MS Office
- XML Features Added to Two Systems
- Using Regions with XSL Formatting Objects
- Using XSL Formatting Objects
- More Schematron Features
- Schematron Patterns and Validation
- Using Schematron
- Datatypes and More in RELAX NG
- Providing Options in RELAX NG
- An Introduction to RELAX NG
- Path, Predicates, and XQuery
- Using Predicates with XQuery
- Navigating Input Documents Using Paths
- XML Basics
- Introduction to XPath

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials