/
Readme.Multi.txt
120 lines (96 loc) · 5 KB
/
Readme.Multi.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
==================================================
GeckoFX Multi 1.9.1.0 v.1
based on GeckoFX 1.9.1.0 by
(C) 2008-2009 Skybound Software. All Rights Reserved.
http://www.geckofx.org
==================================================
GeckoFx Multi modifications by:
(c) brainsucker (Nik Medved), 2009-2010.
http://blog.brains.by
--------------------------------------------------
Please, read the Readme.txt first, for the basic information
about GeckoFx.
What is it?
-----------
GeckoFx Multi is modified GeckoFx library which:
* Has built-in discovery of Gecko's based applications (like Firefox)
* Can be used with any Gecko version from: 1.8.1, 1.9.0, 1.9.1, 1.9.2b5,
meaning it is compatible with the installations of:
XULRunner 2.0.x-... (Gecko 1.8.1.x-1.9.2b5)
Firefox 3.0 (or any other Gecko 1.9.0.x installation)
Firefox 3.5 (or any other Gecko 1.9.1.x installation)
Firefox 3.6b5 (or any other Gecko 1.9.2b5 installation)
* Single library (single compilation) for any Gecko version.
GeckoFx Multi will probably retain compatibility with Gecko 1.9.2
(release of Firefox 3.6), but this can't be guaranteed at the moment.
Getting Started
---------------
GeckoFx is a very nice library developed by Skybound Software,
which has one little drawback: it can be used only with specific
version of XULRunner it was compiled for. It's not a big deal if
you are able to redistribute the always up-to-date XulRunner with
your software, but it becomes a problem if your installation has
to be as small as possible and you want to use Gecko installed at
user's system (for example Firefox browser, which will probably
be up-to-date itself).
Example of such program is HLR Ban Poster (http://garena.brains.by),
with setup less than 1 mb in size, which autodetects and uses any
Gecko available at user's system, and can rollback to standard
Microsoft WebBrowser control in the worst case.
GeckoFx Multi uses proxies and custom marshalers to retain
compatibility with xpcom NS interfaces changed in different Gecko
versions.
Reliability and Compatibility
-----------------------------
GeckoFx Multi modification was developed especially for use in one
particular project (HLR Ban Poster), and wasn't throughly examinated
in other conditions. All code inside original GeckoFx for supporting
different Gecko versions was retained and converted, but wasn't
throughly tested, so 100% compatibility can't be guaranteed.
In some situations GeckoFx Multi may work worse than original library,
so if you need a stable Gecko-based control working with single dedicated
version of Gecko engine I recommend using the latest library from
SkyBound website (http://www.geckofx.org) instead.
How to use
----------
The same way like you used usual GeckoFx. The same control, the same
initialization, GeckoFxMulti should work instead of original GeckoFx
library without any code modifications.
If you want to initialize GeckoFx with the latest supported version of Gecko
present in the system (searches registry for applications distributed with
Gecko (like Firefox), release versions are preferred over alpha/beta) use
the following initializer:
Skybound.Gecko.Xpcom.Initialize(true);
The other possibility is to get all geckos detected at the system and give
user the ability to select the desired one:
// just use auto detection
var gad = Skybound.Gecko.GeckoAppDiscovery();
// use auto detection and provide several custom gecko paths to check.
// you can also add custom gecko path to check using AddGeckoPath method
var gad = Skybound.Gecko.GeckoAppDiscovery("c:\\xul2.0", "c:\\firefoxportable3.6b5");
gad.AddGeckoPath("d:\\firefox");
After Gecko's discovery you can retrieve the list of all or valid-only geckos
using the gad.Geckos or gad.ValidGeckos properties.
Also you can initialize a single GeckoAppInfo class this way:
var gai = new Skybound.Gecko.GeckoAppInfo("d:\\firefox");
When your GeckoAppInfo structure is prepared (selected from ValidGeckos list or
filled in manually), you can pass it to the Initialize method:
Skybound.Gecko.Xpcom.Initialize(gai);
Please note: you can't initialize several Gecko's at once or one after another,
the only possible solution to let user pick second Gecko and initialize it is
to restart your process (if your software is using a separate AppDomain for
Gecko browser, it should be possible to reload just this AppDomain).
Changelog
=========
1.9.1.0 v.1 based on GeckoFx 1.9.1.0 (4 Jan 2010)
--------------------------------------------------
* Merged SkyBound modifications for GeckoFx 1.9.1.0.
* nsIDOMHTMLDocument.Get/SetTitle: changed back to nsAString,
nsAUTF8String (introduced at GeckoFx 1.9.1) seems inappropriate here.
* Support for PreAlpha/Alpha/Beta Gecko sub-versions.
* Prepared for public release (additional constructor, etc).
* Preliminary support for Gecko 1.9.2 (tested with Firefox 3.6b5).
1.9.1.0 v.0 based on GeckoFx 1.9.0.0 (August 2009)
--------------------------------------------------
* Original private release, used only in HLR Ban Poster up to version 0.5.1.
* Support for Firefox 3.5 by brainsucker.