SlideShare a Scribd company logo
Your first XULrunner-based
        application
        Daniel Glazman
     Disruptive Innovations




    MAOW Berlin 28-mar-2009
Your first XULrunner-based application




  What is XULrunner

• in short, Firefox without all its chrome
• more correctly, a runtime for Gecko and
  the toolkit



        MAOW Berlin 28-mar-2009 -- Daniel Glazman
                             2
Your first XULrunner-based application




            Downloads
• You don’t need to build XULrunner if you
  already have Firefox 3 and limit yourself to
  chrome
  firefox -app path/to/application.ini


• or download and unzip XULrunner from
  ftp://ftp.mozilla.org/pub/xulrunner/releases/




         MAOW Berlin 28-mar-2009 -- Daniel Glazman
                              3
Your first XULrunner-based application




      Structure
       Top dir
               chrome
                    content
                          main.xul
                     chrome.manifest

               defaults
                     preferences
                          prefs.js

               application.ini



MAOW Berlin 28-mar-2009 -- Daniel Glazman
                     4
Your first XULrunner-based application




          application.ini
• very simple file declaring your app’s
  metadata
   [App]
   Name=MyFirstApp
   Vendor=My Own Organization
   Version=0.1
   BuildID=20090328
   ID=myfirstapp@myownorg.org
   Copyright= Copyright 2009 My Own Organization

   [Gecko]
   MinVersion=1.9
   MaxVersion=1.9.0.*



          MAOW Berlin 28-mar-2009 -- Daniel Glazman
                               5
Your first XULrunner-based application




 Basic chrome.manifest
• basically a mapping between chrome:// URLs
  and the filesystem
    content myfirstapp file:content/


• you can also package and compress the files
  creating a jar
    content myfirstapp jar:myfirstapp.jar!/content/




           MAOW Berlin 28-mar-2009 -- Daniel Glazman
                                6
Your first XULrunner-based application




 More chrome.manifest

• add a skin
  skin myfirstapp classic/1.0 jar:myfirstapp.jar!/skin/


• add a locale
  locale myfirstapp en-US jar:myfirstapp.jar!/locale/en-US/




            MAOW Berlin 28-mar-2009 -- Daniel Glazman
                                 7
Your first XULrunner-based application




        app’s preferences
pref(quot;toolkit.defaultChromeURLquot;,
     quot;chrome://myfirstapp/content/main.xulquot;);



 •   prefs for debugging

 •   prefs for user-agent or cache

 •   prefs for extension manager and XPInstall

 •   prefs for protocol handlers

 •   prefs for preferences window :-)

            MAOW Berlin 28-mar-2009 -- Daniel Glazman
                                 8
Your first XULrunner-based application




       Your main window
<?xml version=quot;1.0quot;?>
<?xml-stylesheet href=quot;chrome://global/skin/quot;
                 type=quot;text/cssquot;?>
<?xml-stylesheet href=quot;chrome://myfirstapp/skin/main.cssquot;
                 type=quot;text/cssquot;?>

<!DOCTYPE window SYSTEM quot;chrome://myfirstapp/locale/main.dtdquot;>

<window id=quot;mainquot;
        title=quot;&window.title;quot;
        width=quot;600quot; height=quot;400quot;
        xmlns=quot;http://www.mozilla.org/keymaster/gatekeeper/
there.is.only.xulquot;>
  <label value=quot;Guten Tag Berlin !quot;/>
  <button label=quot;Dankequot;
          oncommand=quot;window.close();quot;/>
</window>


              MAOW Berlin 28-mar-2009 -- Daniel Glazman
                                   9
Your first XULrunner-based application




    Running your app
• Windows
  xulrunner.exe application.ini


• Mac (with restrictions)
  /Library/Frameworks/XUL.framework/xulrunner-bin
  `pwd`/application.ini


• Linux
  xulrunner application.ini




          MAOW Berlin 28-mar-2009 -- Daniel Glazman
                               10
Your first XULrunner-based application




     Package your app
• Zip it into a *.app file
• call
  xulrunner -install-app `pwd`/myfirstapp.zip
• Installs inside c:Program Files or /Library
  on Mac


         MAOW Berlin 28-mar-2009 -- Daniel Glazman
                              11
Your first XULrunner-based application




   More complex stuff
• Add jsm modules
• Add icon to application.ini
• Add Venkman and Document Inspector
• Build a single executable with xulrunner...
• Update your app like Firefox...
• Extensions management
         MAOW Berlin 28-mar-2009 -- Daniel Glazman
                              12
Your first XULrunner-based application




                            Links

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

•   https://developer.mozilla.org/en/XULRunner_tips
•   https://developer.mozilla.org/en/XULRunner/Deploying_XULRunner_1.8

•   http://zenit.senecac.on.ca/wiki/index.php/XULRunner_Guide_Outline




              MAOW Berlin 28-mar-2009 -- Daniel Glazman
                                   13
Your first XULrunner-based application




• Questions ?


        MAOW Berlin 28-mar-2009 -- Daniel Glazman
                             14

More Related Content

Similar to Your First Xulrunner-based application

OpenStack Murano introduction
OpenStack Murano introductionOpenStack Murano introduction
OpenStack Murano introduction
Victor Zhang
 
How to run_moses 2
How to run_moses 2How to run_moses 2
How to run_moses 2
Mahmoud Eid
 
Getting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platformGetting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platform
Jean-Michel Bouffard
 
Xdebug, KCacheGrind and Webgrind with WampServer
Xdebug, KCacheGrind and Webgrind with WampServer  Xdebug, KCacheGrind and Webgrind with WampServer
Xdebug, KCacheGrind and Webgrind with WampServer
Mediovski Technology
 
JavaFX Uni Parthenope
JavaFX Uni ParthenopeJavaFX Uni Parthenope
JavaFX Uni Parthenope
Emanuela Giannetta
 
How to Turn New Recruits Into Oracle EPM Infrastructure Gurus
How to Turn New Recruits Into Oracle EPM Infrastructure GurusHow to Turn New Recruits Into Oracle EPM Infrastructure Gurus
How to Turn New Recruits Into Oracle EPM Infrastructure Gurus
nking821
 
Using Docker For Development
Using Docker For DevelopmentUsing Docker For Development
Using Docker For Development
Laura Frank Tacho
 
Windows Debugging Tools - JavaOne 2013
Windows Debugging Tools - JavaOne 2013Windows Debugging Tools - JavaOne 2013
Windows Debugging Tools - JavaOne 2013
MattKilner
 
The Green Lab - [04 B] [PWA] Experiment setup
The Green Lab - [04 B] [PWA] Experiment setupThe Green Lab - [04 B] [PWA] Experiment setup
The Green Lab - [04 B] [PWA] Experiment setup
Ivano Malavolta
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
Opersys inc.
 
The GNOME way - What can we learn from and within the Open Documentation World
The GNOME way - What can we learn from and within the Open Documentation WorldThe GNOME way - What can we learn from and within the Open Documentation World
The GNOME way - What can we learn from and within the Open Documentation World
Radina Matic
 
Mobile apps development companies in india |#Mobileappsdevelopmentcompaniesin...
Mobile apps development companies in india |#Mobileappsdevelopmentcompaniesin...Mobile apps development companies in india |#Mobileappsdevelopmentcompaniesin...
Mobile apps development companies in india |#Mobileappsdevelopmentcompaniesin...
Genora Infotech
 
Grilo: Easing integration of multimedia content in applications (LinuxTag 2010)
Grilo: Easing integration of multimedia content in applications (LinuxTag 2010)Grilo: Easing integration of multimedia content in applications (LinuxTag 2010)
Grilo: Easing integration of multimedia content in applications (LinuxTag 2010)
Igalia
 
Phonegap Development & Debugging
Phonegap Development & DebuggingPhonegap Development & Debugging
Phonegap Development & Debugging
Ivano Malavolta
 
Tek13 - Creating Mobile Apps with PHP and Symfony
Tek13 - Creating Mobile Apps with PHP and SymfonyTek13 - Creating Mobile Apps with PHP and Symfony
Tek13 - Creating Mobile Apps with PHP and Symfony
Pablo Godel
 
Apache cordova
Apache cordovaApache cordova
Apache cordova
Carlo Bernaschina
 
An Introduction of Node Package Manager (NPM)
An Introduction of Node Package Manager (NPM)An Introduction of Node Package Manager (NPM)
An Introduction of Node Package Manager (NPM)
iFour Technolab Pvt. Ltd.
 
Prizm Installation Guide
Prizm Installation GuidePrizm Installation Guide
Prizm Installation Guide
vjvarenya
 
Orangescrum In App Chat Add-on User Manual
Orangescrum In App Chat Add-on User ManualOrangescrum In App Chat Add-on User Manual
Orangescrum In App Chat Add-on User Manual
Orangescrum
 
Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...
Aleksey Tkachenko
 

Similar to Your First Xulrunner-based application (20)

OpenStack Murano introduction
OpenStack Murano introductionOpenStack Murano introduction
OpenStack Murano introduction
 
How to run_moses 2
How to run_moses 2How to run_moses 2
How to run_moses 2
 
Getting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platformGetting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platform
 
Xdebug, KCacheGrind and Webgrind with WampServer
Xdebug, KCacheGrind and Webgrind with WampServer  Xdebug, KCacheGrind and Webgrind with WampServer
Xdebug, KCacheGrind and Webgrind with WampServer
 
JavaFX Uni Parthenope
JavaFX Uni ParthenopeJavaFX Uni Parthenope
JavaFX Uni Parthenope
 
How to Turn New Recruits Into Oracle EPM Infrastructure Gurus
How to Turn New Recruits Into Oracle EPM Infrastructure GurusHow to Turn New Recruits Into Oracle EPM Infrastructure Gurus
How to Turn New Recruits Into Oracle EPM Infrastructure Gurus
 
Using Docker For Development
Using Docker For DevelopmentUsing Docker For Development
Using Docker For Development
 
Windows Debugging Tools - JavaOne 2013
Windows Debugging Tools - JavaOne 2013Windows Debugging Tools - JavaOne 2013
Windows Debugging Tools - JavaOne 2013
 
The Green Lab - [04 B] [PWA] Experiment setup
The Green Lab - [04 B] [PWA] Experiment setupThe Green Lab - [04 B] [PWA] Experiment setup
The Green Lab - [04 B] [PWA] Experiment setup
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
The GNOME way - What can we learn from and within the Open Documentation World
The GNOME way - What can we learn from and within the Open Documentation WorldThe GNOME way - What can we learn from and within the Open Documentation World
The GNOME way - What can we learn from and within the Open Documentation World
 
Mobile apps development companies in india |#Mobileappsdevelopmentcompaniesin...
Mobile apps development companies in india |#Mobileappsdevelopmentcompaniesin...Mobile apps development companies in india |#Mobileappsdevelopmentcompaniesin...
Mobile apps development companies in india |#Mobileappsdevelopmentcompaniesin...
 
Grilo: Easing integration of multimedia content in applications (LinuxTag 2010)
Grilo: Easing integration of multimedia content in applications (LinuxTag 2010)Grilo: Easing integration of multimedia content in applications (LinuxTag 2010)
Grilo: Easing integration of multimedia content in applications (LinuxTag 2010)
 
Phonegap Development & Debugging
Phonegap Development & DebuggingPhonegap Development & Debugging
Phonegap Development & Debugging
 
Tek13 - Creating Mobile Apps with PHP and Symfony
Tek13 - Creating Mobile Apps with PHP and SymfonyTek13 - Creating Mobile Apps with PHP and Symfony
Tek13 - Creating Mobile Apps with PHP and Symfony
 
Apache cordova
Apache cordovaApache cordova
Apache cordova
 
An Introduction of Node Package Manager (NPM)
An Introduction of Node Package Manager (NPM)An Introduction of Node Package Manager (NPM)
An Introduction of Node Package Manager (NPM)
 
Prizm Installation Guide
Prizm Installation GuidePrizm Installation Guide
Prizm Installation Guide
 
Orangescrum In App Chat Add-on User Manual
Orangescrum In App Chat Add-on User ManualOrangescrum In App Chat Add-on User Manual
Orangescrum In App Chat Add-on User Manual
 
Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...
 

Recently uploaded

Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
ViralQR
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 

Recently uploaded (20)

Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 

Your First Xulrunner-based application

  • 1. Your first XULrunner-based application Daniel Glazman Disruptive Innovations MAOW Berlin 28-mar-2009
  • 2. Your first XULrunner-based application What is XULrunner • in short, Firefox without all its chrome • more correctly, a runtime for Gecko and the toolkit MAOW Berlin 28-mar-2009 -- Daniel Glazman 2
  • 3. Your first XULrunner-based application Downloads • You don’t need to build XULrunner if you already have Firefox 3 and limit yourself to chrome firefox -app path/to/application.ini • or download and unzip XULrunner from ftp://ftp.mozilla.org/pub/xulrunner/releases/ MAOW Berlin 28-mar-2009 -- Daniel Glazman 3
  • 4. Your first XULrunner-based application Structure Top dir chrome content main.xul chrome.manifest defaults preferences prefs.js application.ini MAOW Berlin 28-mar-2009 -- Daniel Glazman 4
  • 5. Your first XULrunner-based application application.ini • very simple file declaring your app’s metadata [App] Name=MyFirstApp Vendor=My Own Organization Version=0.1 BuildID=20090328 ID=myfirstapp@myownorg.org Copyright= Copyright 2009 My Own Organization [Gecko] MinVersion=1.9 MaxVersion=1.9.0.* MAOW Berlin 28-mar-2009 -- Daniel Glazman 5
  • 6. Your first XULrunner-based application Basic chrome.manifest • basically a mapping between chrome:// URLs and the filesystem content myfirstapp file:content/ • you can also package and compress the files creating a jar content myfirstapp jar:myfirstapp.jar!/content/ MAOW Berlin 28-mar-2009 -- Daniel Glazman 6
  • 7. Your first XULrunner-based application More chrome.manifest • add a skin skin myfirstapp classic/1.0 jar:myfirstapp.jar!/skin/ • add a locale locale myfirstapp en-US jar:myfirstapp.jar!/locale/en-US/ MAOW Berlin 28-mar-2009 -- Daniel Glazman 7
  • 8. Your first XULrunner-based application app’s preferences pref(quot;toolkit.defaultChromeURLquot;, quot;chrome://myfirstapp/content/main.xulquot;); • prefs for debugging • prefs for user-agent or cache • prefs for extension manager and XPInstall • prefs for protocol handlers • prefs for preferences window :-) MAOW Berlin 28-mar-2009 -- Daniel Glazman 8
  • 9. Your first XULrunner-based application Your main window <?xml version=quot;1.0quot;?> <?xml-stylesheet href=quot;chrome://global/skin/quot; type=quot;text/cssquot;?> <?xml-stylesheet href=quot;chrome://myfirstapp/skin/main.cssquot; type=quot;text/cssquot;?> <!DOCTYPE window SYSTEM quot;chrome://myfirstapp/locale/main.dtdquot;> <window id=quot;mainquot; title=quot;&window.title;quot; width=quot;600quot; height=quot;400quot; xmlns=quot;http://www.mozilla.org/keymaster/gatekeeper/ there.is.only.xulquot;> <label value=quot;Guten Tag Berlin !quot;/> <button label=quot;Dankequot; oncommand=quot;window.close();quot;/> </window> MAOW Berlin 28-mar-2009 -- Daniel Glazman 9
  • 10. Your first XULrunner-based application Running your app • Windows xulrunner.exe application.ini • Mac (with restrictions) /Library/Frameworks/XUL.framework/xulrunner-bin `pwd`/application.ini • Linux xulrunner application.ini MAOW Berlin 28-mar-2009 -- Daniel Glazman 10
  • 11. Your first XULrunner-based application Package your app • Zip it into a *.app file • call xulrunner -install-app `pwd`/myfirstapp.zip • Installs inside c:Program Files or /Library on Mac MAOW Berlin 28-mar-2009 -- Daniel Glazman 11
  • 12. Your first XULrunner-based application More complex stuff • Add jsm modules • Add icon to application.ini • Add Venkman and Document Inspector • Build a single executable with xulrunner... • Update your app like Firefox... • Extensions management MAOW Berlin 28-mar-2009 -- Daniel Glazman 12
  • 13. Your first XULrunner-based application Links • https://developer.mozilla.org/en/XULRunner • https://developer.mozilla.org/en/XULRunner_tips • https://developer.mozilla.org/en/XULRunner/Deploying_XULRunner_1.8 • http://zenit.senecac.on.ca/wiki/index.php/XULRunner_Guide_Outline MAOW Berlin 28-mar-2009 -- Daniel Glazman 13
  • 14. Your first XULrunner-based application • Questions ? MAOW Berlin 28-mar-2009 -- Daniel Glazman 14