• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..07-May-2022-

build/H03-May-2022-554379

calendar/H31-Mar-2022-109,13189,464

chat/H03-May-2022-42,51438,869

ldap/H31-Mar-2022-51,65134,438

mail/H31-Mar-2022-197,477171,837

mailnews/H03-May-2022-458,827362,055

other-licenses/7zstub/H31-Mar-2022-

python/H31-Mar-2022-3,0682,442

suite/H31-Mar-2022-171,120142,010

taskcluster/H31-Mar-2022-8,1697,133

testing/H31-Mar-2022-250190

third_party/H03-May-2022-964,157729,669

tools/lint/H31-Mar-2022-371337

.arcconfigH A D31-Mar-2022140 65

.clang-format-ignoreH A D31-Mar-2022384 1714

.cron.ymlH A D31-Mar-20222.2 KiB8072

.eslintignoreH A D31-Mar-20221.7 KiB6653

.gecko_rev.ymlH A D31-Mar-20221.1 KiB2725

.prettierignoreH A D31-Mar-2022213 129

.taskcluster.ymlH A D31-Mar-202216.7 KiB322303

.yamllintH A D31-Mar-2022184 1311

.ycm_extra_conf.pyH A D31-Mar-2022534 166

AUTHORSH A D31-Mar-202215 KiB435432

README.mdH A D31-Mar-202211 KiB187108

moz.buildH A D31-Mar-2022342 86

README.md

1# Thunderbird
2Thunderbird is a powerful and customizable open source email client with lots of users. It is based on the same platform that Firefox uses.
3
4## Getting Started
5This README will try and give you the basics that you need to get started, more comprehensive documentation is available on the [Thunderbird Developer Website](https://developer.thunderbird.net).
6
7### Mozilla Code Base
8Thunderbird is built on the Mozilla platform, the same base that Firefox is built from. As such the two projects share a lot of code and much of the documentation for one will apply, in many ways, to the other.
9
10In order to be able to build Thunderbird - you will need the mozilla-central repository as well as the comm-central repository (where this README lives). Check out our [Getting Started documentation](https://developer.thunderbird.net/thunderbird-development/getting-started) for instructions on how and where to get the source code.
11
12### mozilla-central vs. comm-central
13
14The mozilla-central repostitory contains the Firefox codebase and all of the platform code. The comm-central repository is added as a subdirectory "comm/" under mozilla-central. This contains the code for Thunderbird.
15
16## Building Thunderbird
17
18### Build Prerequisites
19
20This README assumes that you already have the prerequisite software required to build Thunderbird. If you have not already done so, please complete the instructions for your operating system and then continue following this guide:
21
22- [Windows Build Prerequisites](https://developer.thunderbird.net/thunderbird-development/building-thunderbird/windows-build-prerequisites)
23- [Linux Build Prerequisites](https://developer.thunderbird.net/thunderbird-development/building-thunderbird/linux-build-prerequisites)
24- [macOS Build Prerequisites](https://developer.thunderbird.net/thunderbird-development/building-thunderbird/macos-build-prerequisites)
25
26### Build Configuration
27
28To build Thunderbird, you need to create a file named `mozconfig` (can also be `.mozconfig`) to the root directory of the mozilla-central checkout that contains the option `comm/mail` enabled. You can create a file with this line by doing this in the root source directory:
29
30```text
31echo 'ac_add_options --enable-application=comm/mail' > mozconfig
32```
33
34**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 also contain the line:
35
36```text
37ac_add_options --enable-debug
38```
39
40_Each of these ac\_add\_options entries needs to be on its own line._
41
42For more on configuration options, see the page [Configuring build options](https://developer.mozilla.org/en/Configuring_Build_Options). Note that if you use an MOZ\_OBJDIR it cannot be a sibling folder to the root source directory. Use an absolute path to be sure!
43
44### Building
45
46**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](https://treeherder.mozilla.org/#/jobs?repo=comm-central)
47
48To start the build, cd into the root source directory, and run:
49
50```text
51./mach build
52```
53
54mach is our command-line tool to streamline common developer tasks. See the [mach](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/mach) article for more.
55
56Building 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_.
57
58### Make Your Build Faster
59
60Follow this guide to rely on `ccache` and other [Tips for making builds faster](../getting-started.md).
61
62## Running Thunderbird
63
64To run your build, you can use:
65
66```text
67./mach run
68```
69
70There are various command line parameters you can add, e.g. to specify a profile, such as: -no-remote -P testing --purgecaches
71
72Various 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/`.
73
74The 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:
75
76* Windows: `obj-.../dist/bin/thunderbird.exe`
77* Linux: `obj-.../dist/bin/thunderbird`
78* macOS: `obj-.../dist/Daily.app/Contents/MacOS/thunderbird`
79
80## Update and Build Again
81
82To pull down the latest changes, in the mozilla directory run the following commands:
83
84```text
85hg pull -u
86cd comm
87hg pull -u
88cd ..
89```
90
91or to do it via one command:
92
93```text
94hg pull -u && cd comm && hg pull -u
95```
96
97The just run the `./mach build` command detailed in the [Building](./#building)instructions above. This will only recompile files that changed, but it may still take a long time.
98
99## Rebuilding
100
101To build after changes you can simply run:
102
103```text
104./mach build
105```
106
107### Rebuilding Specific Parts
108
109If you have made many changes, but only want to rebuild specific parts, you may run the following commands.
110
111#### C or C++ Files:
112
113```text
114./mach build binaries
115```
116
117#### JavaScript or XUL Files \(Windows Only\):
118
119```text
120./mach build path/to/dir
121```
122
123
124Replace `path/to/dir` with the directory with the files changed.
125
126This 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 example, to just rebuild the Lightning calendar extension:
127
128```text
129./mach build comm/calendar/lightning
130```
131
132
133## Contributing
134
135### Getting Plugged into the Community
136
137We have a complete listing of the ways in which you can get involved with Thunderbird [on our website](https://thunderbird.net/get-involved). Below are some quick references from that page that you can use if you are looking to contribute to Thunderbird core right away.
138
139#### Mailing Lists
140
141If you want to participate in discussions about Thunderbird development, there are two main mailing lists you want to join.
142
1431. [**TB-Planning**](https://wiki.mozilla.org/Thunderbird/tb-planning)**:** This mailing list is higher level topics like: the future of Thunderbird, potential features, and changes that you would like to see happen. It is also used to discuss a variety of broader issues around community and governance of the project.
1442. [**Maildev**](http://lists.thunderbird.net/mailman/listinfo/maildev_lists.thunderbird.net)**:** A moderated mailing list for discussing engineering plans for Thunderbird. It is a place where you can raise questions and ideas for core Thunderbird development.
145
146#### IRC
147
148If you want to ask questions about how to hack on Thunderbird, the IRC channel you want to join is [\#maildev on irc.mozilla.org](irc://irc.mozilla.org/maildev).
149
150### Report a Bug and Request Features
151
152### [Bugzilla](https://bugzilla.mozilla.org/enter_bug.cgi?product=Thunderbird)
153
154Thunderbird uses bugzilla for reporting and tracking bugs as well as enhancement requests. If you want to become a contributor to Thunderbird, you will need an account on Bugzilla.
155
156### Fixing a Bug and Submitting Patches
157
158All the issues, bugs, work in progress patches, or updates related to Thunderbird, are listed on Bugzilla and are properly organized per **Product**, **Component**, and **Status**. For instance you can see how they are listed by looking at [recent bugs for Thunderbird](https://bugzilla.mozilla.org/buglist.cgi?query_format=advanced&product=Thunderbird&bug_status=UNCONFIRMED&bug_severity=blocker&bug_severity=critical&bug_severity=major&bug_severity=normal&bug_severity=minor&bug_severity=trivial&chfieldfrom=-30d&chfield=%5BBug%20creation%5D&list_id=14706087).
159
160#### Create a Bugzilla account
161
162Creating an account is necessary in order to submit patches, leave comments, and interact with any other aspect of Bugzilla. If you're currently using an `IRC` username in the `#maildev` channel, we recommend saving your profile name with the current format `Firstname Lastname (:username)` in order to be easily searchable and allow the Thunderbird team to offer better support.
163
164#### Find a Bug
165
166Use the [Advanced Search](https://bugzilla.mozilla.org/query.cgi?format=advanced) section to find bugs you want to take care of, and be sure that the bug doesn't currently have any user listed as _Assignee_ and the _Status_ is set to `NEW`. You can see a list of "easy" bugs for beginners [via this query](https://bugzilla.mozilla.org/buglist.cgi?bug_status=NEW&classification=Client%20Software&classification=Developer%20Infrastructure&classification=Components&classification=Server%20Software&classification=Other&f1=status_whiteboard&o1=allwordssubstr&product=Calendar&product=Chat%20Core&product=MailNews%20Core&product=Thunderbird&resolution=---&v1=good%20first%20bug&list_id=14884036). However, we assume you came here to fix your "pet hate" bug, so you already likely have a bug to work with.
167
168#### Search for Code References
169
170Making sense of the **Thunderbird** source code, and knowing where to look, will take some time. The code base is pretty big and if you never worked with `XBL` or `Custom Elements` it can be overwhelming at first. We recommend using our code search engine, [Searchfox](https://searchfox.org/comm-central/source/), to inspect the source code and find snippets and references to help you out while investigating a bug.
171
172#### Mercurial Workflow
173
174Mercurial is pretty flexible in terms of allowing you to write your own code and keep it separate from the main code base. You can use Mercurial Bookmarks or Mercurial Queues for managing your work. We have guides created for [bookmarks](https://developer.thunderbird.net/contributing/fixing-a-bug/using-mercurial-bookmarks) and [queues](https://developer.thunderbird.net/contributing/fixing-a-bug/using-mercurial-queues) on our developer website. While some find Mercurial Queues easier to work with, support for them is being deprecated in various Mozilla tools.
175
176Once you finished taking care of your favorite bug and using Mercurial to commit and export your patch, you can upload it to Bugzilla for review.
177
178#### Upload a Patch
179
180Open your patch file in your code editor and be sure it includes all your code changes, and your name and commit message at the top. You can see an example of a patch for this [README here](https://bug1547325.bmoattachments.org/attachment.cgi?id=9093146).
181
182If everything looks good, you can access the selected bug in Bugzilla and click on the **Attach File** link located above the first comment.
183
184#### Ask for a Review
185
186When uploading a patch to Bugzilla, you can request a review from the user who opened the bug or another developer. Simply select the `?` in the dropdown selector in the _review_ option of the **Flags** section. An input field will appear which will allow you to type the name or username of the user you want to review your patch. You can see an example of [a patch on Bugzilla here](https://bugzilla.mozilla.org/show_bug.cgi?id=1547325#c1).
187