mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 440506 - Add a globally shared location for plugins; r=joshmoz sr=jst
This commit is contained in:
parent
8b11d938d2
commit
d4ff8b856e
@ -95,6 +95,8 @@
|
||||
#define NS_MACOSX_USER_PLUGIN_DIR "OSXUserPlugins"
|
||||
#define NS_MACOSX_LOCAL_PLUGIN_DIR "OSXLocalPlugins"
|
||||
#define NS_MAC_CLASSIC_PLUGIN_DIR "MacSysPlugins"
|
||||
#elif XP_UNIX
|
||||
#define NS_SYSTEM_PLUGINS_DIR "SysPlugins"
|
||||
#endif
|
||||
|
||||
#define DEFAULTS_DIR_NAME NS_LITERAL_CSTRING("defaults")
|
||||
@ -250,6 +252,13 @@ nsAppFileLocationProvider::GetFile(const char *prop, PRBool *persistent, nsIFile
|
||||
if (NS_SUCCEEDED(rv))
|
||||
rv = localFile->AppendRelativeNativePath(PLUGINS_DIR_NAME);
|
||||
}
|
||||
#ifdef XP_UNIX
|
||||
else if (nsCRT::strcmp(prop, NS_SYSTEM_PLUGINS_DIR) == 0) {
|
||||
static const char *const sysLPlgDir = "/usr/lib/mozilla/plugins";
|
||||
rv = NS_NewNativeLocalFile(nsDependentCString(sysLPlgDir),
|
||||
PR_FALSE, getter_AddRefs(localFile));
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
else if (nsCRT::strcmp(prop, NS_APP_SEARCH_DIR) == 0)
|
||||
{
|
||||
@ -582,8 +591,12 @@ nsAppFileLocationProvider::GetFiles(const char *prop, nsISimpleEnumerator **_ret
|
||||
}
|
||||
|
||||
*_retval = new nsAppDirectoryEnumerator(this, keys);
|
||||
#else
|
||||
#ifdef XP_UNIX
|
||||
static const char* keys[] = { nsnull, NS_USER_PLUGINS_DIR, NS_APP_PLUGINS_DIR, NS_SYSTEM_PLUGINS_DIR, nsnull };
|
||||
#else
|
||||
static const char* keys[] = { nsnull, NS_USER_PLUGINS_DIR, NS_APP_PLUGINS_DIR, nsnull };
|
||||
#endif
|
||||
if (!keys[0] && !(keys[0] = PR_GetEnv("MOZ_PLUGIN_PATH"))) {
|
||||
static const char nullstr = 0;
|
||||
keys[0] = &nullstr;
|
||||
|
Loading…
Reference in New Issue
Block a user