Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ a number of hours to complete.
```shell
PYPATH=$(which python3); ln -s $PYPATH `dirname $PYPATH`/python
```
1. Recent brew installations of Python may create unversioned symlinks but not add them to your `PATH`. You can instead run `brew info python` to see their installation locations, and add the corresponding location to your `PATH`. For example:
```shell
export PATH="/opt/homebrew/opt/python@3.14/libexec/bin:$PATH"
```

1. Install gyp:
```shell
wget https://bootstrap.pypa.io/ez_setup.py -O - | python3 -
Expand All @@ -66,6 +71,14 @@ a number of hours to complete.
export PATH="~/tools/gyp:$PATH"
```
1. If you have additional questions, consult [this guide](https://github.com/mogemimi/pomdog/wiki/How-to-Install-GYP).
1. If you encounter a `ModuleNotFoundError`, try installing setuptools on your system. For example:
```shell
brew install python-setuptools
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure I've seen this same issue, how about making this a bit more generic? I'm thinking something like "If you encounter a ModuleNotFoundError, then install setuptools on your system (for example brew install python-setuptools)"

1. Similarly, recent brew installations may result in **externally-managed-environment** errors. This can be addressed with `brew install pipx` and replacing the last line with `pipx install .`



1. Make sure your homebrew python's bin folder is on your path by updating your bash/zsh profile with the following:
```shell
export PATH="$PATH:$(brew --prefix)/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/bin"
Expand Down Expand Up @@ -107,8 +120,12 @@ The following instructions assume that you are building `application-services` f
1. NDK (Side by side) version 29.0.14206865 [as configured](https://github.com/mozilla/application-services/blob/bb8cde8a5/taskcluster/docker/linux/Dockerfile#L25)
1. Android SDK Command-line Tools (latest)
1. Set environment variables based on the boostrapped code and the downloaded NDK. Add it to your rc file (either `.zshrc` or `.bashrc` depending on your shell) to make it permanent
1. Set `JAVA_HOME` to point to the bootstraped JDK 17 installation directory. Ex: `export JAVA_HOME=~/.mozbuild/jdk/jdk-17.0.18+8/`
1. Set `ANDROID_HOME` to the bootstraped Android SDK. Ex: `export ANDROID_HOME=~/.mozbuild/android-sdk-linux`
1. Set `JAVA_HOME` to point to the bootstraped JDK 17 installation directory. Ex: `export JAVA_HOME=~/.mozbuild/jdk/jdk-17.0.18+8/` (or `export JAVA_HOME=~/.mozbuild/jdk/jdk-17.0.18+8/Contents/Home` on Mac).
1. Set `ANDROID_HOME` to the bootstraped Android SDK. As an example:
```shell
export ANDROID_HOME=~/.mozbuild/android-sdk-linux
```

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not actually totally sure if the ANDROID_SDK_ROOT set is necessary here, but a later step here describes it being set here and it's not mentioned elsewhere on the page.

In the codebase I don't see any other uses of ANDROID_SDK_ROOT (aside from documentation or CI setting it) so I assume its deprecated/unused. If so, I can instead adjust the other step to remove the reference to this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I never set ANDROID_SDK_ROOT just ANDROID_HOME. How about removing the reference from that other doc rather than adding one here?


1. Set `NSS_STATIC` to 1. Ex: `export NSS_STATIC=1`
1. Set `NSS_DIR` to your local NSS folder. Ex: `export NSS_DIR=~/Mozilla/application-services/libs/desktop/linux-x86-64/nss`
1. Set `ANDROID_NDK_ROOT` to the NDK you downloaded via Android Studio, Ex: `export ANDROID_NDK_ROOT=~/.mozbuild/android-sdk-linux/ndk/29.0.14206865`
Expand Down
2 changes: 1 addition & 1 deletion docs/howtos/locally-published-components-in-fenix.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ In the root of the app-services repo:

Please be sure you have read [our guide to building Fenix](../building.md#building-for-fenix) and successfully built
using the instructions there. In particular, this may lead you to adding `sdk.dir` and `ndk.dir` properties, and/or
set environment variables `ANDROID_SDK_ROOT` and `ANDROID_HOME`.
set environment variable `ANDROID_HOME`.

In addition to those instructions, you will need:

Expand Down
6 changes: 6 additions & 0 deletions docs/howtos/locally-published-components-in-firefox-ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ for example, from the root of your application-services directory:
cp ./megazords/ios-rust/Sources/MozillaRustComponentsWrapper/Generated/*.swift ../firefox-ios/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/.
```

4. Remove the copied over `glean_sym.swift` file. This exists to make glean-sym work in Rust, but is not needed in linking. From the same directory:

```bash
rm ../firefox-ios/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/glean_sym.swift
```

@thesuzerain thesuzerain Jul 16, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added this step per recent discussion. We could also the cp and rm in one command with something like:

find /some/folder -maxdepth 1 -name '*.swift' ! -name 'glean_sym.swift' -exec cp {} /other/folder/ \; but I like the clarity of separating them. Let me know what you think, I'm not tied to it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, I like this way of presenting it better as well.

## Step 3 — Reset caches and build

In Xcode:
Expand Down