On Tuesday 11 July 2006 19:29, Benjamin Smedberg wrote: Hello, I've had exactly the same problem, thank you for pointing out that I am not the only one :-).
As suggested, for enabling of extensions I had to re-implement some parts of the nsAppRunner.cpp Later, if you will want profile selection on startup, you will again have to re-implement the next part, and so on... It is quite inconvenient that every embedding application has to do it on its own :-( There is a method 'XRE_main' exposed in the XULRunner API that does almost all you need, except of communicating back to the caller that a restart is needed. Rather it tries to relaunch the application by itself. I posted a bug with a patch to javaxpcom hoping that it opens some discussion on this point and helps to simplify this usage pattern, but there was no response :( https://bugzilla.mozilla.org/show_bug.cgi?id=343039 Michal > [EMAIL PROTECTED] wrote: > > Michal Ceresna писал(а): > >> On Friday 07 July 2006 20:07, [EMAIL PROTECTED] wrote: > >> Hello, > >> > >>> I know about the NS_XRE_ENABLE_EXTENSION_MANAGER flag for nsXREAppData, > >>> but there seems to be no way to pass it to XRE_InitEmbedded. > >> > >> the extension manager can be either enabled programmatic with setting > >> the field 'flags' in nsXREAppData passed to XRE_main > >> > >> or in application.ini: > > > > Both ways seem to be available only in xulrunner-as-application > > deployment (XRE_main or the xulrunner binary), but not in embedded > > libxul DLL/DSO initialized with XRE_InitEmbedded. Am I wrong? > > All 'extension management' does is configure directory service providers > with a list of extension directories, and restart the application in > certain circumstances. If you are using XRE_InitEmbedding you will need to > provide the list of extension directories yourself, and manage restarting > for extension installation (obviously xulrunner can't know how to restart > your embedded application). > > See http://lxr.mozilla.org/mozilla/source/toolkit/xre/nsXULAppAPI.h#155 > > and the extension manager logic at > http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/toolkit/xre/nsAppRunner >.cpp&rev=1.138&mark=2280-2302#227 > > --BDS _______________________________________________ dev-embedding mailing list [email protected] https://lists.mozilla.org/listinfo/dev-embedding
