Sign in Join
Wiki copytemporary

GeckoPort version2: what changed

Revision 3 to 4. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
1+### About
2+
3+GeckoPort is a Lazarus/Free Pascal version of Takanori Ito's Gecko SDK for Delphi, including the TGeckoBrowser component. Version 2 is based on automatically generated include-files from the idl files from the Gecko SDK. For this purpose the idltopas utility is used. This way it's earier to follow the fast Gecko-release cycle now gecko-developers do not maintain backwards compatibility anymore. You can find more information about the old version of GeckoPort [[GeckoPort|here]].
4+
5+Current sources are based on Gecko 9, as Gecko 10 has a bug preventing it from being embedded.
6+
7+### Screenshots
8+
9+<img src="GeckoPort_GBrowser_Win32.jpg" title="GBrowser sample app using the Win32 widgetset" width="600" />
10+
111### License
212
3-MPL 1.1
13+MPL 1.1
414
515### Installation
616
7-There is a fpmake-package for GeckoPort in the Free Pascal repository. To install the geckoport fpmake-package on your system:
17+There is a fpmake-package for GeckoPort in the Free Pascal repository. To install the geckoport fpmake-package on your system:
818
9- * Make sure that you have [[fppkg]] correctly configured. Also look if the [[fppkg|path of your Lazarus installation]] is correctly set.
10- * Install the fpmake gecko-package for Free Pascal. Give the following command on the command line:
19+- Make sure that you have [[fppkg]] correctly configured. Also look if the [[fppkg|path of your Lazarus installation]] is correctly set.
20+- Install the fpmake gecko-package for Free Pascal. Give the following command on the command line:
1121
12-```
22+``` bash
1323fppkg install gecko
1424```
1525
16- * When the installation is complete (re)start Lazarus
17- * In Lazarus, choose Package | Install/Uninstall Packages
18- * Select GeckoComponents in the list of 'Do not install' packages and click on 'Install selection'.
19- * Click 'Save and rebuild IDE' to rebuild and relaunch Lazarus.
26+- When the installation is complete (re)start Lazarus
27+- In Lazarus, choose Package \| Install/Uninstall Packages
28+- Select GeckoComponents in the list of 'Do not install' packages and click on 'Install selection'.
29+- Click 'Save and rebuild IDE' to rebuild and relaunch Lazarus.
2030
21-To compile a sample app:
31+To compile a sample app:
2232
23- * Choose File | Open, then select ChromeWin.lpi or GBrowser.lpi (both in the SampleApps subfolder).
24- * Choose Run | Run to compile and run the sample app.
33+- Choose File \| Open, then select ChromeWin.lpi or GBrowser.lpi (both in the SampleApps subfolder).
34+- Choose Run \| Run to compile and run the sample app.
2535
26-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:
27-```
28-<https://developer.mozilla.org/en/XULRunner>
29-```
36+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:
3037
38+` `[`https://developer.mozilla.org/en/XULRunner`](https://developer.mozilla.org/en/XULRunner)
39+
3140### Development
3241
33-You can download the sources from the GeckoPort from the Lazarus-ccr using Subversion:
34-```
42+You can download the sources from the GeckoPort from the Lazarus-ccr using Subversion:
43+
44+``` bash
3545svn co https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/components/geckoport/version2 [local dir]
3646```
3747
38-To install this version, go to the (local) source-directory and use
39-```
48+To install this version, go to the (local) source-directory and use
49+
50+``` bash
4051fppkg install -o -gl
4152```
4253
43-The '-o -gl' parameters are to include debug-info.
54+The '-o -gl' parameters are to include debug-info.
4455
4556### To Do
4657
4758#### Win32 widgetset
4859
49-The ChromeWin and GBrowser sample apps work the same as they do with Delphi.
60+The ChromeWin and GBrowser sample apps work the same as they do with Delphi.
5061
51-Currently the code looks for a xulrunner in the following order:
62+Currently the code looks for a xulrunner in the following order:
5263
53- * The ParamStr(1). This means the first parameter in command line. This is **temporary** for testing purposes only and it will be removed soon.
54- * The application is located in the same folder as the xulrunner.
55- * The xulrunner is located in a folder under application executable. Folder must be named "xulrunner".
56- * Scan registry looking for a GRE "_Gecko Runtime Environment_ ".
57- * Scan registry looking for a Firefox installation.
64+- The ParamStr(1). This means the first parameter in command line. This is **temporary** for testing purposes only and it will be removed soon.
65+- The application is located in the same folder as the xulrunner.
66+- The xulrunner is located in a folder under application executable. Folder must be named "xulrunner".
67+- Scan registry looking for a GRE "*Gecko Runtime Environment*".
68+- Scan registry looking for a Firefox installation.
5869
59-With Free Pascal 2.4.x and 2.5.1 on Windows, you must disable floating point exceptions as soon as possible in your program. Add the Math unit to your uses clause and add the following statement at the beginning of your program:
60-```
70+With Free Pascal 2.4.x and 2.5.1 on Windows, you must disable floating point exceptions as soon as possible in your program. Add the Math unit to your uses clause and add the following statement at the beginning of your program:
71+
72+``` pascal
6173SetExceptionMask([exInvalidOp, exDenormalized, exZeroDivide, exOverflow, exUnderflow, exPrecision]);
6274```
6375
64-Note that this will disable floating point exceptions in all code, not just in the Gecko libraries. See the sample app .dpr files for examples of how to add this code.
76+Note that this will disable floating point exceptions in all code, not just in the Gecko libraries. See the sample app .dpr files for examples of how to add this code.
6577
66-Firefox runner is now working, tested with Firefox 3.6.12 but the application exe **MUST** be in the same folder as Firefox or you will get a hangup now of them.
78+Firefox runner is now working, tested with Firefox 3.6.12 but the application exe **MUST** be in the same folder as Firefox or you will get a hangup now of them.
6779
6880#### Carbon widgetset
6981
70-A native window must be passed in to initialize the browser component. On OS X, this must be a Cocoa window, otherwise the Carbon widgetset will not work.
82+A native window must be passed in to initialize the browser component. On OS X, this must be a Cocoa window, otherwise the Carbon widgetset will not work.
7183
7284#### Cocoa widgetset
7385
74-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.
86+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.
7587
76-Note that the GeckoPort package now uses the new Objective Pascal-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 Objective Pascal support (for example, version 2.6 or higher, or compiled from FPC SVN trunk).
88+Note that the GeckoPort package now uses the new Objective Pascal-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 Objective Pascal support (for example, version 2.6 or higher, or compiled from FPC SVN trunk).
7789
78-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.
90+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.
7991
80-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.
92+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.
8193
82-The GBrowser sample app will crash because of the current incomplete state of the Cocoa widgetset.
94+The GBrowser sample app will crash because of the current incomplete state of the Cocoa widgetset.
8395
8496#### GTK2 widgetset
8597
86-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:
87-```
98+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:
99+
100+``` bash
88101export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/xulrunner-1.9.1.4
89102```
90103
91-The Gecko detect code in Linux gets the LD_LIBRARY_PATH environment variable and looks for a suitable XULRunner which path is in it.
104+The Gecko detect code in Linux gets the LD_LIBRARY_PATH environment variable and looks for a suitable XULRunner which path is in it.
92105
93-Currently sample apps works in Linux/Ubuntu 9.04 using Lazarus 0.9.29 and fpc 2.5.1 with some paint problems that I think will be resolved soon and seems to be related to GTK2 interface.
106+Currently sample apps works in Linux/Ubuntu 9.04 using Lazarus 0.9.29 and fpc 2.5.1 with some paint problems that I think will be resolved soon and seems to be related to GTK2 interface.
94107
95-Please report testing success or failure to the GeckoPort maintainer:
96-```
97-"José Mejuto" joshyfun (at) gmail (dot) com (_Current maintainer_)
98- MacPgmr (at) fastermac (dot) net (_Original maintainer_)
99-```
108+Please report testing success or failure to the GeckoPort maintainer:
100109
110+` "José Mejuto" joshyfun (at) gmail (dot) com (`*`Current maintainer`*`)`\
111+` MacPgmr (at) fastermac (dot) net (`*`Original maintainer`*`)`
112+
101113## See also
102114
103- * [[GeckoPort]]
115+- [[GeckoPort]]
104116
105117---
106-*From the Free Pascal wiki, page "GeckoPort version2", as the Internet Archive kept it on 2022-07-01. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
118+*From the Free Pascal wiki, page "GeckoPort version2", as it stood on 2020-02-16 after a change by GAN, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
119+Category: Components
120+Category: Lazarus-CCR

Back to history