Confirmed users
158
edits
Ptheriault (talk | contribs) |
|||
| Line 16: | Line 16: | ||
== Creating/Modifying a Signed Package == | == Creating/Modifying a Signed Package == | ||
Signed Packages are similar to existing web apps packaged apps - i.e. they consist of HTML, JavaScript, CSS files and other resources, and are packed into a package with a manifest.webapp file | Signed Packages are similar to existing web apps packaged apps - i.e. they consist of HTML, JavaScript, CSS files and other resources, and are packed into a package with a manifest.webapp file. | ||
<br> | <br> | ||
=== | === 0. Write a Regular Gaia App === | ||
The | The first step to create and host your signed package is to create a normal gaia app. | ||
=== 1. Add Additional Fields to the Manifest File === | |||
# package-identifer: A UUID to uniquely identify this package. The identifier will be treated a part of the origin. So please be careful to change this value across versions. | |||
# moz-package-origin: The origin where the package is going to be hosted. This prevents the package from being downloaded and hosted by other people. | |||
Note that the packaging/signing tool would automatically add other fields to the manifest file like "moz-resources". | |||
=== 2. | === 2. Create and Sign Your Package === | ||
* Install a [https://github.com/johnathan79717/fxos-package-signing-tool signing tool] | * Install a [https://github.com/johnathan79717/fxos-package-signing-tool signing tool] | ||
* Follow the tool instructions to sign the package | * Follow the tool instructions to sign the package | ||
=== 3. | === 3. Host Your Package === | ||
* Signed Packages are hosted as a file on a web server. The only requirements are: | * Signed Packages are hosted as a file on a web server. The only requirements are: | ||
** The package is served with the MIME type of “application/package” | ** The package is served with the MIME type of “application/package” | ||
** The package is served from the location specified in the manifest (moz-package- | ** The package is served from the location specified in the manifest (moz-package-origin) | ||
You can now use [URL-of-the-package]!//[relative-path-to-resource] to navigate the packaged web content via your browser. For example, if you host your package in http://foo.com/app.pak, then the path to "index.html" inside the package would be http://foo.com/app.pak!//index.html. | |||
<br> | <br> | ||