[Jslib] General Purpose Uninstall Wizard in jslib v0.1.114

Pete Collins pete at mozdev.org
Fri Dec 5 12:32:46 EST 2003


Neil Deakin just added a very nice general purpose uninstall library for 
jslib.

We haven't documented this library yet, so:

The way it works is, you can call from a menuitem placed w/ you package 
menu overlay.

eg:

<overlay id="hriTasksOverlay"
     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 

   <!-- functions -->
   <script type="application/x-javascript" 
src="chrome://jslib/content/jslib.js" />
 

   <menupopup id="taskPopup">
     <menu id="hri-menu" label="My Package">
       <menupopup>
         <menuitem
             id="mypackage-item"
             label="MP Window"
             oncommand="foo();" />
         <menuitem
             id="mypackage-uninstall"
             label="Uninstall"
             oncommand="jslibUninstall('mypackage');" />
       </menupopup>
     </menu>
   </menupopup>
 

</overlay>


That's all there is to it. This call will uninstall your package via a 
nice GUi wizard.

You can also list non-standard files in you contents.rdf file.

eg:

     <chrome:uninstallInfo>
       <RDF:Seq>
         <RDF:li>foo/foo.data</RDF:li>
         <RDF:li>ComsD:libfoo.so</RDF:li>
         <RDF:li>ComsD:mozIfoo.xpt</RDF:li>
         <RDF:li>AChrom:fooi.jar</RDF:li>
       </RDF:Seq>
     </chrome:uninstallInfo>

This is still a work in progress but I wanted to give a heads up to 
anyone in need of a general purpose uninstall for their moz packages/apps.

New jslib packages should hit the mirros in an hour or so.

Great work Neil!!

--pete

-- 
Pete Collins
www.mozdev.org
www.mozdevgroup.com



More information about the Jslib mailing list