-
Notifications
You must be signed in to change notification settings - Fork 87
Update documentation for git migration #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,7 @@ Depending on your Operating System you will need to carry out a different proces | |
|
|
||
| ## Build Configuration | ||
|
|
||
| To build Thunderbird, you need a file named `mozconfig` in the root directory of the mozilla-central checkout that contains the option `comm/mail` enabled. If you do not already have this file, then you can create it with this line by doing this in the `source/` directory: | ||
| To build Thunderbird, you need a file named `mozconfig` in the root directory of the firefox checkout that contains the option `comm/mail` enabled. If you do not already have this file, then you can create it with this line by doing this in the `source/` directory: | ||
|
|
||
| ``` | ||
| echo 'ac_add_options --enable-project=comm/mail' > mozconfig | ||
|
|
@@ -44,7 +44,7 @@ For more info on configuration options, see the page [Configuring build options] | |
| ## Building | ||
|
|
||
| {% hint style="warning" %} | ||
| 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) | ||
| Before you start, make sure that the version you checked out is not busted. For `git` tip, you should see green Bs on [https://treeherder.mozilla.org/#/jobs?repo=comm-central](https://treeherder.mozilla.org/#/jobs?repo=comm-central) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is "tip" still a thing with our move to git? If not, maybe we want to say "For the top of the |
||
| {% endhint %} | ||
|
|
||
| After you have met the [build prerequisites](./#build-prerequisites) for your OS, the build is started in the `source` directory with: | ||
|
|
@@ -71,29 +71,29 @@ To run your build, you can use: | |
|
|
||
| There are various command line parameters you can add, e.g. to specify a profile. | ||
|
|
||
| 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/`. | ||
| Various temporary files, libraries, and the Thunderbird executable will be found in your object directory (under `comm/`), 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: | ||
| 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` working directory: | ||
|
|
||
| * Windows: `obj-.../dist/bin/thunderbird.exe` | ||
| * Linux: `obj-.../dist/bin/thunderbird` | ||
| * macOS: `obj-.../dist/Daily.app/Contents/MacOS/thunderbird` | ||
|
|
||
| ## Update and Build Again | ||
|
|
||
| To pull down the latest changes, in the mozilla directory run the following commands: | ||
| To pull down the latest changes, in the firefox directory run the following commands: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. change "firefox" to "Firefox" |
||
|
|
||
| ``` | ||
| hg pull -u | ||
| git pull --rebase | ||
| cd comm | ||
| hg pull -u | ||
| git pull --rebase | ||
| cd .. | ||
| ``` | ||
|
|
||
| or to do it via one command: | ||
|
|
||
| ``` | ||
| hg pull -u; (cd comm; hg pull -u) | ||
| git pull --rebase && git -C comm pull --rebase | ||
| ``` | ||
|
|
||
| Then 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. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,50 +41,42 @@ You can check with `python3 --version` to see if you have it already. If not, yo | |
|
|
||
| You will also need `python3-distutils` and `python3-pip` installed from your distribution's package manager. | ||
|
|
||
| ### Mercurial | ||
| ### Git | ||
|
|
||
| As noted in the [Setting up a build environment page](../setting-up-a-build-environment.md), both `mozilla-central` and `comm-central` are repositories using the Mercurial version control system. This means you will need to install Mercurial. Here are the quick commands to use for common Linux based operating systems but for a more complete list of instructions (if neither of these works for your use case), please see [Mercurial's download page on their wiki](https://www.mercurial-scm.org/wiki/Download). | ||
| As noted in the [Setting up a build environment page](../setting-up-a-build-environment.md), both Firefox and Thunderbird source are stored in Git repositories. This means you will need to install Git if it is not already available. Here are some quick commands to install on common distributions: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. change "both Firefox and Thunderbird source" to "both Firefox and Thunderbird sources" |
||
|
|
||
| #### Ubuntu/Debian | ||
|
|
||
| ``` | ||
| sudo apt install mercurial | ||
| sudo apt install git | ||
| ``` | ||
|
|
||
| #### Fedora | ||
|
|
||
| ``` | ||
| sudo dnf install mercurial | ||
| sudo dnf install git | ||
| ``` | ||
|
|
||
| ## Getting the Code | ||
|
|
||
| Once you have Mercurial installed, you are ready to grab the source code. There are a couple of different methods to do this. | ||
|
|
||
| {% hint style="warning" %} | ||
| Mozilla-central will build Firefox without the comm-central repo present and a few options set. Mozilla-central is the Firefox codebase and comm-central features the additions that turn Firefox into Thunderbird. | ||
| {% endhint %} | ||
| Once you have Git installed, you are ready to grab the source code. There are a couple of different methods to do this. | ||
|
|
||
| ### Scripted | ||
|
|
||
| The [`bootstrap.py`](https://hg.mozilla.org/comm-central/raw-file/tip/python/rocboot/bin/bootstrap.py) script will grab the two source repos you need, run `./mach bootstrap` for you, and sets up a necessary `mozconfig` file. Download this file to the directory where you would like your source code folder to live, either by clicking the link and moving the file to the appropriate location or using `wget`. Then make it executable and run it. | ||
| The [`bootstrap.py`](https://raw.githubusercontent.com/thunderbird/thunderbird-desktop/main/python/rocboot/bin/bootstrap.py) script will grab the two source repos you need, run `./mach bootstrap` for you, and sets up a necessary `mozconfig` file. Download this file to the directory where you would like your source code folder to live, either by clicking the link and moving the file to the appropriate location or using `wget`. Then make it executable and run it. | ||
|
|
||
| ``` | ||
| mkdir tb-build && cd tb-build | ||
| wget https://hg.mozilla.org/comm-central/raw-file/tip/python/rocboot/bin/bootstrap.py | ||
| wget https://raw.githubusercontent.com/thunderbird/thunderbird-desktop/main/python/rocboot/bin/bootstrap.py | ||
| chmod +x bootstrap.py | ||
| ./bootstrap.py | ||
| ``` | ||
|
|
||
| This will create a `mozilla-unified` directory with both a `mozconfig` and a `comm/` folder inside. | ||
| This will create a `source/` directory with both a `mozconfig` and a `comm/` folder inside. | ||
|
|
||
| The `mozilla-unified` repository has several bookmarks (akin to a git branch) and you will by default be on the `autoland` bookmark. You will need to be on the `central` bookmark and you can change by going into this directory and changing to that bookmark: | ||
|
|
||
| ``` | ||
| hg up central | ||
| ``` | ||
| The `source/` repository contains the Firefox source and defaults to the `main` branch. | ||
|
|
||
| The `mozilla-unified/comm` repository has several bookmarks and you will by default be on the `comm` bookmark. This is where you want to be, unless you are specifically working on a past ESR. | ||
| The `source/comm` repository also defaults to the `main` branch. | ||
|
|
||
| The `mozconfig` file is setup to build Thunderbird and you can verify this with `cat mozconfig`; the `--enable-project` parameter should be `comm/mail`: | ||
|
|
||
|
|
@@ -98,12 +90,12 @@ If you would rather manually gather the source code, perform the bootstrap, and | |
|
|
||
| #### Checkout the Source Code | ||
|
|
||
| Get the latest Mozilla source code from Mozilla's `mozilla-central` Mercurial code repository, and check it out into a local directory `source` (or however you want to call it). Then, get the latest Thunderbird source code from Mozilla's `comm-central` Mercurial code repository. It needs to be placed **inside** the Mozilla source code, in a directory named `comm/`: | ||
| Get the latest Firefox source code, and check it out into a local directory `source` (or however you want to call it). Then, get the latest Thunderbird source code. It needs to be placed **inside** the Mozilla source code, in a directory named `comm/`: | ||
|
|
||
| ``` | ||
| hg clone https://hg.mozilla.org/mozilla-central source/ | ||
| git clone https://github.com/mozilla-firefox/firefox source/ | ||
| cd source/ | ||
| hg clone https://hg.mozilla.org/comm-central comm/ | ||
| git clone https://github.com/thunderbird/thunderbird-desktop comm/ | ||
| ``` | ||
|
|
||
| #### Create `mozconfig` file | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this particular merge was done before our move to git, should it remain indicative of the mercurial branch comm-central?