[Project_owners] [Fwd: [Bug 188733] Need method to ensure usershave Xprt (eg an Xprt XPI)]

Pete Collins pete at mozdev.org
Sun Nov 16 11:29:12 EST 2003


> 1. On installation time a tar.gz placed within the XPI gets unpacked in
> the chrome dir (not *.jar, I mean *.tar.gz)

Mozilla has no facility to unpack a tarball. You need to add everything 
uncompressed inside of your XPI and then let it be zipped up as part of 
the XPI.

Mozilla can only *unzip* archives

So to do this, you need to do it all from XPInstall.

Your prezipped XPI should have a dir archive something like this:

   chrome/
      all files you want to unpack in the Mozilla chrome dir.

   components/
      all files you want to unpack in the Mozilla components dir.

   my_daemon
      any new dirs you may want to create somewhere within Mozilla


> 2. On deinstallation time the files created with step [1] will be
> removed again

This is certainly possible, just work to do. It is on my list to create 
an easy to use uninstaller for jslib. Others have successfully 
implemented uninstalls.

> 3. On Mozilla startup the shell script "start_my_daemon.ksh" (which is
> part of the XPI) is being called

Yes, you would need to add a js hook in your package overlay that will 
call out to say jslib "run();

   http://jslib.mozdev.org/libraries/io/fileutils.js.html


> 4. On Mozilla shutdown the shell script "kill_my_daemon.ksh" (which is
> part of the XPI) is being called

kill is here:

   http://lxr.mozilla.org/seamonkey/source/xpcom/threads/nsIProcess.idl

If you bug me enough, I can add it to jslib for you. :)

Hope this helps some Roland.

--pete

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




More information about the Project_owners mailing list