247846 - generate bin dir EM related files with -register

This commit is contained in:
ben%bengoodger.com 2004-07-13 10:18:34 +00:00
Родитель 91d12bad68
Коммит 27e03c6d31
3 изменённых файлов: 28 добавлений и 1 удалений

Просмотреть файл

@ -63,6 +63,8 @@ interface nsIExtensionManager : nsISupports
void handleCommandLineArgs();
void register();
// Installing Extensions
const unsigned long FLAG_INSTALL_PROFILE = 0x01;
const unsigned long FLAG_INSTALL_GLOBAL = 0x02;

Просмотреть файл

@ -107,7 +107,6 @@ function getDirInternal(aKey, aSubDirs, aCreate)
{
var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"]
.getService(Components.interfaces.nsIProperties);
var dir = fileLocator.get(aKey, Components.interfaces.nsIFile);
for (var i = 0; i < aSubDirs.length; ++i) {
dir.append(aSubDirs[i]);
@ -1448,6 +1447,7 @@ nsExtensionManager.prototype = {
_extInstaller : null,
_extUninstaller : null,
_extEnabler : null,
_started : false,
/////////////////////////////////////////////////////////////////////////////
// nsIObserver
@ -1494,6 +1494,8 @@ nsExtensionManager.prototype = {
start: function (aIsDirty)
{
this._started = true;
var needsRestart = false;
ensureExtensionsFiles(true);
@ -1642,6 +1644,23 @@ nsExtensionManager.prototype = {
this._finishOperations();
},
register: function ()
{
if (!this._started) {
// Loads the datasource and installs any pre-configured items.
this._ds = new nsExtensionsDataSource();
this._ds.loadExtensions(false);
// Write bin/extensions/Extensions.rdf
// bin/extensions/installed-extensions-processed.txt
(new nsInstalledExtensionReader(this)).read();
// Write bin/components.ini
var manifest = getFile(KEY_APPDIR, [FILE_COMPONENT_MANIFEST]);
this._writeProfileFile(manifest, this._getComponentsDir, false);
}
},
_cancelDownloads: function ()
{

Просмотреть файл

@ -1755,6 +1755,12 @@ int xre_main(int argc, char* argv[], const nsXREAppData* aAppData)
NS_ENSURE_TRUE(chromeReg, 1);
chromeReg->CheckForNewChrome();
nsCOMPtr<nsIExtensionManager> em
(do_GetService("@mozilla.org/extensions/manager;1"));
NS_ENSURE_TRUE(em, 1);
em->Register();
}
return 0;
}