MDN’s new design is in Beta! A sneak peek: https://blog.mozilla.org/opendesign/mdns-new-design-beta/

Thunderbird build (Simples)

Esta tradução está incompleta. Por favor, ajude a traduzir este artigo.

Esta página contém os passos básicos para construir uma versão de desenvolvimento do Thuderbird. Para informações adicionais veja a documentação de construção.

Requisitos de Hardware

  • 4GB de RAM. 8GB ou mais é recomendado. Enquanto você pode construir o Thunderbird em hardware antigo isso pode demorar muito.
  • Alta conexão com a internet

Pré-requisitos para construção

Dependendo do seu sistema operacional, você precisará efetuar uma serie de diferentes processos para preparar sua máquina. Primeiramente complete os passos necessários para o seu sistema operacional e depois continue seguindo as instruções desse documento.

Obtenha o código

Nota: No Windows, Você não poderá construir o código fonte do Thunderbird  se ele estiver em um diretório com espaços no caminho (e.x., Não use "Documents and Settings"). Você pode selecionar qualquer outro local, como um novo diretório C:/thunderbird-src (onde "C:/" com uma barra normal, é intencional para mostrar que você está na prompt de comando MozillaBuild pelos Pré-requisitos para Windows.
Nota: Também podem ocorrer problemas no processo de construção quando o código fonte está em um diretório com um longo caminho. No Linux, isso pode causar problemas ao definir a virtualenv para realizar testes (falha ao instalar pip ou virtualenv devido a erros de acesso negado do sistema operacional, onde o acesso negado não é devido a problemas de permissão, mas sim devido ao caminho sendo acessando não ter sido truncado, assim não existindo). Ter o código fonte em uma área profunda da hierarquia do sistema de arquivos também pde causar problemas com construções do pymake no Windows. Se você encontrar problemas arbitrários semelhantes no processo de construção, mova os arquivos para próximo do diretório raíz de sua máquina e tente novamente.

Get the latest source code from Mozilla's comm-central Mercurial code repository:

hg clone http://hg.mozilla.org/comm-central 

Then, get all the repositories it depends on. The comm-central repository includes a script to do just that. This may take a while, it's a lot of code! First, cd into the comm-central subdirectory (created automatically by the previous command):


cd comm-central

then run:


python client.py checkout

The source code requires 1.5GB of free space or more.

For more on getting the source code, see the page Getting comm-central Source Code Using Mercurial [en-US].

Build configuration

By default, the build system creates a release build of Thunderbird roughly equivalent to the official Thunderbird release builds. If that's not exactly what you want, there are many build configuration options to choose from, although it's strongly recommended that you only use options that you fully understand. The normal way to specify build options is to place them in a file called '.mozconfig' at the root of your mozilla source tree. For example, to create a debug build instead of a release build, that file would contain:

ac_add_options --enable-debug

For more on configuration options, see the page Configuring build options. Note that if you use an MOZ_OBJDIR it cannot be a sibling folder to your source directory. Use an absolute path to be sure!

OS X 10.9 Notice

Because of an issue with the 10.9 OS X SDK, you must use an earlier SDK version. To do this add the following to your .mozconfig:

ac_add_options --with-macos-sdk=path/to/older/sdk

The path to the SDKs are usually located at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/.

See Bug 976183 for more information.

Building Thunderbird

To start the build, cd into the comm-central subdirectory (created automatically by the hg clone command), and run:

./mozilla/mach build

mach is our command-line tool to streamline common developer tasks. See the mach article for more.

Building can take a significant amount of time, depending on your system, OS, and chosen build options. Linux builds on a fast box may take under 15 minutes, but Windows builds on a slow box may take several hours. Tips for making builds faster.

Due to bug 863409 you may see the incorrect error message " Binary expected at ... does not exist." You can safely ignore this error. The executable will be at the location listed under Running below.

Building Thunderbird and Lightning

If you've set up your build environment as above, then all you need to do is:

echo 'ac_add_options --enable-calendar' >> .mozconfig

in the comm-central directory, or just add the ac_add_options --enable-calendar line to your .mozconfig with your favorite editor.

Then just re-run the mach command above (you can do the addition before running make for the first time).

Running

Various temporary files, libraries, and the Thunderbird executable will be found in your object directory (under comm-central/), which is prefixed with obj-. The exact name depends on your system and OS. For example, a Mac user may get an object directory name of obj-x86_64-apple-darwin10.7.3/.

The Firefox executable in particular, and its dependencies, are located under the mozilla/dist/bin folder under the object directory. To run the executable from your comm-central working directory:

  • Windows: obj-.../mozilla/dist/bin/thunderbird.exe
  • Linux: obj-.../mozilla/dist/bin/thunderbird
  • OS X: obj-.../mozilla/dist/Daily.app/Contents/MacOS/thunderbird

How to update and build again

In your comm-central directory, run the same command as before:

python client.py checkout

Then just re-run the mach command above. This will only recompile files that changed, but it's still a long haul. An incremental build can be faster.

Problems Building?

Have you:

  • Checked the Thunderbird tbpl for known failures at the time you pulled the code?
    • If the trunk is broken, you may wish to consider building one of the branches (to pull the source code from a branch, just replace the url to the repository in the hg clone instruction).
  • Checked to make sure that the path in which you placed the source code has no spaces, and is not too long?
  • Have you searched the bug database for issues relating to your problem (e.g., platform-specific issues)?
  • Try asking in mozilla.dev.builds - don't forget to include details of what is in your mozconfig, and what the actual error is.

References

Etiquetas do documento e colaboradores

 Colaboradores desta página: Eihen, leonardoprg
 Última atualização por: Eihen,