aboutsummaryrefslogtreecommitdiff
path: root/files/pt-pt/mozilla/add-ons/webextensions/publicar_a_sua_extensao/index.html
blob: acc5d21d5354f3cd6745cd7b544d2381b85c0781 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
title: Publicar a sua extensão
slug: Mozilla/Add-ons/WebExtensions/Publicar_a_sua_extensao
tags:
  - Extensões da Web
translation_of: Mozilla/Add-ons/WebExtensions/Package_your_extension_
---
<div>{{AddonSidebar}}</div>

<p> </p>

<div class="pull-aside">
<div class="moreinfo">
<p>Packaged extensions in Firefox are called "XPI files", which are ZIP files with a different extension.</p>

<p>You don't have to use the XPI extension when uploading to AMO.</p>
</div>
</div>

<p> </p>

<p>During development, your extension will consist of a directory containing a manifest.json file and the other files it needs—scripts, icons, HTML documents, and so on. You need to zip these into a single file for uploading to AMO.</p>

<p>If you're using web-ext, use <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/web-ext_command_reference#web-ext_build">web-ext build </a>to package your extension. Otherwise, follow the instructions below for your chosen operating system.</p>

<div class="note">
<p><strong>Dica</strong>: The ZIP file must be a ZIP of the extension's files themselves, not of the directory containing them.</p>
</div>

<h3 id="Windows">Windows</h3>

<ol>
 <li>Abra a pasta com os seus ficheiros da extensão.</li>
 <li>Selecione todos os ficheiros.</li>
 <li>Clique direito e escolha "Enviar para" → Pasta Comprimida (zipped).</li>
</ol>

<p><img alt="" src="https://mdn.mozillademos.org/files/11949/install-windows.png" style="display: block; height: 576px; margin-left: auto; margin-right: auto; width: 800px;"></p>

<h3 id="Mac_OS_X">Mac OS X</h3>

<ol>
 <li>Open the folder with your extension's files.</li>
 <li>Select all of the files.</li>
 <li>Right click and choose Compress <em>n</em> Items.</li>
</ol>

<p><img alt="" src="https://mdn.mozillademos.org/files/11951/install-osx.png" style="display: block; height: 449px; margin-left: auto; margin-right: auto; width: 800px;"></p>

<div class="pull-aside">
<div class="moreinfo">See <a href="http://www.info-zip.org/mans/zip.html">http://www.info-zip.org/mans/zip.html</a>.</div>
</div>

<h3 id="Linux_Mac_OS_X_Terminal">Linux / Mac OS X Terminal</h3>

<ol>
 <li>Open Terminal.</li>
 <li>Open the directory containing your extension's files,  using the command<br>
  <code>cd path/to/<em>my-extension</em>/</code></li>
 <li>ZIP the content of the directory, using the command<br>
  <code>zip -r -FS ../<em>my-extension</em>.zip *</code></li>
</ol>