MozillaZine

Profile Chrome landed in Mozilla

Talk about add-ons and extension development.
asa

User avatar
 
Posts: 684
Joined: November 4th, 2002, 4:16 pm
Location: CA

Post Posted March 6th, 2003, 10:13 am

Is this working in Phoenix? Can we get the extensions ported to install to profiles rather than the Phoenix install directory? http://bugzilla.mozilla.org/show_bug.cgi?id=162960

--Asa

djk

User avatar
 
Posts: 219
Joined: November 5th, 2002, 6:06 am
Location: SC, USA

Post Posted March 6th, 2003, 10:25 am

If extensions are indeed enhanced to install into a profile, is there a way to still put them in the global install directory?

I may want an extension for all my profiles, or all users on a multi-user machine...

David

asa

User avatar
 
Posts: 684
Joined: November 4th, 2002, 4:16 pm
Location: CA

Post Posted March 6th, 2003, 10:29 am

djk wrote:If extensions are indeed enhanced to install into a profile, is there a way to still put them in the global install directory?

I may want an extension for all my profiles, or all users on a multi-user machine...

David


XPI allows the author to install wherever he wants. The change is that the chrome registry now enumerates over the profile dir in addition to the install dir which means that Mozilla/(Phoenix?) should see overlays that were installed to profile. Authors can make the XPI go wherever they want.

--Asa

djk

User avatar
 
Posts: 219
Joined: November 5th, 2002, 6:06 am
Location: SC, USA

Post Posted March 6th, 2003, 10:42 am

I guess I wasn't clear. I was wondering this from a user perspective.

I figured that XPI authors could install wherever they wanted, but what about the ability of the user to change that?

I suppose a similar question could relate to the desire to make themes available globally, instead of limiting avaliable themes just one profile (since themes already go in a profile dir).

David
Last edited by djk on March 6th, 2003, 11:42 am, edited 1 time in total.

scragz

User avatar
 
Posts: 2914
Joined: February 8th, 2003, 2:38 am
Location: San Diego, US

Post Posted March 6th, 2003, 11:11 am

I think in the install script you could do something like
Code: Select all
 if (confirm("Do you want this extension to go in your install directory?)) {
    //install directory code
}
else {
     //profile directory code
}

djst
Moderator

User avatar
 
Posts: 2826
Joined: November 5th, 2002, 1:34 am
Location: Sweden

Post Posted March 6th, 2003, 11:55 am

asa wrote:
djk wrote:If extensions are indeed enhanced to install into a profile, is there a way to still put them in the global install directory?

I may want an extension for all my profiles, or all users on a multi-user machine...

David


XPI allows the author to install wherever he wants. The change is that the chrome registry now enumerates over the profile dir in addition to the install dir which means that Mozilla/(Phoenix?) should see overlays that were installed to profile. Authors can make the XPI go wherever they want.

--Asa

Hmm.. wouldn't it be better if it was Mozilla that decided where the stuff would go? E.g. whenever you installed something (theme or extension), Mozilla/Phoenix (not the xpi ifself) would ask you if you want it in the program folder or in your profile.

What's the benefit of allowing the xpi author deciding where the code would go?

cdn

User avatar
 
Posts: 999
Joined: November 4th, 2002, 5:47 pm
Location: UK

Post Posted March 6th, 2003, 4:40 pm

to answer asa's initial question, it is working on Linux cvs

sailfish's install.js for theme xpi (when themes were xpis) allowed a choice of installation (global/profile), so we extension writers just need a similar script ...

apparently locale install.js files do something like this ... ...

asa

User avatar
 
Posts: 684
Joined: November 4th, 2002, 4:16 pm
Location: CA

Post Posted March 6th, 2003, 7:33 pm

djst wrote:Hmm.. wouldn't it be better if it was Mozilla that decided where the stuff would go? E.g. whenever you installed something (theme or extension), Mozilla/Phoenix (not the xpi ifself) would ask you if you want it in the program folder or in your profile.

What's the benefit of allowing the xpi author deciding where the code would go?


Some extensions cannot live in profile (I assume). If an extension is beyond just overlays and includes a component it probably has to live in the install dir for the component registry to read it (more guessing). I'm assuming, for example that if you did a profile install of mailnews or calendar or Venkman, that it wouldn't work. Whether or not this is the case, it should be up to the author to determine whether or not his extension makes sense as a profile install. If it makes sense as both profile or global install then hopefully he'll give the user the optoion but for those cases where he's determined it doesn't make sense (or doesn't even work) when installed into the other location, users shouldn't be presented with that option.

--Asa

francois
 
Posts: 33
Joined: November 6th, 2002, 5:31 am
Location: New Zealand

Post Posted March 7th, 2003, 3:24 am

I am on a linux machine and here is the behavior I would like to see for a multi user install:

*First to adress asa last comment if the extension cannot live in the profile directory
then it has to be installed as root and given the proper permissions to work globaly.

*For other extensions:
If the user is root (or administrator or whatever it is on your system) then it should
have a choice to install it globaly or in the root profile (of course I cannot see any other
reason of running phoenix as root than make a global install of something), and again
in the case of a global install the permissions should be set right!

If the user is not root then straight to the profile folder, the normal user should not have
to deal with the global install, and it would probably require a mechanism to ask for the root
password in that case which would add a layer of complexity.

That's how I would like to see it working.

djst
Moderator

User avatar
 
Posts: 2826
Joined: November 5th, 2002, 1:34 am
Location: Sweden

Post Posted March 7th, 2003, 4:49 am

asa wrote:
djst wrote:Hmm.. wouldn't it be better if it was Mozilla that decided where the stuff would go? E.g. whenever you installed something (theme or extension), Mozilla/Phoenix (not the xpi ifself) would ask you if you want it in the program folder or in your profile.

What's the benefit of allowing the xpi author deciding where the code would go?


Some extensions cannot live in profile (I assume). If an extension is beyond just overlays and includes a component it probably has to live in the install dir for the component registry to read it (more guessing). I'm assuming, for example that if you did a profile install of mailnews or calendar or Venkman, that it wouldn't work. Whether or not this is the case, it should be up to the author to determine whether or not his extension makes sense as a profile install. If it makes sense as both profile or global install then hopefully he'll give the user the optoion but for those cases where he's determined it doesn't make sense (or doesn't even work) when installed into the other location, users shouldn't be presented with that option.

Then there should be some kind of "extension writing guidelines" or some other kind of documentation that explained this. For example, what question the extension installer should ask the user about where to put the code (for consistency). Also, the document should recommend the profile (i.e. per-user install) as the default target for xpi installs.

What I ment with Mozilla deciding instead of the extension author was that we would get consistency. Mozilla would always ask the same kind of question, with the same kind of options and maybe even a checkbox saying "Always install for this user only, whenever possible". When it's up to the author, the question can be phrased in a number of ways ranging between "Click OK if you would like to install this for all users [OK]/[Cancel]" to "Do you want this to be installed for current user only? [Yes]/[No]".

So, if it's up to the author, then strict guidelines is much needed. I'd be happy to host such a document on Phoenix Help, but I don't know what to write, so I guess someone deeply involved with extensions should write it.

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 2 guests