Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License, and code samples are licensed under the BSD License.
©2011 Google
This page describes how to package your extension.
As the Overview explains,
extensions are packaged as signed ZIP files
with the file extension "crx" —
for example, myextension.crx.
Note:
You might not need to package your extension.
If you publish your extension using the
Chrome Developer Dashboard,
then the only reason to create your own .crx file
would be to distribute a non-public version —
for example, to alpha testers.
When you package an extension, the extension is assigned a unique key pair. The public key is used as the identifier for the extension. The private key is kept private and used to sign each version of the extension.
To package an extension:
chrome://extensions
c:\myext.
(Ignore the other field;
you don't specify a private key file
the first time you package a particular extension.)
.crx file,
which is the actual extension that can be installed,
and a .pem file,
which contains the private key.
Do not lose the private key!
Keep the .pem file secret and in a safe place.
You'll need it later if you want to do any of the following:
If the extension is successfully packaged, you'll see a dialog like this
that tells you where to find
the .crx and .pem files:
To create an updated version of your extension:
manifest.json.
c:\myext.
.pem file for this extension —
for example, c:\myext.pem.
If the updated extension is successfully packaged, you'll see a dialog like this:
Another way to package extensions
is by invoking chrome.exe at the command line.
Use the --pack-extension flag
to specify the location of the extension's folder.
Use --pack-extension-key
to specify the location of the extension's private key file.
For example:
chrome.exe --pack-extension=c:\myext --pack-extension-key=c:\myext.pem
To suppress the dialog,
add --no-message-box to the command.
For more information on the format, as well as pointers to scripts you can use
to create .crx files, see CRX package format.