Closed Bug 262453 Opened 20 years ago Closed 6 years ago

Embedding Firefox

Categories

(Firefox Build System :: General, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: christophe_cornu, Unassigned)

Details

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
Build Identifier: 

Currently, the java SWT Browser widget on Linux embeds Mozilla. Attempts to 
embed genuine Firefox builds did not succeed - presumably because Firefox is 
statically linked and does not ship with GRE.

I'm opening that bug report so that if and when the Firefox team decides to 
support the embedding scenario we can be notified and consider Firefox 
support. If future Linux distributions only ship Firefox, this is going to 
make the embedding scenario much more complicated - requiring users to 
download separately the Mozilla/GRE.

Any workaround or tip on how to make it work with the current build is always 
welcome :-) Would there be a way for embedders to use the XPCOM Glue to still 
be able to embed Firefox?

Thank you,

Chris

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Hi Darin,

I've seen your comment in the thread at:
http://groups.google.ca/groups?hl=en&lr=&ie=UTF-
8&frame=right&th=e8544e86a78a2a9d&seekm=f75ecdcc.0409232137.589611ab%
40posting.google.com#link1

And when you helped us with Mozilla 1.7:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=61384#c12

We're getting requests for Firefox support now that it is out. Hope we can 
work this out in the future.

Chris
Summary: Embedders can embed Mozilla that ships with a GRE. Embedders would like to be able to use Firefox too. → Embedding Firefox
Assignee: firefox → dougt
Component: General → Embedding: GRE Core
Product: Firefox → Browser
QA Contact: firefox.general
Version: unspecified → Trunk
no sipaq, this is a firefox-specific bug, due to the way ffox is
compiled/shipped (statically linked -> no gre)
Assignee: dougt → bryner
Component: Embedding: GRE Core → Build Config
Product: Browser → Firefox
QA Contact: asa
Status: UNCONFIRMED → NEW
Ever confirmed: true
> We're getting requests for Firefox support now that it is out. Hope we can 
> work this out in the future.

Hi Chris,

Yeah, we expect this sort of request to come up more and more frequently as
Firefox increases in popularity.  At the moment, it is not possible to embed the
official Mozilla.org releases of Firefox.  One could create their own version of
Firefox that did not statically link to Gecko, but that is not the default
configuration used by Mozilla.org.  Firefox has a narrowly defined objective: to
be the best web browser it can be, and the static build helps reduce codesize
and improve performance.

That said, I'm hopeful that we will be able to transition Firefox to use a
shared copy of Gecko in some manner so that the Gecko that ships with Firefox
can be used by embedders.  There's no chance of that happening before Firefox
1.0 though.
It's been a while since the last update on this; what's the current status?
I agree, I think really what Eclipse Community would like to know is how the 
licensing for XULRunner will work.

Is it possible to get more clarity on how the licensing will work?
(http://wiki.mozilla.org/XUL:Xul_Runner_Licensing ) especially for Scenario A.

Are you guys going to start including libgtkembedmoz.so in the standard FF linux builds?

We use SWT + FF in our product and it won't run on other peoples' machines because they don't have libgtkembedmoz.so in their FF dist.  So not only do we have to use a custom build of FF for our own purposes, but we will have install one on every customer's machine too (which they won't appreciate).  Then if they upgrade, our product will mysteriously stop working.
Assignee: bryner → nobody
QA Contact: asa → build.config
Hey, looks like mozembed is part of the build now.  Maybe someone can close this bug...
er... part of Xulrunner, I mean.
Hi,

I am a newbie and would like to understand how we can embed Firefox in a Java application using JDIC?  Is there a fix/workaround for this bug?

Thanks
On Windows with installed IE, but Firefox as Standard-Browser you can modify the browser-validation of jdic:

Modify the function "isDefaultBrowserMozilla()" in "WebBrowserUtil.java" from 
jdic-0.9.5-src\jdic\src\share\classes\org\jdesktop\jdic\browser\internal\

Here is the complete modified code:

    /**
     * Checks if the default browser for the current platform is Mozilla.
     * @return true on Solaris and Linux and true on Windows platform if Mozilla
     * (not Firefox) is set as the default browser.
     */
    public static boolean isDefaultBrowserMozilla() {
        System.err.println("isDefaultBrowserMozilla");
        String osName = System.getProperty("os.name").toLowerCase();

        if ((osName.indexOf("solaris") >= 0) ||
            (osName.indexOf("linux") >= 0) ) {
            return true;
        } else {
            String nativeBrowserPath = getBrowserPath();
            if (nativeBrowserPath.indexOf("firefox") >= 0) {
            	System.err.println("it's firefox!");
           	return false;
            } else if (nativeBrowserPath.indexOf("mozilla") >= 0) {
            	return true; 
            } else {
              return false;
            }
        }
    }

Compile and put it into jdic.jar.
This function will now return false on Windows with Firefox as standard-browser.

It's not very pretty, but it works.

Another way is to use JDICplus ;)


It is not the way, how to embed Firefox using jdic (it is not possible yet)!
It is a workaround for how to use jdic-browser on Windows with installed IE, and Firefox configured as standard-browser!
I'm going to close this bug as it is really old and I don't believe is relevant anymore.  As a matter of open source worlds colliding I used to work with Chris at IBM and I know he no longer works on SWT.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Component: Build Config → General
Product: Firefox → Firefox Build System
You need to log in before you can comment on or make changes to this bug.