Visit Mozilla.org

XULRunner:Deploying XULRunner 1.8

From MDC


XULRunner 1.8 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.

[edit] 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

[edit] Mac OS X

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

  • MyApp.app/
    • Contents/
      • Info.plist
      • 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.)

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>YOURAPP</string>
	<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>

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).

[edit] 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