Last Comment Bug 440506 - Add a globally shared location for plugins
: Add a globally shared location for plugins
Status: RESOLVED FIXED
: dev-doc-complete
Product: Core
Classification: Components
Component: XPCOM (show other bugs)
: Trunk
: All Linux
: -- normal (vote)
: mozilla1.9.1b2
Assigned To: Mike Hommey [:glandium]
:
: Nathan Froyd [:froydnj]
Mentors:
Depends on: 467751
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-19 12:04 PDT by Mike Hommey [:glandium]
Modified: 2009-02-18 10:15 PST (History)
4 users (show)
bugzillamozillaorg_serge_20140323: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (1.83 KB, patch)
2008-06-19 12:04 PDT, Mike Hommey [:glandium]
jst: review-
Details | Diff | Splinter Review
patch v2 [Checkin: Comment 9] (1.67 KB, patch)
2008-09-15 08:52 PDT, Mike Hommey [:glandium]
jaas: review+
jst: superreview+
Details | Diff | Splinter Review

Description Mike Hommey [:glandium] 2008-06-19 12:04:48 PDT
Created attachment 325804 [details] [diff] [review]
patch

In the same way /usr/share/mozilla/extensions and /usr/lib/mozilla/extensions are globally shared locations for extensions, the attached patch adds a globally shared location for plugins.
Comment 1 Benjamin Smedberg [:bsmedberg] 2008-06-19 12:08:46 PDT
Comment on attachment 325804 [details] [diff] [review]
patch

I could sworn we already have such a location, but jst is the right person to deal with plugins.
Comment 2 Johnny Stenback (:jst, jst@mozilla.com) 2008-07-17 17:50:49 PDT
Comment on attachment 325804 [details] [diff] [review]
patch

+#elif XP_UNIX
+#define NS_SYSTEM_PLUGINS_DIR       "SysPlugins"
 #endif

- In nsAppFileLocationProvider::GetFiles():

 #else
-        static const char* keys[] = { nsnull, NS_USER_PLUGINS_DIR, NS_APP_PLUGINS_DIR, nsnull };
+        static const char* keys[] = { nsnull, NS_USER_PLUGINS_DIR, NS_APP_PLUGINS_DIR, NS_SYSTEM_PLUGINS_DIR, nsnull };

Here we're in the else case of an #if XP_MACOSX, which means XP_UNIX NS_SYSTEM_PLUGINS_DIR is not defined. This needs to be in an #ifdef XP_UNIX block, with the else case remaining unchanged. r- based on that, other than that this looks good.
Comment 3 Mike Hommey [:glandium] 2008-09-15 08:52:47 PDT
Created attachment 338664 [details] [diff] [review]
patch v2
[Checkin: Comment 9]

Sorry for the delay
Comment 4 Johnny Stenback (:jst, jst@mozilla.com) 2008-09-16 18:05:43 PDT
Comment on attachment 338664 [details] [diff] [review]
patch v2
[Checkin: Comment 9]

sr=jst. Josh, does this look good to you?
Comment 5 Josh Aas 2008-09-16 22:30:54 PDT
Comment on attachment 338664 [details] [diff] [review]
patch v2
[Checkin: Comment 9]

Why put the plugins under a directory labeled "mozilla"? As in:

"/usr/lib/mozilla/plugins"

Wouldn't it be better to set a standard for plugins targeted at any browser? Like:

"/usr/lib/webbrowserplugins"

That way webkit and opera browsers can feel first-class using it and installs could be simplified.
Comment 6 Mike Hommey [:glandium] 2008-09-16 23:11:48 PDT
(In reply to comment #5)
> (From update of attachment 338664 [details] [diff] [review])
> Why put the plugins under a directory labeled "mozilla"? As in:
> 
> "/usr/lib/mozilla/plugins"
> 
> Wouldn't it be better to set a standard for plugins targeted at any browser?
> Like:
> 
> "/usr/lib/webbrowserplugins"
> 
> That way webkit and opera browsers can feel first-class using it and installs
> could be simplified.

While /usr/lib/webbrowserplugins would be nice, /usr/lib/mozilla/plugins is a place where other browsers already look plugins for, and where I guess most distros put plugins already.
Comment 7 Johnny Stenback (:jst, jst@mozilla.com) 2008-10-03 00:23:15 PDT
(In reply to comment #5)
> Wouldn't it be better to set a standard for plugins targeted at any browser?
> Like:
> 
> "/usr/lib/webbrowserplugins"

I wouldn't have anything against us looking there too, but from Mike's comment above it sounds like other browsers already look for plugins, and thus some plugin installers might install plugins there (whether we'll find them or not). So I'd say we go with this patch, and another patch (or both rolled into one here would be fine too) that adds the above path as well.
Comment 8 Josh Aas 2008-10-05 21:40:03 PDT
Comment on attachment 338664 [details] [diff] [review]
patch v2
[Checkin: Comment 9]

I'll take your word for it that there are already dependencies on this location, seems odd though given that we don't use it ourselves.
Comment 9 Serge Gautherie (:sgautherie) 2008-10-10 08:55:35 PDT
Comment on attachment 338664 [details] [diff] [review]
patch v2
[Checkin: Comment 9]

http://hg.mozilla.org/mozilla-central/rev/dda85c54599d
Comment 10 Eric Shepherd [:sheppy] 2009-02-11 19:52:21 PST
These constants aren't documented anywhere at all yet.  Any opinions on where they should be covered?

Note You need to log in before you can comment on or make changes to this bug.