Left: | ||
Right: |
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 | |
Felix Dahlke
2015/07/26 06:56:51
What if mozharness and our repository gets out of
| |
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, 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.
| |
46 | |
47 cp mozharness/configs/multi_locale/standalone_mozilla-central.py abb-mul ti-cfg.py | |
48 | |
49 ### Configuration ### | |
50 | |
51 * 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.
| |
52 * Make sure `OBJDIR = "objdir-droid"` matches your build output | |
53 folder | |
54 * Change `L10N_REPO_PATH` to point to `releases/l10n/mozilla-release` | |
55 * If your `mozconfig` is not called `mozconfig`, change `MOZCONFIG` | |
56 * **Remove the repository pulling part** from the config. | |
57 The code to remove looks like this: | |
58 | |
59 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
| |
60 27 "repo": "https://hg.mozilla.org/%s" % REPO_PATH, | |
61 28 "tag": "default", | |
62 29 "dest": BUILD_DIR, | |
63 30 }], | |
64 * You might want to remove the `"backup-objdir"` build step if you do | |
65 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.
| |
66 clobber for a single-locale build. | |
67 | |
68 An example configuration could look like this: | |
69 | |
70 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.
| |
71 2 # The name of the directory we'll pull our source into. | |
72 3 BUILD_DIR = "adblockbrowser" | |
73 4 # This is everything that comes after https://hg.mozilla.org/ | |
74 5 # e.g. "releases/mozilla-aurora" | |
75 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
| |
76 7 # This is where the l10n repos are (everything after https://hg.mozilla.o rg/) | |
77 8 # for mozilla-central, that's "l10n-central". | |
78 9 # For mozilla-aurora, that's "releases/l10n/mozilla-aurora" | |
79 10 L10N_REPO_PATH = "releases/l10n/mozilla-release" | |
80 11 # Currently this is assumed to be a subdirectory of your build dir | |
81 12 OBJDIR = "obj-android" | |
82 13 # Set this to mobile/xul for XUL Fennec | |
83 14 ANDROID_DIR = "mobile/android" | |
84 15 # Absolute path to your mozconfig. | |
85 16 # By default it looks at "./mozconfig" | |
86 17 MOZCONFIG = os.path.join(os.getcwd(), "mozconfig") | |
87 18 | |
88 19 config = { | |
89 20 "work_dir": ".", | |
90 21 "log_name": "multilocale", | |
91 22 "objdir": OBJDIR, | |
92 23 "locales_file": "%s/%s/locales/maemo-locales" % (BUILD_DIR, ANDROID_D IR), | |
93 24 "locales_dir": "%s/locales" % ANDROID_DIR, | |
94 25 "ignore_locales": ["en-US", "multi"], | |
95 26 "l10n_repos": [{ | |
96 27 "repo": "https://hg.mozilla.org/build/compare-locales", | |
97 28 "tag": "RELEASE_AUTOMATION" | |
98 29 }], | |
99 30 "hg_l10n_base": "https://hg.mozilla.org/%s" % L10N_REPO_PATH, | |
100 31 "hg_l10n_tag": "default", | |
101 32 "l10n_dir": "l10n", | |
102 33 "merge_locales": True, | |
103 34 "mozilla_dir": BUILD_DIR, | |
104 35 "mozconfig": MOZCONFIG, | |
105 36 "default_actions": [ | |
106 37 "pull-locale-source", | |
107 38 "build", | |
108 39 "package-en-US", | |
109 40 "restore-objdir", | |
110 41 "add-locales", | |
111 42 "package-multi", | |
112 43 "summary", | |
113 44 ], | |
114 45 } | |
115 | |
116 ### Building ### | |
117 | |
118 For performing the multilocale build, invoke | |
119 | |
120 ./mozharness/scripts/multil10n.py --cfg abb-multi-cfg.py | |
121 | |
122 from inside `abb-multi`. The resulting build is located in | |
123 `BUILD_DIR/OBJ_DIR/dist/` | |
124 | |
27 | 125 |
28 [1]: https://wiki.mozilla.org/Mobile/Fennec/Android | 126 [1]: https://wiki.mozilla.org/Mobile/Fennec/Android |
127 | |
Felix Dahlke
2015/07/26 06:56:52
Nit: There's already a new line at EOF, so why add
| |
OLD | NEW |