mozilla

Revision 40583 of Deploying XULRunner

  • Revision slug: XULRunner/Deploying_XULRunner_1.8
  • Revision title: Deploying XULRunner
  • Revision id: 40583
  • Created:
  • Creator: Mossop
  • Is current revision? No
  • Comment 31 words added, 13 words removed

Revision Content

Current XULRunner is a stable developer preview release. This means that while the release is immature in some areas such as embedding, application deployment, and OS integration, it can be used by developers that are releasing standalone XUL applications. This document explains how this deployment should be managed.

Windows

On Windows, XULRunner does not yet have a built-in installation solution; app developers should use pre-existing solutions for a native Windows installer. The installed files should be arranged in the following directory structure:

  • installdir/
    • application.ini
    • components/
      • ... components which are part of the application
    • chrome/
      • ... chrome which is part of the application
    • ... additional application files such as icons, etc
    • myapplicationname.exe (This is the "stub executable"... you should copy and rename this file from xulrunner-stub.exe in your XULRunner installation.)
    • xulrunner/
      • ... copy xulrunner/ to this directory

NOTE: When deploying with XULRunner 2.0 do the following:

  • Move chrome.manifest to the root directory, and adjust resource paths inside chrome.manifest accordingly
  • With XULRunner 9.0 or 10.0 you may need to copy "mozutils.dll" and/or "mozcrt19.dll" from the xulrunner directory to the root directory. This should be fixed with XULRunner 11.0
  • With XULRunner 11.0 you may need to copy "gkmedias.dll" from the xulrunner directory to the root directory

Mac OS X

On Mac OS X, the XULRunner framework bundle is placed in your application bundle:

  • MyApp.app/
    • Contents/
      • Info.plist
      • PkgInfo
      • Frameworks/
        • XUL.framework/
          • files copied from /Library/Frameworks/XUL.framework/Versions/1.8/... make sure you copy all symlinks correctly (use rsync -rl /Library/Frameworks/XUL.framework ...).
      • Resources
        • application.ini
        • app_icon.icns
        • components/
          • ... components which are part of the application
        • chrome/
          • ... chrome which is part of the application
        • ... additional application files such as icons, etc
      • MacOS/
        • xulrunner (This is the "stub executable"... you should copy this file from /Library/Frameworks/XUL.framework/Versions/1.8/xulrunner.)

NOTE: When deploying with XULRunner 2.0 do the following:

  • Move chrome.manifest to the root directory, and adjust resource paths inside chrome.manifest accordingly

 

Additionally, your Mac app WILL NOT RUN without a valid Info.plist file. Here's a sample one:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>English</string>
	<key>CFBundleExecutable</key>
	<string>xulrunner</string>
	<key>CFBundleGetInfoString</key>
	<string>1.0</string>
	<key>CFBundleIconFile</key>
	<string>app_icon.icns</string>
	<key>CFBundleIdentifier</key>
	<string>net.yourcompany.yourapplication</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>applicationName</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>1.0</string>
	<key>CFBundleSignature</key>
	<string>????</string>
        <!--only useful if your app handle urls-->
	<key>CFBundleURLTypes</key>
	<array>
		<dict>
			<key>CFBundleURLIconFile</key>
			<string>app_icon.icns</string>
			<key>CFBundleURLName</key>
			<string>YOURAPP Entity</string>
			<key>CFBundleURLSchemes</key>
			<array>
				<string>chrome</string>
			</array>
		</dict>
	</array>
	<key>CFBundleVersion</key>
	<string>1.0</string>
</dict>
</plist>

Here's a sample of the PkgInfo file

AAPL????

Edit this as you need to, but CFBundleExecutable MUST be xulrunner, and CFBundleIconFile and CFBundleURLIconFile should be set to the filename of your application icon (app_icon.icns).

Finally :

  • Your icon can be created with Icon Composer which can be found in /Developer/Application/Utilities/Icon Composer (if you installed the XCode developer tools). You should use an original image in png format.
  • To make it all work, change the permissions of you bundle by running: chmod -R 755 YourApp.app.

Linux

Most Linux applications are distributed as simple .tar.bz2 archives which can be unpacked by the user wherever they wish. The archive should be structured as follows:

  • appname/
    • application.ini
    • components/
      • ... components which are part of the application
    • chrome/
      • ... chrome which is part of the application
    • ... additional application files such as icons, etc
    • myapplicationname (This is the "stub executable"... you should copy and rename this file from xulrunner-stub in your XULRunner installation.)
    • xulrunner/
      • ... copy xulrunner/ to this directory

{{ languages( { "fr": "fr/XULRunner/D\u00e9ploiement_de_XULRunner_1.8", "ja": "ja/XULRunner/Deploying_XULRunner_1.8" } ) }}

Revision Source

<p>Current <a class="internal" href="/en/XULRunner" title="en/XULRunner">XULRunner</a> is a stable developer preview release. This means that while the release is immature in some areas such as embedding, application deployment, and OS integration, it can be used by developers that are releasing standalone XUL applications. This document explains how this deployment should be managed.</p>
<h3 id="Windows" name="Windows">Windows</h3>
<p>On Windows, XULRunner does not yet have a built-in installation solution; app developers should use pre-existing solutions for a native Windows installer. The installed files should be arranged in the following directory structure:</p>
<ul> <li><code><var>installdir</var>/</code> <ul> <li><code>application.ini</code></li> <li><code>components/</code> <ul> <li>... components which are part of the application</li> </ul> </li> <li><code>chrome/</code> <ul> <li>... chrome which is part of the application</li> </ul> </li> <li>... additional application files such as icons, etc</li> <li><code><var>myapplicationname</var>.exe</code> (This is the "stub executable"... you should copy and rename this file from <code>xulrunner-stub.exe</code> in your XULRunner installation.)</li> <li><code>xulrunner/</code> <ul> <li>... copy xulrunner/ to this directory</li> </ul> </li> </ul> </li>
</ul>
<p><strong>NOTE:</strong> When deploying with XULRunner 2.0 do the following:</p>
<ul> <li>Move chrome.manifest to the root directory, and adjust resource paths inside chrome.manifest accordingly</li> <li>With XULRunner 9.0 or 10.0 you may need to copy "mozutils.dll" and/or "mozcrt19.dll" from the xulrunner directory to the root directory. This should be fixed with XULRunner 11.0</li> <li>With XULRunner 11.0 you may need to copy "gkmedias.dll" from the xulrunner directory to the root directory</li>
</ul>
<h3 id="Mac_OS_X" name="Mac_OS_X">Mac OS X</h3>
<p>On Mac OS X, the XULRunner framework bundle is placed in your application bundle:</p>
<ul> <li><code><var>MyApp</var>.app/</code> <ul> <li><code>Contents/</code> <ul> <li><code>Info.plist</code></li> <li><code>PkgInfo</code></li> <li><code>Frameworks/</code> <ul> <li><code>XUL.framework/</code> <ul> <li>files copied from <code>/Library/Frameworks/XUL.framework/Versions/1.8/</code>... make sure you copy all symlinks correctly (use <code>rsync -rl /Library/Frameworks/XUL.framework ...</code>).</li> </ul> </li> </ul> </li> <li><code>Resources</code> <ul> <li><code>application.ini</code></li> <li><code>app_icon.icns</code></li> <li><code>components/</code> <ul> <li>... components which are part of the application</li> </ul> </li> <li><code>chrome/</code> <ul> <li>... chrome which is part of the application</li> </ul> </li> <li>... additional application files such as icons, etc</li> </ul> </li> <li><code>MacOS/</code> <ul> <li><code>xulrunner</code> (This is the "stub executable"... you should copy this file from <code>/Library/Frameworks/XUL.framework/Versions/1.8/xulrunner</code>.)</li> </ul> </li> </ul> </li> </ul> </li>
</ul>
<p><strong>NOTE:</strong> When deploying with XULRunner 2.0 do the following:</p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.7em; margin-left: 25px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> <li style="margin-bottom: 0.25em; ">Move chrome.manifest to the root directory, and adjust resource paths inside chrome.manifest accordingly</li>
</ul>
<p> </p>
<p>Additionally, your Mac app WILL NOT RUN without a valid <em>Info.plist</em> file. Here's a sample one:</p>
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
	&lt;key&gt;CFBundleDevelopmentRegion&lt;/key&gt;
	&lt;string&gt;English&lt;/string&gt;
	&lt;key&gt;CFBundleExecutable&lt;/key&gt;
	&lt;string&gt;xulrunner&lt;/string&gt;
	&lt;key&gt;CFBundleGetInfoString&lt;/key&gt;
	&lt;string&gt;1.0&lt;/string&gt;
	&lt;key&gt;CFBundleIconFile&lt;/key&gt;
	&lt;string&gt;app_icon.icns&lt;/string&gt;
	&lt;key&gt;CFBundleIdentifier&lt;/key&gt;
	&lt;string&gt;net.yourcompany.yourapplication&lt;/string&gt;
	&lt;key&gt;CFBundleInfoDictionaryVersion&lt;/key&gt;
	&lt;string&gt;6.0&lt;/string&gt;
	&lt;key&gt;CFBundleName&lt;/key&gt;
	&lt;string&gt;applicationName&lt;/string&gt;
	&lt;key&gt;CFBundlePackageType&lt;/key&gt;
	&lt;string&gt;APPL&lt;/string&gt;
	&lt;key&gt;CFBundleShortVersionString&lt;/key&gt;
	&lt;string&gt;1.0&lt;/string&gt;
	&lt;key&gt;CFBundleSignature&lt;/key&gt;
	&lt;string&gt;????&lt;/string&gt;
        &lt;!--only useful if your app handle urls--&gt;
	&lt;key&gt;CFBundleURLTypes&lt;/key&gt;
	&lt;array&gt;
		&lt;dict&gt;
			&lt;key&gt;CFBundleURLIconFile&lt;/key&gt;
			&lt;string&gt;app_icon.icns&lt;/string&gt;
			&lt;key&gt;CFBundleURLName&lt;/key&gt;
			&lt;string&gt;YOURAPP Entity&lt;/string&gt;
			&lt;key&gt;CFBundleURLSchemes&lt;/key&gt;
			&lt;array&gt;
				&lt;string&gt;chrome&lt;/string&gt;
			&lt;/array&gt;
		&lt;/dict&gt;
	&lt;/array&gt;
	&lt;key&gt;CFBundleVersion&lt;/key&gt;
	&lt;string&gt;1.0&lt;/string&gt;
&lt;/dict&gt;
&lt;/plist&gt;</pre>
<p>Here's a sample of the PkgInfo file</p>
<pre><code>AAPL????</code></pre>
<p>Edit this as you need to, but <code>CFBundleExecutable</code> MUST be <em>xulrunner</em>, and <code>CFBundleIconFile</code> and <code>CFBundleURLIconFile</code> should be set to the filename of your application icon (<em>app_icon.icns</em>).</p>
<p>Finally :</p>
<ul> <li>Your icon can be created with Icon Composer which can be found in /Developer/Application/Utilities/Icon Composer (if you installed the XCode developer tools). You should use an original image in png format.</li> <li>To make it all work, change the permissions of you bundle by running: <code>chmod -R 755 YourApp.app</code>.</li>
</ul>
<h3 id="Linux">Linux</h3>
<p>Most Linux applications are distributed as simple <code>.tar.bz2</code> archives which can be unpacked by the user wherever they wish. The archive should be structured as follows:</p>
<ul> <li><code><var>appname</var>/</code> <ul> <li><code>application.ini</code></li> <li><code>components/</code> <ul> <li>... components which are part of the application</li> </ul> </li> <li><code>chrome/</code> <ul> <li>... chrome which is part of the application</li> </ul> </li> <li>... additional application files such as icons, etc</li> <li><code><var>myapplicationname</var></code> (This is the "stub executable"... you should copy and rename this file from <code>xulrunner-stub</code> in your XULRunner installation.)</li> <li><code>xulrunner/</code> <ul> <li>... copy <code>xulrunner/</code> to this directory</li> </ul> </li> </ul> </li>
</ul>
<p>{{ languages( { "fr": "fr/XULRunner/D\u00e9ploiement_de_XULRunner_1.8", "ja": "ja/XULRunner/Deploying_XULRunner_1.8" } ) }}</p>
Revert to this revision