Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

간단한 Thunderbird 빌드

현재 번역은 완벽하지 않습니다. 한국어로 문서 번역에 동참해주세요.

This page covers the basic steps needed to build a bleeding-edge, development version of Thunderbird. For additional, more detailed information, see the build documentation.

Build 전 준비사항

하드웨어  요구사항:

  • 추천: 4GB 메모리(2GB 메모리와 2GB swap 만 가지고 시도할 경우 컴파일 도중 메모리 에러가 발생할 수 있습니다). 메모리 에러와 관련한 더 자세한 사항은 아래 내용을 참조하세요.
  • 고속 인터넷

설치:

당신의 운영체제에 따라 빌드 환경을 설치하는데 각각 다른 설치 과정이 요구됩니다. 우선 당신의 운영체제에 따른 요구사항을 완료한 뒤 빌드 설치를 시작하세요. Linux/MacOS 사용자는 mozilla-central 레포지토리를 복사하기 위한 스크립트 프롬프트를 무시하시고 대신 이 문서를 따라 진행해주세요.

Windows 빌드 요구사항 [ko]

Linux / MacOS 빌드 요구사항 [ko]

소스코드 가져오기

Note: On Windows, you won't be able to build the Thunderbird source code if it's under a directory with spaces in the path (e.g., don't use "Documents and Settings"). You can pick any other location, such as a new directory C:/thunderbird-src (where the syntax "C:/" with a forward slash is intentional to clarify one should now be in the Windows build prerequisite MozillaBuild command prompt).
Note: Parts of the build process also have problems when the source code is in a directory where the path is long (nested many levels deep). On Linux, this can manifest as problems setting up the virtualenv for running tests (failure to install pip or virtualenv because of OS access denied errors, where access is denied not because of permission problems, but because the paths being accessed have been truncated, and so do not exist). Having the source deep in a filesystem hierarchy can also cause problems with pymake builds on Windows. If you run into seemingly arbitrary problems in building and the source is deeply nested, try moving it close to the root of your machine and re-building.

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

hg clone https://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
On some types of network connections, "hg clone" might fail because it gets interrupted. It is faster and more efficient to use Mercurial bundles instead the first time you fetch the complete repo. In this case, you need a bundle for comm-central, and a bundle for mozilla-central. Unbundle mozilla-central into a "mozilla" subdirectory of your comm-central repo after unbundling comm-central. (Make sure the unbundled folder's name is now "mozilla" and not "mozilla-central" ). Then run python client.py checkout to ensure you are up-to-date.

The source code requires 3.2GB of free space or more and additionally 5GB or more for default build.

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

빌드 설정

To build thunderbird, you need to add a file named .mozconfig to the root directory of the comm-central checkout that contains the following line:

ac_add_options --enable-application=mail

You can create a file with this line by doing this:

cd comm-central
echo 'ac_add_options --enable-application=mail' > .mozconfig

If you omit this line, the build system will build Firefox instead. Other build configuration options can be added to this file, although it's strongly recommended that you only use options that you fully understand. 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/10.10 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/.

Thunderbird 빌드

Before you start, make sure that the version you checked out is not busted. For hg tip, you should see green Bs on https://treeherder.mozilla.org/#/jobs?repo=comm-central

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.

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).

실행

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 Thunderbird executable in particular, and its dependencies, are located under the dist/bin folder under the object directory. To run the executable from your comm-central working directory:

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

업데이트 및 재빌드하는 방법

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.

재빌드

To build after making changes, run

./mozilla/mach build

again. This will only rebuild what is necessary for these changes. It is also possible to rebuild specifically.

If you changed C or C++ files, run:

./mozilla/mach build binaries

If you changed JavaScript or XUL files, on Mac OS X or Linux you don't have to rebuild since the files in the object directory are linked to the ones in the source directory. On Windows run:

./mozilla/mach build path/to/dir

This is the tricky bit, since you need to specify the directory that installs the files, which may be a parent directory of the changed file's directory.

For all other changes run the full rebuild:

./mozilla/mach build

빌드 과정 중 문제가 생기는 경우

Have you:

  • Check comm-central on Treeherder for known failures at the time you pulled the code. The current status of the trunk can also be checked at https://treestatus.mozilla.org/
    • If the trunk is broken (i.e. closed), 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).
  • On Windows: check that the MAPI header files from https://www.microsoft.com/en-us/download/details.aspx?id=12905 are installed because the MAPI header files are not bundled with Visual Studio 2013 (Windows SDK 8.1). You should copy the header files to a Windows SDK include directory so that the build process will find the files, for example to C:\Program Files (x86)\Windows Kits\8.1\Include\shared.
  • Check to make sure that the path in which you placed the source code has no spaces, and is not too long.
  • Searched the bug database for issues relating to your problem (e.g., platform-specific issues).
  • Try asking in mozilla.dev.builds - include details of what is in your mozconfig, and what the actual error is.
  • Check if your mozilla/ is a symlink. A symlink there is not supported.
  • Check for @TOPSRCDIR@ or relative paths in your mozconfig. Those have caused several problems historically and tend to be poorly tested when the build system changes.
  • If on Windows you get link errors like "LNK1102: out of memory" or "LNK1318: Unexpected PDB error; OK (0)", try deleting the largest .PDB files before rushing out the door to buy more RAM. Clobbering (see below) will also remove those files.
  • Try with a clean obj-dir. You can clean out previous build artefacts using
    ./mozilla/mach clobber

참조

문서 태그 및 공헌자

 이 페이지의 공헌자: hoony
 최종 변경: hoony,