Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: README.md

Issue 29322413: Issue 2750 - [Support other languages] Apply Firefox's translations (Closed)
Patch Set: Created July 15, 2015, 1:49 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | mobile/android/base/locales/Makefile.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: README.md
diff --git a/README.md b/README.md
index 97d156ea41666f4cfd5162b9d6777f4e3990fa39..dd75a74a29e5d0d10788c82f6d19d6b3ed9261e7 100644
--- a/README.md
+++ b/README.md
@@ -24,5 +24,104 @@ 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
Felix Dahlke 2015/07/26 06:56:51 What if mozharness and our repository gets out of
+
+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:
Felix Dahlke 2015/07/26 06:56:51 Language nit: "by" doesn't make sense here IMO, we
René Jeschke 2015/07/27 10:05:42 Done.
+
+ cp mozharness/configs/multi_locale/standalone_mozilla-central.py abb-multi-cfg.py
+
+### Configuration ###
+
+* Change `BUILD_DIR = "mozilla-central"` to `BUILD_DIR = "adblockbrowser"`
Felix Dahlke 2015/07/26 06:56:52 Not really obvious to me that abb-multi-cfg.py nee
René Jeschke 2015/07/27 10:05:42 Done.
+* Make sure `OBJDIR = "objdir-droid"` matches your build output
+ folder
+* Change `L10N_REPO_PATH` to point to `releases/l10n/mozilla-release`
+* 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": [{
Felix Dahlke 2015/07/26 06:56:52 Since we're not pulling a specific revision of moz
René Jeschke 2015/07/27 10:05:43 Na, look at line 57, there it reads "The code to r
+ 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
Felix Dahlke 2015/07/26 06:56:52 Language nit: s/backupped/backed up/
René Jeschke 2015/07/27 10:05:42 Done.
+ clobber for a single-locale build.
+
+An example configuration could look like this:
+
+ 1 import os
Felix Dahlke 2015/07/26 06:56:52 I'd also vote for removing line numbers here - the
René Jeschke 2015/07/27 10:05:42 Done.
+ 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"
Felix Dahlke 2015/07/26 06:56:52 Shouldn't we actually use mozilla-release here? ad
René Jeschke 2015/07/27 10:05:42 This line is irrelevant, as we removed this step f
Felix Dahlke 2015/07/29 20:10:21 OK I see. Non-obvious, but I guess it's fine for n
+ 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 = "releases/l10n/mozilla-release"
+ 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
+
Felix Dahlke 2015/07/26 06:56:52 Nit: There's already a new line at EOF, so why add
« no previous file with comments | « no previous file | mobile/android/base/locales/Makefile.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld