59 lines
2.5 KiB
Diff
59 lines
2.5 KiB
Diff
Index: toolkit/mozapps/extensions/src/nsExtensionManager.js.in
|
|
================================================================================
|
|
--- toolkit/mozapps/extensions/src/nsExtensionManager.js.in
|
|
+++ toolkit/mozapps/extensions/src/nsExtensionManager.js.in
|
|
@@ -119,6 +119,7 @@
|
|
|
|
const KEY_APP_PROFILE = "app-profile";
|
|
const KEY_APP_GLOBAL = "app-global";
|
|
+const KEY_APP_SYSTEM = "app-system";
|
|
|
|
const CATEGORY_INSTALL_LOCATIONS = "extension-install-locations";
|
|
|
|
@@ -2676,6 +2677,16 @@
|
|
priority);
|
|
InstallLocations.put(profileLocation);
|
|
|
|
+ // Register App-System Install Location
|
|
+ try {
|
|
+ var appSystemExtensions = getDirNoCreate("DrvD", ["usr","lib","browser-extensions","firefox"]);
|
|
+ var priority = nsIInstallLocation.PRIORITY_APP_PROFILE - 1;
|
|
+ var systemLocation = new DirectoryInstallLocation(KEY_APP_SYSTEM,
|
|
+ appSystemExtensions, true,
|
|
+ priority);
|
|
+ InstallLocations.put(systemLocation);
|
|
+ } catch (e) {}
|
|
+
|
|
#ifdef XP_WIN
|
|
// Register HKEY_LOCAL_MACHINE Install Location
|
|
InstallLocations.put(
|
|
@@ -3852,7 +3863,7 @@
|
|
|
|
// Prepare themes for installation
|
|
// Only enumerate directories in the app-profile and app-global locations.
|
|
- var locations = [KEY_APP_PROFILE, KEY_APP_GLOBAL];
|
|
+ var locations = [KEY_APP_PROFILE, KEY_APP_GLOBAL, KEY_APP_SYSTEM];
|
|
for (var i = 0; i < locations.length; ++i) {
|
|
var location = InstallLocations.get(locations[i]);
|
|
if (!location.canAccess)
|
|
@@ -3918,7 +3929,8 @@
|
|
var items = PendingOperations.getOperations(OP_NEEDS_INSTALL);
|
|
for (i = items.length - 1; i >= 0; --i) {
|
|
if (items[i].locationKey == KEY_APP_PROFILE ||
|
|
- items[i].locationKey == KEY_APP_GLOBAL)
|
|
+ items[i].locationKey == KEY_APP_GLOBAL ||
|
|
+ items[i].locationKey == KEY_APP_SYSTEM)
|
|
itemsToCheck.push(items[i].id);
|
|
}
|
|
this._finishOperations();
|
|
@@ -4903,7 +4915,8 @@
|
|
}
|
|
}
|
|
else if (installLocation.name == KEY_APP_PROFILE ||
|
|
- installLocation.name == KEY_APP_GLOBAL) {
|
|
+ installLocation.name == KEY_APP_GLOBAL ||
|
|
+ installLocation.name == KEY_APP_SYSTEM) {
|
|
// Check for a pointer file and remove it if it exists
|
|
var pointerFile = installLocation.location.clone();
|
|
pointerFile.append(id);
|