mozdev.org

QuickTools    

resources:

API for XPInstall
- See Demo

While creating install.js you may have noticed there is very little capability for user interaction.

XPInstall do provide a way to pass arguments but still what we can do is limited. Even there no escape(), unescape() functions to convert the passed argument thru Install.argument.

So I have written few API to manupulate data in the Install.argument

The method I used is using a web based Html Form collect all information to send to XPInstall. And inside XPInstall process retrieve all data as a collection. So that by specifing form elements name as key u can retrieve all the data back.
Like:

 var thisEnv = getEnv()

 // to display value of a form element
 alert(thisEnv.formdata['<form_element_name>'])


new objects I made are "Env" and "List". An instance of it can be created using global functions getEnv() and getList(). In additional to provide Env object first time call of getEnv() will also update built it "String" object to provide more method like trim(), ltrim() head(), tail() etc. These are extra functions needed to process "List" object.

See Demo and Documentation
Download envinfotest.xpi (include Documentation and the Demo Html page)

DevEdge - XPInstall Guidelines
DevEdge - Reference
DevEdge - Return/Error Codes (DevEdge)
Mozilla.org - Learn By Example
Mozilla.org - Packaging
Mozdev.org - Installing Applications
XULPlanet - Creating an Installer
XULPlanet - InstallTrigger
Version Check Demo
User Notes: [?]

If you do not get a response to a question posted in this forum, please try sending a message to the project's mailing list or to the project owner directly.

[1] Submitted by: Alex on Monday September 1st 2003

Sorry alex, no spam please -biju



The quicktools project can be contacted through the mailing list or the member list.
Copyright © 2000-2009. All rights reserved. Terms of Use & Privacy Policy.