mozilla

Revision 109106 of XULRunner tips

  • Revision slug: XULRunner_tips
  • Revision title: XULRunner tips
  • Revision id: 109106
  • Created:
  • Creator: Nickolay
  • Is current revision? No
  • Comment

Revision Content

XULRunner Frequently Asked Questions. Work in progress.

Installing developer extensions

To be able to install any extensions, you first need to enable the Extension Manager in application.ini. Note that XULRunner, as of 1.8.0.1, does not appear to load extensions from the application directory; only the XULRunner directory and the user profile directory are checked.

Venkman

  • Need a custom build or a compatible extension <is there downloadable venkman/domi for 1.8.0.1?>
  • Need to edit compatibility in install.rdf to match the id and versions in application.ini
  • Needs a method to start venkman (usually by overlaying the main XUL file, similar to existing code for Firefox, Suite, etc.)
  • anything else?


DOM Inspector

Same as venkman

Component Viewer

Need custom build, first of all. What else?

Extension Developer's Extension

fix install.rdf

Branding

Branding is a chrome package containing product-specific information (e.g. the product name, vendor, and logo).

Some XULRunner components (in particular, the Extension Manager) depend on branding, in the sense that they expect to find certain strings in <tt>chrome://branding/locale/brand.dtd</tt> and <tt>chrome://branding/locale/brand.properties</tt>.

In order to satisfy these dependencies, you can save Firefox's <tt>brand.dtd</tt>/<tt>brand.properties</tt> to <tt>chrome/branding/locale</tt> folder, modify them appropriately, and register a locale provider for <tt>branding</tt> by adding the following line to your chrome manifest:

locale branding en-US chrome/locale/branding/

The location you put it doesn't matter, as long as you register it appropriately in the manifest.

In ''~.mozconfig'': ac_add_options --enable-branding=« branding location »

Reading command line arguments

See Chrome: Command Line. Command line arguments are handled via nsICommandLineHandler as usual.

= Can i have JavaScript errors / warnings directed to stdout instead of the jsconsole? = See {{mediawiki.external('https://bugzilla.mozilla.org/show_bug.cgi?id=306263 #306263')}} This doesn't do anything (1.8.0.1): xulrunner -app application.ini -console This neither (1.8.0.1) in ''defaults/preferences/«application name».js'': pref("javascript.options.strict", true); pref("javascript.options.showInConsole", true); pref("browser.dom.window.dump.enabled", true);

Revision Source

<p>
XULRunner Frequently Asked Questions. Work in progress.
</p>
<h2 name="Installing_developer_extensions"> Installing developer extensions </h2>
<p>To be able to install any extensions, you first need to enable the Extension Manager in <a href="en/XUL_Application_Packaging#em">application.ini</a>.  Note that XULRunner, as of 1.8.0.1, does not appear to load extensions from the application directory; only the XULRunner directory and the user profile directory are checked.
</p>
<h3 name="Venkman"> <a href="en/Venkman">Venkman</a> </h3>
<ul><li>Need a custom build or a compatible extension &lt;is there downloadable venkman/domi for 1.8.0.1?&gt;
</li><li>Need to edit compatibility in <i>install.rdf</i> to match the id and versions in application.ini
</li><li>Needs a method to start venkman (usually by overlaying the main XUL file, similar to existing code for Firefox, Suite, etc.)
</li><li>anything else?
</li></ul>
<p><br>
</p>
<h3 name="DOM_Inspector"> <a href="en/DOM_Inspector">DOM Inspector</a> </h3>
<p>Same as venkman
</p>
<h3 name="Component_Viewer"> Component Viewer </h3>
<p>Need custom build, first of all. What else?
</p>
<h3 name="Extension_Developer.27s_Extension"> Extension Developer's Extension </h3>
<p>fix install.rdf
</p>
<h2 name="Branding"> Branding  </h2>
<p>Branding is a <a href="en/Chrome_Registration">chrome package</a> containing product-specific information (e.g. the product name, vendor, and logo).
</p><p>Some XULRunner components (in particular, the Extension Manager) depend on branding, in the sense that they expect to find certain strings in <tt>chrome://branding/locale/brand.dtd</tt> and <tt>chrome://branding/locale/brand.properties</tt>.
</p><p>In order to satisfy these dependencies, you can save Firefox's <tt>brand.dtd</tt>/<tt>brand.properties</tt> to <tt>chrome/branding/locale</tt> folder, modify them appropriately, and <a href="en/Chrome_Registration#locale">register a locale provider</a> for <tt>branding</tt> by adding the following line to your chrome manifest:
</p>
<pre class="eval">locale branding en-US chrome/locale/branding/
</pre>
<p>The location you put it doesn't matter, as long as you register it appropriately in the manifest.
</p><p><span class="comment">In ''~.mozconfig'':  ac_add_options --enable-branding=« branding location »</span>
</p>
<h2 name="Reading_command_line_arguments"> Reading command line arguments </h2>
<p>See <a href="en/Chrome/Command_Line">Chrome: Command Line</a>.  Command line arguments are handled via nsICommandLineHandler as usual.
</p><p><span class="comment">= Can i have JavaScript errors / warnings directed to stdout instead of the jsconsole? =  See {{mediawiki.external('https://bugzilla.mozilla.org/show_bug.cgi?id=306263 #306263')}}  This doesn't do anything (1.8.0.1):  xulrunner -app application.ini -console  This neither (1.8.0.1) in ''defaults/preferences/«application name».js'':  pref("javascript.options.strict", true);  pref("javascript.options.showInConsole", true);  pref("browser.dom.window.dump.enabled", true);</span>
</p>
Revert to this revision