[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: SWT Browser Questions on Gentoo Linux

Hi Grant,

Much thanks for your very helpful reply. I did some more work, and here are my results.

It always needs an external html renderer, and on linux this will always be
something gecko-based.

OK, good to know.

2. "If you are running with eclipse 3.2.1 or newer then you can just run
eclipse and it will attempt to detect a browser on your system to use."

Can you tell my how exactly the detection is done? How come running the
binary package manages to discover it, but running from source does not?
Where is the code for this detection (I mean, in which plugin). Is it in
SWT?

This code lives in the eclipse launcher executable.  It basically goes:
- if MOZILLA_FIVE_HOME is already set then do nothing
- otherwise try to determine a value for MOZILLA_FIVE_HOME by:
  -> looking for a file like /etc/gre64.conf or /etc/gre.d/gre64.conf, which
exists on some linux distros to point at an available Gecko
  -> trying some common installation locations, like
/usr/lib/[mozilla/firefox/xulrunner] and
/usr/lib/[mozilla/firefox/xulrunner]-<version> (usr/lib/mozilla-firefox is
not a directory that gets checked here)

You can get the source for this from CVS (
http://www.eclipse.org/swt/cvs.php ) project org.eclipse.equinox.executable.

If a Browser cannot not be created for some reason when eclipse is first
started then an alternate intro screen is shown, so you have to be aware of
which case you're seeing.  The "correct" intro screen is greenish, which
indicates that a Browser was successfully created; the alternative intro
screen is white, which indicates the Browser creation failed.

I've found this code and looked at it. You should have told me it was C code, I was looking for some Java code at first, so it took me a bit of time to find it, but that's ok ;)


It basically works as you explained it. I can make my compiled Eclipse browser work by specifying the MOZILLA_FIVE_HOME.

However there is still one thing I don't fully understand. I have a xulrunner installation in /usr/lib/xulrunner. This is a place that gets scanned. If I set MOZILLA_FIVE_HOME="/usr/lib/xulrunner" and load my compiled Eclipse everything works. If I don't set this env var, this does not work. The renderer is here (eg, the browser gets created), but the links etc don't work. Although it should not make a difference since the directory should get scanned!

If I use the binary version from Eclipse, things work better: it works out of the box because the xulrunner install gets used. Although, another strangeness, it should *not*, because the file that gets tested in /usr/lib/xulrunner is:

components/libwidget_gtk2.so

and I *don't* have this file on my xulrunner directory. I have it on my mozilla-firefox directory though...

Any ideas about this strange behavior?

Jean-Noel