| Index: README.md |
| diff --git a/README.md b/README.md |
| index 97d156ea41666f4cfd5162b9d6777f4e3990fa39..1f14b678f91c04c4af79cc139e2a00ca269d8a3e 100644 |
| --- a/README.md |
| +++ b/README.md |
| @@ -25,4 +25,102 @@ to disable the CrashReporter. |
| (Follow-up issue: https://issues.adblockplus.org/ticket/2490) |
| +Creating a multilocale build |
| +---------------------------- |
| + |
| +### Preparations |
| + |
| +1. Create a folder outside of the Adblock Browser repo, e.g `abb-multi` |
| +2. Change into `abb-multi` and clone mozharness via: |
| + |
| + hg clone http://hg.mozilla.org/build/mozharness |
| + |
| +3. Symlink the adblockbrowser repo into `abb-multi`, e.g.: |
| + |
| + ln -s ../adblockbrowser adblockbrowser |
| + |
| +4. Copy your `mozconfig` from `adblockbrowser` to `abb-multi`, e.g.: |
| + |
| + cp adblockbrowser/mozconfig ./mozconfig |
| + |
| +5. Create a copy of the build configuration, by: |
| + |
| + cp mozharness/configs/multi_locale/standalone_mozilla-central.py abb-multi-cfg.py |
| + |
| +###Configuration |
| + |
| +* Change `BUILD_DIR = "mozilla-central"` to `BUILD_DIR = "adblockbrowser"` |
| +* Make sure `OBJDIR = "objdir-droid"` matches your build output |
| + folder |
| +* If your `mozconfig` is not called `mozconfig`, change `MOZCONFIG` |
| +* **Remove the repository pulling part** from the config. |
| + The code to remove looks like this: |
| + |
| + 26 "repos": [{ |
| + 27 "repo": "https://hg.mozilla.org/%s" % REPO_PATH, |
| + 28 "tag": "default", |
| + 29 "dest": BUILD_DIR, |
| + 30 }], |
| +* You might want to remove the `"backup-objdir"` build step if you do |
| + not want your objdir to be backupped. Keep in mind that you then need to |
| + clobber for a single-locale build. |
| + |
| +An example configuration could look like this: |
| + |
| + 1 import os |
| + 2 # The name of the directory we'll pull our source into. |
| + 3 BUILD_DIR = "adblockbrowser" |
| + 4 # This is everything that comes after https://hg.mozilla.org/ |
| + 5 # e.g. "releases/mozilla-aurora" |
| + 6 REPO_PATH = "mozilla-central" |
| + 7 # This is where the l10n repos are (everything after https://hg.mozilla.org/) |
| + 8 # for mozilla-central, that's "l10n-central". |
| + 9 # For mozilla-aurora, that's "releases/l10n/mozilla-aurora" |
| + 10 L10N_REPO_PATH = "l10n-central" |
| + 11 # Currently this is assumed to be a subdirectory of your build dir |
| + 12 OBJDIR = "obj-android" |
| + 13 # Set this to mobile/xul for XUL Fennec |
| + 14 ANDROID_DIR = "mobile/android" |
| + 15 # Absolute path to your mozconfig. |
| + 16 # By default it looks at "./mozconfig" |
| + 17 MOZCONFIG = os.path.join(os.getcwd(), "mozconfig") |
| + 18 |
| + 19 config = { |
| + 20 "work_dir": ".", |
| + 21 "log_name": "multilocale", |
| + 22 "objdir": OBJDIR, |
| + 23 "locales_file": "%s/%s/locales/maemo-locales" % (BUILD_DIR, ANDROID_DIR), |
| + 24 "locales_dir": "%s/locales" % ANDROID_DIR, |
| + 25 "ignore_locales": ["en-US", "multi"], |
| + 26 "l10n_repos": [{ |
| + 27 "repo": "https://hg.mozilla.org/build/compare-locales", |
| + 28 "tag": "RELEASE_AUTOMATION" |
| + 29 }], |
| + 30 "hg_l10n_base": "https://hg.mozilla.org/%s" % L10N_REPO_PATH, |
| + 31 "hg_l10n_tag": "default", |
| + 32 "l10n_dir": "l10n", |
| + 33 "merge_locales": True, |
| + 34 "mozilla_dir": BUILD_DIR, |
| + 35 "mozconfig": MOZCONFIG, |
| + 36 "default_actions": [ |
| + 37 "pull-locale-source", |
| + 38 "build", |
| + 39 "package-en-US", |
| + 40 "restore-objdir", |
| + 41 "add-locales", |
| + 42 "package-multi", |
| + 43 "summary", |
| + 44 ], |
| + 45 } |
| + |
| +###Building |
| + |
| +For performing the multilocale build, invoke |
| + |
| + ./mozharness/scripts/multil10n.py --cfg abb-multi-cfg.py |
| + |
| +from inside `abb-multi`. The resulting build is located in |
| +`BUILD_DIR/OBJ_DIR/dist/` |
| + |
| + |
| [1]: https://wiki.mozilla.org/Mobile/Fennec/Android |