XML
  Home arrow XML arrow Page 3 - Creating an XUL App Installer
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
VeriSign Whitepapers 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
XML

Creating an XUL App Installer
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2006-05-22

    Table of Contents:
  • Creating an XUL App Installer
  • Getting Started
  • The Installation Process
  • Packaging Your Files

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    At the virtual BlackBerry Technical Seminar 2008, you can ask your development questions directly of Research In Motion® (RIM) experts, and take advantage of learning opportunities designed uniquely for BlackBerry solution developers. Register Today!

    Creating an XUL App Installer - The Installation Process


    (Page 3 of 4 )

    To start the installation process, we need to initialize it and provide the chrome registry with the registry key:

    initInstall(appName, "/"+author+"/"+chromeName, version);

    The initInstall method takes the plain-text, or friendly, name of your application, followed by '/author name/application name/' which should match the information in the main contents.rdf file.

    To tell XPInstall where to copy your application files to, you use the getFolder method to obtain the target directory, and the setPackageFolder method to set it as the target directory:

    installDir = getFolder("Chrome","");
    setPackageFolder(installDir);

    The addFile method assigns a source file to be copied to the target directory.  It takes just one parameter; the name of the source file:

    addFile(file);

    You can also use the addFolder method to assign the source files for the installation if your XPI archive contains a directory structure instead of a JAR file.

    You now need to specify what information is added to the installed-chrome file, a key element of the chrome-registry.  This is done using the registerChrome method which takes three parameters: what to install and how to install it, where the files can be found, and the path to the files:

    registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome",
    file), contentPath);
    registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome",
    file), localePath);

    Note that skin packages normally reside within their own JAR archives, which is why I haven't specified a SKIN| DELAYED_CHROME install.  DELAYED_CHROME means that the new chrome will be installed once Mozilla has been restarted (when the chrome.rdf file is regenerated).

    Finally, the performaInstall method is called, which actually performs the installation.  This is the point where the specified files are actually copied, and the necessary file updates occur:

    performInstall();

    More XML Articles
    More By Dan Wellman


       · Hi everyone,Hope you enjoy this article, again this is one of the easier aspects...
     

    XML ARTICLES

    - Path, Predicates, and XQuery
    - Using Predicates with XQuery
    - Navigating Input Documents Using Paths
    - XML Basics
    - Introduction to XPath
    - Simple Web Syndication with RSS 2.0
    - Java UI Design with an IDE
    - UI Design with Java and XML Toolkits
    - Displaying ADO Retrieved Data with XML Islan...
    - Widget Walkthrough
    - Introduction to Widgets
    - The Why and How of XML Data Islands
    - Creating an XUL App Installer
    - Overlays in XUL
    - Skinning Your Custom XUL Applications


    Iron Speed





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway