Download presentation
Presentation is loading. Please wait.
Published byShauna Matthews Modified over 8 years ago
1
Building Desktop Applications with Mozilla XULRunner Brian King BRIKS Software mozdev.org FOSDEM February 26, 2006
2
“ “Atlas was condemned to bear the heavens upon his shoulders by Zeus as punishment for leading the Titans in their war against the gods.”
3
What Is? ● Bootstrap XPCOM+XUL applications - GRE (Gecko Runtime Environment) ● Customisable executable name, icons, profile directory, and more ● Uses the latest toolkit ● Still in development stages, but maturing all the time. Only stable developer releases.
4
Where To Get It BINARIES 1.8.0.1: http://developer.mozilla.org/en/docs/XULRunner_1.8.0.1_ Release_Notes Nightly: http://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly/latest -trunk/
5
Build From Source ● Standard Mozilla build environment ● Grab the code: make -f client.mk checkout MOZ_CO_PROJECT=xulrunner ● Custom mozconfig in file in xulrunner/config/ ac_add_options --enable-application=xulrunner
6
Application Structure Similar to structure of Firefox/Thunderbird extension Typical: application.ini * chrome components preferences Misc : icons, configuration files,...
7
Directory Structure marup | ---------- application.ini | ---------- chrome.manifest | ---------- chrome | ---------- components | ---------- defaults | ---------- preferences
8
chrome.manifest content marup jar:chrome/marup.jar!/content/ locale marup en-US jar:chrome/marup.jar!/locale/en-US/ skin marup classic/1.0 jar:chrome/marup.jar!/skin/
9
application.ini [App] Vendor=CoolCompany Name= Version=0.0.1 BuildID=20060226 Copyright=Copyright (c) 2006 My Company [Gecko] MinVersion=1.8 MaxVersion=1.9a1
10
Entry Point How does XULRunner know which window to start? Via preferences pref("toolkit.defaultChromeURI","chrome://marup/content/marup.xul"); Multiple Instances? pref("toolkit.singletonWindowType", "marup:main"); Value matches the windowtype of the entry window
11
Registering XULRunner./xulrunner -register-global./xulrunner -register-user This updates the registry on Windows (HKLM\Software\mozilla.org\GRE), and writes to /etc/gre.d on Linux.
12
Deployment 3 Methods: 1) Direct launch from flat structure 2) Using -install-app command 3) Bundled XULRunner
13
Direct Launch ● Flat file structure only ● Useful for developing/testing xulrunner /path/to/my/application/application.ini
14
-install-app Linux :./xulrunner -install-app /path/to/my/app.xpi Installed to: /usr/lib/ / / Mac : /Library/Frameworks/XUL.framework/xulrunner-bin -install- app /path/to/my/app.xpi Installed to: /Applications/ / Windows : xulrunner.exe -install-app c:\path\to\my\app.xpi Installed to: c:\Program Files\ \ \
15
Bundled XULRunner ● Have your own installer that bundles XULRunner ● commercial or custom installer on commercial OS ●.tar.gz on free OS ● No installer with XULRunner so far ● Requires core changes??... build from source.
16
Modules What is shipped with XULRunner? :... ● Gecko features: XPCOM, networking, rendering engine, XUL, SVG, XSLT, XML Extras, history, accessibility... ● UI Features: Extension Manager, Find Toolbar,... ● Embedding APIs: cross-platform embedding, PyXPCOM, JavaXPCOM, gtkmozembed (Linux only),... (Some of these are not complete)
17
Maybes and Outs Maybes: ● LDAP ● Spellchecking ● Profile Roaming What is not shipped? ● Bookmarks & History UI ● XForms (as an extension) ● The Kitchen Sink
18
The Mozilla Platform ● Each application has it's own user profile generated ● Runs in it's own process space Ensures peaceful co-existence of multiple Mozilla applications
19
ENABLES THE MOZILLA PLATFORM
20
Platform Problems ● Perceived* high barrier of entry ● Large and daunting code base ● Dispersed documentation (now improving) ● Lack of IDE ● Sketchy support in some areas (e.g. SOAP) ● Browser/Mail bugs take priority over 'Platform' bugs
21
Platform Advantages ● Quick prototyping ● Separation of content, style and functionality ● Standards Support ● Access to 2,000+ XPCOM interfaces ● Growing Tool Set (Bugzilla, LXR, DOM Inspector, JavaScript Debugger, Dev Tools on mozdev.org such as fastcomponent and xpistubs,...) ● Flexible licensing (MPL/LGPL/GPL tri- license) ● Active (and helpful) developer community
22
The Mozilla Desktop
23
XULRunner Applications ● Songbird ● Chatzilla ● Zap : SIP Client ● Many more... unpublicised
24
Other Mozilla Applications Mozilla Products – Firefox/Thunderbird/... Others – Nvu, Komodo,... ● Currently not running on XULRunner ● Porting is on the Roadmap for Mozilla Products, might be trickier for other projects. ● Move for other projects depends on their needs.
25
Future Directions Worthy Goals: ● Stable APIs ● Installer ● Development Tools ● Versioning system
26
End Questions? brian@mozdev.org
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.