Prism/Bundle

From MozillaWiki
Jump to navigation Jump to search

WebApp Bundle

In addition to passing simple command line parameters, WebRunner can use a zipped bundle package to install a webapp. The bundle can hold additional resources currently limited to:

  • Application INI settings
  • Application icon
  • Script for the application chrome, not the web content

Installing a Bundle

When WebRunner opens a webapp bundle it will unpack it into the webapps/{webapp-id} folder in your WebRunner profile. The web application may save other data into this folder. WebRunner will not overwrite or delete any extra data added to the folder. In fact, WebRunner saves some extra data itself - a file that holds some persistent UI data called localstore.json.

The webapp must have an ID in order to be installed.

When WebRunner is launched with a "-webapp [bundle]" command line, the bundle must first be unpacked before the web application is launched. This can slow the overall launch time and the unpacking is redundant if the bundle has been launched previously. This is why the preferred method of launching is to use the "-webapp [webapp-id]" command line, which looks for the previously installed (unpacked) web application in the WebRunner webapps/{webapp-id} folder. The web application is then launched without the unpacking overhead.

HowTo

Here is a simple way to build a basic web application bundle:

  • Create file called webapp.ini that contains something like:
[Parameters]
id=unique-app-id@unique-author-id.whatever
uri=http://[the-url-what-you-want-to-connect-to]/
status=yes
location=no
sidebar=no
navigation=no
  • Zip the file to [whatever].webapp
  • Double-click the webapp bundle or use webrunner -webapp [path-to-webapp]