Re: Trying to embed mozilla, can't getGREPathWithProperties
Ray Kiddy <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.java |
|---|---|
| Message-ID | <z-OdnWBUL5TyZY7bnZ2dnUVZ_u-unZ2d__14655.4245533936$1175714165$gmane$org@mozilla.org> |
Javier Pedemonte wrote: > [email protected] wrote: >> Second, the unix command ' ./xulrunner-bin --find-gre 1.8.0.4' returns >> the path to the libxpcom.dylib file, but the command './xulrunner-bin >> --register-global' gives me: >> >> "Registration not implemented on this platform!" >> >> I assume that this is related to the source o my problems (though I >> could be way off). Can I register and get GREs on a Mac? > > No, you cannot register XULRunner on a Mac. Instead, XULRunner is > installed as a Framework. The method Mozilla.getGREPathWithProperties() > looks for the installed framework. If you didn't install XULRunner > correctly, then getGREPathWithProperties() will not find it and return > null. > > > File grePath = new File("/Users/myname/sources/mozilla/obj-i686-apple- > darwin8.8.2/dist/XUL.framework/Versions/1.8.0.4"); > > This is your built version and not installed. The locations that > getGREPathWithProperties() will look at are > /Library/Frameworks/XUL.framework and ~/Library/Frameworks/XUL.framework. > > > javier I am just starting to learn more about some of these issues, so I hope I am not misunderstanding the problem. The getGREPathWithProperties() is probably looking on the application's framework search path. If this is true, than Javier is correct in that /Library/Frameworks and ~/Library/Frameworks are the usual suspects on the framework search path that people care about. Note, however, that if one puts a framework inside an application bundle, that framework will be picked up first. So: foo.app/ Contents/ MacOS/ Plugins/ Resources/ One usually sees these. But one can also have: foo.app/ Contents/ Frameworks/ And if the XULRunner.framework appears in there, then foo.app will use that particular copy of the framework. I am as sure of this as I can be without having ever done this for a XUL-based app. But I do this with other java-based (WebObjects) apps all the time. It is something else to look at. - ray