Advertisement
Guest User

Benjamin Meyer

a guest
Aug 10th, 2008
1,075
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.15 KB | None | 0 0
  1. Vector<String> PluginDatabase::defaultPluginDirectories()
  2. {
  3.     Vector<String> paths;
  4.  
  5.     // Add paths specific to each platform
  6. #if defined(XP_UNIX)
  7.     String userPluginPath = homeDirectoryPath();
  8.     userPluginPath.append(String("/.mozilla/plugins"));
  9.     paths.append(userPluginPath);
  10.  
  11.     userPluginPath = homeDirectoryPath();
  12.     userPluginPath.append(String("/.netscape/plugins"));
  13.     paths.append(userPluginPath);
  14.  
  15.     paths.append("/usr/lib/browser/plugins");
  16.     paths.append("/usr/local/lib/mozilla/plugins");
  17.     paths.append("/usr/lib/firefox/plugins");
  18.     paths.append("/usr/lib64/browser-plugins");
  19.     paths.append("/usr/lib/browser-plugins");
  20.     paths.append("/usr/lib/mozilla/plugins");
  21.     paths.append("/usr/local/netscape/plugins");
  22.     paths.append("/opt/mozilla/plugins");
  23.     paths.append("/opt/mozilla/lib/plugins");
  24.     paths.append("/opt/netscape/plugins");
  25.     paths.append("/opt/netscape/communicator/plugins");
  26.     paths.append("/usr/lib/netscape/plugins");
  27.     paths.append("/usr/lib/netscape/plugins-libc5");
  28.     paths.append("/usr/lib/netscape/plugins-libc6");
  29.     paths.append("/usr/lib64/netscape/plugins");
  30.     paths.append("/usr/lib64/mozilla/plugins");
  31.  
  32.     String mozHome(getenv("MOZILLA_HOME"));
  33.     mozHome.append("/plugins");
  34.     paths.append(mozHome);
  35.  
  36.     Vector<String> mozPaths;
  37.     String mozPath(getenv("MOZ_PLUGIN_PATH"));
  38.     mozPath.split(UChar(':'), /* allowEmptyEntries */ false, mozPaths);
  39.     paths.append(mozPaths);
  40. #elif defined(XP_MACOSX)
  41.     String userPluginPath = homeDirectoryPath();
  42.     userPluginPath.append(String("/Library/Internet Plug-Ins"));
  43.     paths.append(userPluginPath);
  44.     paths.append("/Library/Internet Plug-Ins");
  45. #elif defined(XP_WIN)
  46.     String userPluginPath = homeDirectoryPath();
  47.     userPluginPath.append(String("\\Application Data\\Mozilla\\plugins"));
  48.     paths.append(userPluginPath);
  49. #endif
  50.  
  51.     // Add paths specific to each port
  52. #if PLATFORM(QT)
  53.     Vector<String> qtPaths;
  54.     String qtPath(getenv("QTWEBKIT_PLUGIN_PATH"));
  55.     qtPath.split(UChar(':'), /* allowEmptyEntries */ false, qtPaths);
  56.     paths.append(qtPaths);
  57. #endif
  58.  
  59.     return paths;
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement