Difference between revisions of "GeckoPort/es"

From Free Pascal wiki
Jump to navigationJump to search
(New page: === En breve ===    GeckoPort es una versón para Lazarus/Free Pascal de ''Takanori Ito's Gecko SDK for Delphi'', incluyendo el componente TGeckoBrowser. El código origina...)
 
m
Line 1: Line 1:
 +
{{GeckoPort}}
 
=== En breve ===
 
=== En breve ===
  

Revision as of 21:34, 11 December 2009

English (en) español (es)

En breve

   GeckoPort es una versón para Lazarus/Free Pascal de Takanori Ito's Gecko SDK for Delphi, incluyendo el componente TGeckoBrowser. El código original para Delphi está disponible aquí:

Pantallazo

Aplicación de ejemplo GBrowser usando los contoles Win32

Descarga

   Puedes descargar el código convertido usando Subversion:

 svn co https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/components/geckoport [local dir]

   Hay también disponible un archivo zip los fuentes de la adaptación:

 http://web.fastermac.net/~MacPgmr/GeckoPort/

Licencia

MPL 1.1

Instalación

   Para instalar el paquete GeckoComponents en Lazarus:

  • Seleccionar Paquete | Abrir archivo de paquete (.lpk) ..., buscar y marcar GeckoComponents.lpk (si lo hemos dejado en el directorio Components del direcorio de instalación de Lazarus).
  • Pulsar Compilar para compilar el paquete.
  • Pulsar Instalar para reconstruir y relanzar el IDE de Lazarus.

To compile a sample app:

  • Choose File | Open, then select ChromeWin.lpi or GBrowser.lpi (both in the SampleApps subfolder).
  • Choose Run | Run to compile and run the sample app.

Note that you'll need the Gecko libraries installed before you can run one of the sample apps. If necessary, use an installer from here:

 https://developer.mozilla.org/en/XULRunner

To Do

Win32 widgetset

The ChromeWin and GBrowser sample apps work the same as they do with Delphi.

Currently the code assumes the xulrunner folder is below the folder where the app's executable file is located.

Carbon widgetset

A native window must be passed in to initialize the browser component. On OS X, this must be a Cocoa window, so the Carbon widgetset will not work.

Cocoa widgetset

Although the Cocoa widgetset currently has support only for TForm and one or two other controls, the ChromeWin sample app can be run with the Cocoa widgetset since this app uses only TForm.

Note that the GeckoPort package now uses the new ObjC-based Cocoa widgetset instead of the old PasCocoa-based widgetset. To compile the ObjC-based Cocoa widgetset, you will need a version of FPC that includes ObjC support (for example, compiled from the FPC SVN trunk, which is currently version 2.5.1).

You will also need to set the app's widgetset to Cocoa, since the default is Carbon. Or you can compile ChromeWin.lpi with lazbuild and specify the --ws=cocoa switch. See the lb-cw-cocoa.sh script for an example.

To run the ChromeWin sample app, you need to set DYLD_LIBRARY_PATH so that the XUL library can load the other Gecko libraries it depends on. A simple way to do this is to start ChromeWin.app with the included run-cw-mac.sh script. Note that this script assumes that you have the XUL.framework installed.

The GBrowser sample app will crash because of the current incomplete state of the Cocoa widgetset.

GTK2 widgetset

On Linux, be sure to set the LD_LIBRARY_PATH environment variable to the xulrunner directory before running one of the sample apps. For example:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/xulrunner-1.9.1.4

For now the code assumes that libxul.so is located in /usr/lib/xulrunner-1.9.1.4. You can edit the code to change this.

Currently the sample apps do not work on Linux, failing in libmozjs.so within the call to libxul.so's XRE_InitEmbedding from nsXRE.pas.

It is not known whether the GTK2 widgetset works with Gecko since the sample apps do not get far enough to determine this. Please report testing success or failure in resolving this Linux-only problem to the GeckoPort maintainer:

 MacPgmr (at) fastermac (dot) net