OLD | NEW |
1 Adblock Browser | 1 Adblock Browser |
2 =============== | 2 =============== |
3 | 3 |
4 The Adblock Plus browser, based on Firefox for Android. | 4 The Adblock Plus browser, based on Firefox for Android. |
5 | 5 |
6 Building | 6 Building |
7 -------- | 7 -------- |
8 | 8 |
9 First ensure that all dependencies are up to date by calling: | 9 First ensure that all dependencies are up to date by calling: |
10 | 10 |
11 ./ensure_dependencies.py | 11 ./ensure_dependencies.py |
12 | 12 |
13 Then just follow Mozilla's [Building Fennec][1] guide. | 13 Then just follow Mozilla's [Building Fennec][1] guide. |
14 | 14 |
15 | 15 |
16 Important note | 16 Important note |
17 -------------- | 17 -------------- |
18 | 18 |
19 You must add the following line to your `mozconfig`: | 19 You must add the following line to your `mozconfig`: |
20 | 20 |
21 ac_add_options --disable-crashreporter | 21 ac_add_options --disable-crashreporter |
22 | 22 |
23 to disable the CrashReporter. | 23 to disable the CrashReporter. |
24 | 24 |
25 (Follow-up issue: https://issues.adblockplus.org/ticket/2490) | 25 (Follow-up issue: https://issues.adblockplus.org/ticket/2490) |
26 | 26 |
| 27 Creating a multilocale build |
| 28 ---------------------------- |
| 29 |
| 30 ### Preparations ### |
| 31 |
| 32 1. Create a folder outside of the Adblock Browser repo, e.g `abb-multi` |
| 33 2. Change into `abb-multi` and clone mozharness via: |
| 34 |
| 35 hg clone http://hg.mozilla.org/build/mozharness -r FENNEC_39_0_1_RELEASE |
| 36 |
| 37 3. Symlink the adblockbrowser repo into `abb-multi`, e.g.: |
| 38 |
| 39 ln -s ../adblockbrowser adblockbrowser |
| 40 |
| 41 4. Copy your `mozconfig` from `adblockbrowser` to `abb-multi`, e.g.: |
| 42 |
| 43 cp adblockbrowser/mozconfig ./mozconfig |
| 44 |
| 45 5. Create a copy of the build configuration, e.g.: |
| 46 |
| 47 cp mozharness/configs/multi_locale/standalone_mozilla-central.py abb-mul
ti-cfg.py |
| 48 |
| 49 ### Configuration ### |
| 50 |
| 51 Apply the following changes to `abb-multi-cfg.py`: |
| 52 |
| 53 * Change `BUILD_DIR = "mozilla-central"` to `BUILD_DIR = "adblockbrowser"` |
| 54 * Make sure `OBJDIR = "objdir-droid"` matches your build output |
| 55 folder |
| 56 * Change `L10N_REPO_PATH` to point to `releases/l10n/mozilla-release` |
| 57 * If your `mozconfig` is not called `mozconfig`, change `MOZCONFIG` |
| 58 * **Remove the repository pulling part** from `config`. |
| 59 The code to remove looks like this: |
| 60 |
| 61 "repos": [{ |
| 62 "repo": "https://hg.mozilla.org/%s" % REPO_PATH, |
| 63 "tag": "default", |
| 64 "dest": BUILD_DIR, |
| 65 }], |
| 66 * Change `"hg_l10n_tag"` in `config` from `default` to `FENNEC_39_0_1_RELEASE` |
| 67 * You might want to remove the `"backup-objdir"` build step if you do |
| 68 not want your objdir to be backed up. Keep in mind that you then need to |
| 69 clobber for a single-locale build. |
| 70 |
| 71 An example configuration could look like this: |
| 72 |
| 73 import os |
| 74 # The name of the directory we'll pull our source into. |
| 75 BUILD_DIR = "adblockbrowser" |
| 76 # This is everything that comes after https://hg.mozilla.org/ |
| 77 # e.g. "releases/mozilla-aurora" |
| 78 REPO_PATH = "mozilla-central" |
| 79 # This is where the l10n repos are (everything after https://hg.mozilla.org/
) |
| 80 # for mozilla-central, that's "l10n-central". |
| 81 # For mozilla-aurora, that's "releases/l10n/mozilla-aurora" |
| 82 L10N_REPO_PATH = "releases/l10n/mozilla-release" |
| 83 # Currently this is assumed to be a subdirectory of your build dir |
| 84 OBJDIR = "obj-android" |
| 85 # Set this to mobile/xul for XUL Fennec |
| 86 ANDROID_DIR = "mobile/android" |
| 87 # Absolute path to your mozconfig. |
| 88 # By default it looks at "./mozconfig" |
| 89 MOZCONFIG = os.path.join(os.getcwd(), "mozconfig") |
| 90 |
| 91 config = { |
| 92 "work_dir": ".", |
| 93 "log_name": "multilocale", |
| 94 "objdir": OBJDIR, |
| 95 "locales_file": "%s/%s/locales/maemo-locales" % (BUILD_DIR, ANDROID_DIR)
, |
| 96 "locales_dir": "%s/locales" % ANDROID_DIR, |
| 97 "ignore_locales": ["en-US", "multi"], |
| 98 "l10n_repos": [{ |
| 99 "repo": "https://hg.mozilla.org/build/compare-locales", |
| 100 "tag": "RELEASE_AUTOMATION" |
| 101 }], |
| 102 "hg_l10n_base": "https://hg.mozilla.org/%s" % L10N_REPO_PATH, |
| 103 "hg_l10n_tag": "default", |
| 104 "l10n_dir": "l10n", |
| 105 "merge_locales": True, |
| 106 "mozilla_dir": BUILD_DIR, |
| 107 "mozconfig": MOZCONFIG, |
| 108 "default_actions": [ |
| 109 "pull-locale-source", |
| 110 "build", |
| 111 "package-en-US", |
| 112 "restore-objdir", |
| 113 "add-locales", |
| 114 "package-multi", |
| 115 "summary", |
| 116 ], |
| 117 } |
| 118 |
| 119 ### Building ### |
| 120 |
| 121 For performing the multilocale build, invoke |
| 122 |
| 123 ./mozharness/scripts/multil10n.py --cfg abb-multi-cfg.py |
| 124 |
| 125 from inside `abb-multi`. The resulting build is located in |
| 126 `BUILD_DIR/OBJ_DIR/dist/` |
27 | 127 |
28 [1]: https://wiki.mozilla.org/Mobile/Fennec/Android | 128 [1]: https://wiki.mozilla.org/Mobile/Fennec/Android |
| 129 |
OLD | NEW |