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

Pete Collins pete at mozdev.org
Mon Nov 17 10:55:33 EST 2003

> Well, then I have a huge problem... or not. AFAIK does the unzip stuff
> not restore permission flags, including the +x (executable) flag for
> user, group, others, right ?

Permissions are only relevant to a unix install right?

> What is going to copy the files in the my_daemon/ dir to the Mozilla
> dirs (note that the XPI should be working for plain, unprivledged users
> as well...) ... ?

Well if the user is on unix and running as a regular user and the 
Mozilla target is a system wide install. Then the user will not have 
permission to create a dir in the mozilla bin dir. So you can do what 
many other Mozilla apps do. Install in the user profile dir or present a 
dialog to the user at install time explaining that they don't have 
permission to write to the dir and they need to do the install as root.

I will be adding a dialog to the jslib install shortly to do just that. 
Right now I automatically install in the user profile dir if the mozilla 
bin install fails.

> Most of the XPI packages only consist of a few files... but I am talking
> about ~~220 files to remove... unless there is a recursive "delete
> files" function it will be quite problematic...

Of course:


js> include (jslib_dir);
js> var d=new Dir('/tmp/exampleDir');
js> d.remove(true);  // recursive remove of /tmp/exampleDir

> Somehow - after around 40h trial-and-error hacking I still fail somehow
> to get even such a simple thing working (yes, I know... shame on me...
> shame...) ... ;-(

Roland, it's not shame on you. The pain you are experiencing is because 
of a few things.

1. Mozilla is not evolved enough to be an "easy to use" app development 
platform.  I have been planning for MDG to focus more on this in 2004. 
It is a priority for us to help make Mozilla a robust application 
development solution.

2. Because of the poorly documented and very disorganized app dev 
environment, there is a lot of pain. This is why projects like jslib and 
others exist. To help reduce the pain. If things were just a little more 
general purpose, then life would be *so* much better for MAD'ers.

> Half and half... still no success this afternoon, evening and night...
> it looks either the Mozilla XPI API is not able to do what I want or I
> am too dumb to get it working somehow... ;-(

XP Install will get you what you need installed.

To execute/start your deamon at mozilla launch time, you need to have an 
overylay w/ some js the will call on jslib or whatever to spawn off your 
shell script as a seperate process. Take a look at any mozdev project 
that has an overlay to get an idea on how to do this.

eg overlay:


The overlay lives in you content dir and is described in your 
contents.rdf manifest. Once you properly have that as part of your 
package, then you can execute any command you want when Mozilla is 
launched. You can even rewrite existing Mozilla js code if need be.

You need an overlay to ececute your new process.

What you want to do is certainly possible. I've already done most of it 
in one way or another.

To be honest it riles me that things are *still* as much of a pain as it 
was three years ago writing apps for Mozilla. This is why it is a 
mission in 2004 to really make the change required to fix this problem.

I hope this helps.

I also hope you don't have a c++ shared object you are instaling as 
well. Because there is a whole other set of things (pain) required to 
get it to work properly in a Mozilla release install.  :)


Pete Collins

More information about the Project_owners mailing list