How to deploy Firefox extension in XULRunner / GeckoFX?

I have an extended binary extension that works fine in Firefox, but cannot deploy to XULRunner / GeckoFX. The extension has no user interface and just provides an API for our main application (in .NET).

All the tutorials I could find explain how to install them in a XULRunner application. But using GeckoFX the XULRunner works in my project, so I don't have a XULRunner app.

I've already tried copying the installed extensions directory from the Firefox profile directory to the XULRunner profile, and also using the FF profile directory for GeckoFX, both to no avail.

My current suspicion is that the expansion targetApplication

in the install.rdf

need to adjust for GeckoFX, but a correct ID?

Since we are deploying GeckoFX / XULRunner built into our project, I don't need an extension manager, static deployment will suffice.

+3


source to share


1 answer


I finally managed to get it to work. Here's what I did:

First, add the location where the deployment is deployed with Xpcom.ComponentRegistrar.AutoRegister()

:

void RegisterExtensionDir(string dir)
{
    Console.WriteLine("Registering binary extension directory:  " + dir);
    var chromeDir = (nsIFile)Xpcom.NewNativeLocalFile(dir);
    var chromeFile = chromeDir.Clone();
    chromeFile.Append(new nsAString("chrome.manifest"));
    Xpcom.ComponentRegistrar.AutoRegister(chromeFile);
}

      

Second, do not use the ABI flag in the extension chrome.manifest

. Therefore, instead of



binary-component components/GeckoScraper.dll  ABI=WINNT_x86-msvc

      

I used

binary-component components/GeckoScraper.dll

      

I consider this to be GeckoFX bug 29 and created an issue for this .

+3


source







All Articles