Prism/Bundle: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
==WebApp Bundle==
==WebApp Bundle==
In addition to passing simple command line parameters, [http://wiki.mozilla.org/WebRunner WebRunner] can use a zipped bundle package to install a webapp. The bundle can hold additional resources currently limited to:
In addition to passing simple command line parameters, [http://wiki.mozilla.org/Prism Prism] can use a zipped bundle package to install a webapp. The bundle can hold additional resources currently limited to:
* Application INI settings
* Application INI settings
* Application icon
* Application icon
Line 6: Line 6:


==Installing a Bundle==
==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''.
When Prism opens a webapp bundle it will unpack it into the '''webapps/{webapp-id}''' folder in your Prism profile. The web application may save other data into this folder. Prism will not overwrite or delete any extra data added to the folder. In fact, Prism saves some extra data itself - a file that holds some persistent UI data called ''localstore.json''.


<div class="note">The webapp must have an ID in order to be installed.</div>
<div class="note">The webapp must have an ID in order to be installed.</div>


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.
When Prism 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 Prism '''webapps/{webapp-id}''' folder. The web application is then launched without the unpacking overhead.


==HowTo==
==HowTo==
Line 27: Line 27:
</pre>
</pre>
* Zip the file to [whatever].webapp
* Zip the file to [whatever].webapp
* Double-click the webapp bundle or use <code>webrunner -webapp [path-to-webapp]
* Double-click the webapp bundle or use <code>prism -webapp [path-to-webapp]

Revision as of 20:10, 30 October 2007

WebApp Bundle

In addition to passing simple command line parameters, Prism 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 Prism opens a webapp bundle it will unpack it into the webapps/{webapp-id} folder in your Prism profile. The web application may save other data into this folder. Prism will not overwrite or delete any extra data added to the folder. In fact, Prism 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 Prism 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 Prism 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 prism -webapp [path-to-webapp]