OLD | NEW |
1 <h1>Packaging</h1> | 1 <h1>Packaging</h1> |
2 | 2 |
3 | 3 |
4 <p> | 4 <p> |
5 This page describes how to package your extension. | 5 This page describes how to package your extension. |
6 As the <a href="overview.html">Overview</a> explains, | 6 As the <a href="overview.html">Overview</a> explains, |
7 extensions are packaged as signed ZIP files | 7 extensions are packaged as signed ZIP files |
8 with the file extension "crx"—for example, | 8 with the file extension "crx"—for example, |
9 <code>myextension.crx</code>. | 9 <code>myextension.crx</code>. |
10 </p> | 10 </p> |
(...skipping 15 matching lines...) Expand all Loading... |
26 When you package an extension, | 26 When you package an extension, |
27 the extension is assigned a unique key pair. | 27 the extension is assigned a unique key pair. |
28 The extension's ID is based on a hash of the public key. | 28 The extension's ID is based on a hash of the public key. |
29 The private key is used to sign each version of the extension | 29 The private key is used to sign each version of the extension |
30 and must be secured from public access. | 30 and must be secured from public access. |
31 Be careful not to include your private key within | 31 Be careful not to include your private key within |
32 your extensions! | 32 your extensions! |
33 </p> | 33 </p> |
34 | 34 |
35 | 35 |
36 <h2>Creating a package</h2> | 36 <h2 id="creating">Creating a package</h2> |
37 | 37 |
38 <p>To package an extension:</p> | 38 <p>To package an extension:</p> |
39 <ol> | 39 <ol> |
40 <li> | 40 <li> |
41 Bring up the Extensions management page | 41 Bring up the Extensions management page |
42 by going to this URL: | 42 by going to this URL: |
43 <blockquote> | 43 <blockquote> |
44 <b>chrome://extensions</b> | 44 <b>chrome://extensions</b> |
45 </blockquote> | 45 </blockquote> |
46 </li> | 46 </li> |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 <li> Rename the private key that was generated | 160 <li> Rename the private key that was generated |
161 when you created the <code>.crx</code> file to <code>key.pem</code>. </li> | 161 when you created the <code>.crx</code> file to <code>key.pem</code>. </li> |
162 <li> Put <code>key.pem</code> in the top directory | 162 <li> Put <code>key.pem</code> in the top directory |
163 of your extension. </li> | 163 of your extension. </li> |
164 <li> Compress that directory into a ZIP file. </li> | 164 <li> Compress that directory into a ZIP file. </li> |
165 <li> Upload the ZIP file using the | 165 <li> Upload the ZIP file using the |
166 <a href="https://chrome.google.com/webstore/developer/dashboard">Chrome Deve
loper Dashboard</a>. </li> | 166 <a href="https://chrome.google.com/webstore/developer/dashboard">Chrome Deve
loper Dashboard</a>. </li> |
167 </ol> | 167 </ol> |
168 | 168 |
169 | 169 |
170 <h2>Packaging at the command line</h2> | 170 <h2 id="packaging">Packaging at the command line</h2> |
171 | 171 |
172 <p> | 172 <p> |
173 Another way to package extensions | 173 Another way to package extensions |
174 is by invoking <code>chrome.exe</code> at the command line. | 174 is by invoking <code>chrome.exe</code> at the command line. |
175 Use the <code>--pack-extension</code> flag | 175 Use the <code>--pack-extension</code> flag |
176 to specify the location of the extension's folder. | 176 to specify the location of the extension's folder. |
177 Use <code>--pack-extension-key</code> | 177 Use <code>--pack-extension-key</code> |
178 to specify the location of the extension's private key file. | 178 to specify the location of the extension's private key file. |
179 For example: | 179 For example: |
180 </p> | 180 </p> |
181 | 181 |
182 <pre> | 182 <pre> |
183 chrome.exe --pack-extension=c:\myext --pack-extension-key=c:\myext.pem | 183 chrome.exe --pack-extension=c:\myext --pack-extension-key=c:\myext.pem |
184 </pre> | 184 </pre> |
185 | 185 |
186 <p> | 186 <p> |
187 To suppress the dialog, | 187 To suppress the dialog, |
188 add <code>--no-message-box</code> to the command. | 188 add <code>--no-message-box</code> to the command. |
189 </p> | 189 </p> |
190 | 190 |
191 <h2>Package format and scripts</h2> | 191 <h2 id="format">Package format and scripts</h2> |
192 <p> | 192 <p> |
193 For more information on the format, as well as pointers to scripts you can use | 193 For more information on the format, as well as pointers to scripts you can use |
194 to create <code>.crx</code> files, see <a href="crx.html">CRX Package Format</a>
. | 194 to create <code>.crx</code> files, see <a href="crx.html">CRX Package Format</a>
. |
195 </p> | 195 </p> |
OLD | NEW |