2023-11-24 10:17:08 +00:00
|
|
|
|
# Building
|
2019-01-29 15:18:42 +00:00
|
|
|
|
|
2021-05-25 09:13:29 +00:00
|
|
|
|
The Remote Agent is included in the default Firefox build, but only
|
2019-12-02 15:39:51 +00:00
|
|
|
|
ships on the Firefox Nightly release channel:
|
2019-01-29 15:18:42 +00:00
|
|
|
|
|
2023-11-24 10:17:08 +00:00
|
|
|
|
```shell
|
|
|
|
|
% ./mach run --remote-debugging-port
|
|
|
|
|
```
|
2019-01-29 15:18:42 +00:00
|
|
|
|
|
2019-12-02 15:39:51 +00:00
|
|
|
|
The source code can be found under [remote/ in central].
|
|
|
|
|
|
|
|
|
|
There are two build modes to choose from:
|
2019-01-29 15:18:42 +00:00
|
|
|
|
|
2023-11-24 10:17:08 +00:00
|
|
|
|
## Full build mode
|
2019-04-24 17:18:22 +00:00
|
|
|
|
|
2021-05-25 09:13:29 +00:00
|
|
|
|
The Remote Agent is included when you build in the usual way:
|
2019-04-24 15:18:09 +00:00
|
|
|
|
|
2023-11-24 10:17:08 +00:00
|
|
|
|
```shell
|
|
|
|
|
% ./mach build
|
|
|
|
|
```
|
2019-04-24 17:18:22 +00:00
|
|
|
|
|
|
|
|
|
When you make changes to XPCOM component files you need to rebuild
|
2019-01-29 15:18:42 +00:00
|
|
|
|
in order for the changes to take effect. The most efficient way to
|
|
|
|
|
do this, provided you haven’t touched any compiled code (C++ or Rust):
|
|
|
|
|
|
2023-11-24 10:17:08 +00:00
|
|
|
|
```shell
|
|
|
|
|
% ./mach build faster
|
|
|
|
|
```
|
2019-01-29 15:18:42 +00:00
|
|
|
|
|
2019-11-28 19:42:58 +00:00
|
|
|
|
Component files include the likes of components.conf,
|
2019-08-13 23:49:39 +00:00
|
|
|
|
RemoteAgent.manifest, moz.build files, and jar.mn.
|
2024-03-12 08:55:41 +00:00
|
|
|
|
All the JS modules (files ending with `.sys.mjs`) are symlinked into
|
2019-04-24 17:18:22 +00:00
|
|
|
|
the build and can be changed without rebuilding.
|
|
|
|
|
|
2021-05-25 09:13:29 +00:00
|
|
|
|
You may also opt out of building all the WebDriver specific components
|
|
|
|
|
([Marionette], and the Remote Agent) by setting the following flag in
|
|
|
|
|
your [mozconfig]:
|
2019-04-24 17:18:22 +00:00
|
|
|
|
|
2023-11-24 10:17:08 +00:00
|
|
|
|
```make
|
|
|
|
|
ac_add_options --disable-webdriver
|
|
|
|
|
```
|
2019-04-24 17:18:22 +00:00
|
|
|
|
|
2023-11-24 10:17:08 +00:00
|
|
|
|
## Artifact mode
|
2019-04-24 17:18:22 +00:00
|
|
|
|
|
2021-05-25 09:13:29 +00:00
|
|
|
|
You may also use [artifact builds] when working on the Remote Agent.
|
2019-04-24 17:18:22 +00:00
|
|
|
|
This fast build mode downloads pre-built components from the Mozilla
|
|
|
|
|
build servers, rendering local compilation unnecessary. To use
|
|
|
|
|
them, place this in your [mozconfig]:
|
|
|
|
|
|
2023-11-24 10:17:08 +00:00
|
|
|
|
```make
|
|
|
|
|
ac_add_options --enable-artifact-builds
|
|
|
|
|
```
|
2019-01-29 15:18:42 +00:00
|
|
|
|
|
2019-12-02 15:39:51 +00:00
|
|
|
|
[remote/ in central]: https://searchfox.org/mozilla-central/source/remote
|
2022-01-11 10:48:20 +00:00
|
|
|
|
[mozconfig]: /build/buildsystem/mozconfigs.rst
|
2022-01-17 10:49:42 +00:00
|
|
|
|
[artifact builds]: /contributing/build/artifact_builds.rst
|
2022-01-11 10:48:20 +00:00
|
|
|
|
[Marionette]: /testing/marionette/index.rst
|