... | ... | @@ -43,20 +43,23 @@ For Linux: |
|
|
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
|
|
|
export ANDROID_HOME=$HOME/.mozbuild/android-sdk-linux/ # or $HOME/Android/Sdk/ # Or .../android-toolchain/android-sdk-linux if you extract android-toolchain from tor-browser-build
|
|
|
export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/26.2.11394342/ # for 128esr
|
|
|
export GRADLE_HOME=/FULL/PATH/TO/tor-browser-build/out/gradle/gradle-9 # Or the version that we currently use
|
|
|
export GRADLE_HOME=/FULL/PATH/TO/tor-browser-build/out/gradle/gradle-8.8 # Or the version that we currently use
|
|
|
export LOCAL_DEV_BUILD=1
|
|
|
export PATH=/FULL/PATH/TO/tor-browser-build/out/clang/clang-16.x.y-arm/bin/:$PATH # prepend our newly built and assembled clang to the path so it gets used to build geckoview
|
|
|
```
|
|
|
|
|
|
For Mac: (default is arm64, note the different paths for x86_64). Make sure to download the appropriate NDK's via Android Studio's SDK manager (you can select the specific version by checking the box in the bottom right that says "Show Package Details") ![Screenshot_2024-07-24_at_16.33.03](uploads/c51439725f57eee81cb49165e76ee802/Screenshot_2024-07-24_at_16.33.03.png)
|
|
|
For Mac: (default is arm64, note the different paths for x86_64). Make sure to download the appropriate NDK's via Android Studio's SDK manager (you can select the specific version by checking the box in the bottom right that says "Show Package Details")
|
|
|
|
|
|
![Screenshot 2024-08-08 at 16.40.53.png](uploads/3f4559656592bd601ad5ae4e6bb9e64d/Screenshot_2024-08-08_at_16.40.53.png){width=990 height=721}
|
|
|
|
|
|
```
|
|
|
export JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home/ # for arm64. Or JAVA_HOME=/usr/local/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home/ for x86_64.
|
|
|
export ANDROID_HOME=$HOME/Library/Android/sdk # or $HOME/.mozbuild/android-sdk-macosx/
|
|
|
export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/26.2.11394342 # will need to download NDK 26.2.11394342 via android studio
|
|
|
export GRADLE_HOME=/opt/homebrew/Cellar/gradle/8.9 # for arm64 or /usr/local/Cellar/gradle/8.9 for x86_64. Make sure the version is up to date
|
|
|
export LOCAL_DEV_BUILD=1
|
|
|
export PATH=$ANDROID_HOME/ndk/27.0.11902837/toolchains/llvm/prebuilt/darwin-x86_64/bin/:$PATH # prepend android studios latest ndk to the path so it's clang gets used to build geckoview
|
|
|
export MOZ_BUILD_DATE=20230710165010
|
|
|
export JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home/ # for arm64. Or JAVA_HOME=/usr/local/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home/ for x86_64
|
|
|
export ANDROID_HOME=$HOME/Library/Android/sdk # or $HOME/.mozbuild/android-sdk-macosx/
|
|
|
export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/26.2.11394342 # will need to download NDK 26.2.11394342 via android studio
|
|
|
export GRADLE_HOME=/opt/homebrew/Cellar/gradle/8.9 # for arm64 or /usr/local/Cellar/gradle/8.9 for x86_64
|
|
|
export LOCAL_DEV_BUILD=1
|
|
|
export PATH=$ANDROID_HOME/ndk/27.0.12077973/toolchains/llvm/prebuilt/darwin-x86_64/bin/:$PATH # prepend android studios latest ndk to the path so it's clang gets used to build geckoview
|
|
|
```
|
|
|
|
|
|
Make sure that the variables defined are all valid for your setup, and that PATH is now using our newly built clang.
|
... | ... | @@ -66,7 +69,7 @@ Make sure that the variables defined are all valid for your setup, and that PATH |
|
|
|
|
|
You may want to run \`./mach bootstrap\` the first time to get some deps
|
|
|
</summary>
|
|
|
Select "3", installing deps as recommended. This will also populate some ~/.mozbuild files and downloads. DO NOT let it setup your git, it can just as easily accidentally break it, so select 'n'. Likewise it's probably best to select 'n' when asked about submitting code to Mozilla. We currently maintain our own configs so also select 'n' for overwriting mozconfigs.
|
|
|
Select "3", installing deps as recommended. This will also populate some \~/.mozbuild files and downloads. DO NOT let it setup your git, it can just as easily accidentally break it, so select 'n'. Likewise it's probably best to select 'n' when asked about submitting code to Mozilla. We currently maintain our own configs so also select 'n' for overwriting mozconfigs.
|
|
|
</details>
|
|
|
|
|
|
To build:
|
... | ... | @@ -167,7 +170,7 @@ sdk.dir=/home/YOU/Android/Sdk |
|
|
dependencySubstitutions.geckoviewTopobjdir=/FULL/PATH/TO/tor-browser/obj-arm-unknown-linux-androideabi
|
|
|
dependencySubstitutions.geckoviewTopsrcdir=/FULL/PATH/TO/tor-browser
|
|
|
autoPublish.android-components.dir=../android-components
|
|
|
org.gradle.java.home=/usr/lib/jvm/java-17-openjdk-amd64/
|
|
|
org.gradle.java.home=/usr/lib/jvm/java-17-openjdk-amd64/ # Your java home
|
|
|
```
|
|
|
|
|
|
#### Generating non dev builds (nightly, beta(alpha), release)
|
... | ... | @@ -197,7 +200,9 @@ export Variant=Beta && export variant=beta ./gradlew clean --no-daemon -Dorg.gra |
|
|
An example section for `~/.zshrc` to get it to run
|
|
|
|
|
|
```
|
|
|
export JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home/ # or your equilivent export ANDROID_HOME=<span dir="">HOME/Library/Android/sdk export PATH=</span>PATH:<span dir="">ANDROID_HOME/platform-tools/ export PATH=</span>PATH:$ANDROID_HOME/build-tools/34.0.0/
|
|
|
export JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home/ # or your equilivent
|
|
|
export ANDROID_HOME=$HOME/Library/Android/sdk
|
|
|
export PATH=$PATH:$ANDROID_HOME/platform-tools/ export PATH=</span>PATH:$ANDROID_HOME/build-tools/34.0.0/
|
|
|
```
|
|
|
|
|
|
The last line assumes "Android SDK Build-Tools 34" is installed ![Screenshot_2023-11-09_at_15.18.22](uploads/759156213ed8d7ef392845d4aa88fb7d/Screenshot_2023-11-09_at_15.18.22.png) |
|
|
\ No newline at end of file |