Upload
bob-chao
View
3.216
Download
2
Embed Size (px)
DESCRIPTION
by thinker http://heaven.branda.to/~thinker/GinGin_CGI.py Please attributing this work as \"(C) Thinker, this work is license under CC:BY 2.5 TW\"
Citation preview
Bundle
2 of 16 02/05/08 00:50
What
Are collections of files of
extensions or
applications of XULRunner.
Add-ons
Can be distributed
in ZIP files
with .xpi file extension.
Bundle
3 of 16 02/05/08 00:50
install.rdf
Install Manifest
A bundle at least contains
an install.rdf or
an install.js file.
Bundle
4 of 16 02/05/08 00:50
Required
<?xml version="1.0"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest">
<!-- required properties -->
<em:id>[email protected]</em:id>
<em:version>1.0.0</em:version>
<em:type>2</em:type>
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>1.5</em:minVersion>
<em:maxVersion>2.0.0.*</em:maxVersion>
</Description>
</em:targetApplication>
<em:name>Test Program</em:name>
</Description>
</RDF>
Bundle
5 of 16 02/05/08 00:50
Types
2
Extensions
4
Themes
8
Locale
32
Multiple Item Package
Bundle
6 of 16 02/05/08 00:50
Install
~/.mozilla/firefox/<profile>/extensions contains
Text file with ID as name ([email protected]) contains
/path/to/your/bundle/
XPI
cd /path/to/your/bundle/
zip ../test.xpi *
open XPI with Firefox
Bundle
7 of 16 02/05/08 00:50
Install Result
An empty add-on
Bundle
8 of 16 02/05/08 00:50
Optional
Optional properties
description
creator
developer
......
see http://0rz.tw/b13CS
Bundle
9 of 16 02/05/08 00:50
chrome.manifest
Map chrome URIs to bundle directories
content
locale
skin
Chrome
is a collection of UI elements of an applicaiton,
except content area.
Bundle
10 of 16 02/05/08 00:50
Instructions
Frequently used
content packagename uri/to/files/ [flags]
locale packagename localename uri/to/files/ [flags]
skin packagename skinname uri/to/files/ [flags]
overlay chrome://URI-to-be-overlaid chrome://overlay-URI [flags]
Comment (# ......)
see http://0rz.tw/ef3F3
Bundle
11 of 16 02/05/08 00:50
ex2
Overlay a panel on status bar
ex2/
install.rdf
chrome.manifest
mychrome/
test.xul
see ex2/chrome.manifest
see ex2/mychrome/test.xul
Bundle
12 of 16 02/05/08 00:50
ex2 result
Bundle
13 of 16 02/05/08 00:50
Convention
chrome/
content/
locale/
skin/
Not forced
Bundle
14 of 16 02/05/08 00:50
Components
components/ in bundle directory
*.so or *.dll
*.xpt
Registered automatically
Bundle
15 of 16 02/05/08 00:50
ex3
in bundle
install.rdf
chrome.manifest
mychrome/
test.xul
components/
Makefile
hello.cpp
hello.idl
Bundle
16 of 16 02/05/08 00:50
ex3 result
chrome://test/content/test.xul