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 | 27 |
28 Creating a multilocale build | |
29 ---------------------------- | |
30 | |
31 ###Preparations | |
Felix Dahlke
2015/06/22 08:10:51
Nit: Space after ### as on http://daringfireball.n
René Jeschke
2015/06/22 10:24:48
Done.
| |
32 | |
33 1. Create a folder outside of the Adblock Browser repo, I call | |
Felix Dahlke
2015/06/22 08:10:51
Nit: s/I call it/e.g./
René Jeschke
2015/06/22 10:24:48
Done.
| |
34 it `abb-multi` | |
35 2. Change into `abb-multi` and clone mozharness via: | |
36 | |
37 hg clone http://hg.mozilla.org/build/mozharness | |
Felix Dahlke
2015/06/22 08:10:51
I presume this is always tied to the most recent F
René Jeschke
2015/06/22 10:24:47
We can clone everything, so, yes, we can file a fo
| |
38 | |
39 3. Symlink the adblockbrowser repo into `abb-multi`, e.g.: | |
40 | |
41 ln -s ../adblockbrowser adblockbrowser | |
42 | |
43 4. Copy your `mozconfig` from adblockbrowser to `abb-multi`, e.g.: | |
Felix Dahlke
2015/06/22 08:10:51
Nit: adblockbrowser also in backticks?
René Jeschke
2015/06/22 10:24:47
Done.
| |
44 | |
45 cp adblockbrowser/mozconfig ./mozconfig | |
Felix Dahlke
2015/06/22 08:10:51
Even though we call it `mozconfig`, the file is ac
René Jeschke
2015/06/22 10:24:48
We do not call this 'mozconfig', Mozilla calls thi
Felix Dahlke
2015/06/22 12:01:01
They're actually a bit inconsistent here, but I th
René Jeschke
2015/06/22 12:09:15
Still, I am using 'mozconfig' (from the start), it
Felix Dahlke
2015/06/22 18:18:27
`mozconfig` gets automatically used by the build s
| |
46 | |
47 5. Create a copy of the build configuration, by: | |
48 | |
49 cp mozharness/configs/multi_locale/standalone_mozilla-central.py abb-mul ti-cfg.py | |
Felix Dahlke
2015/06/22 08:10:52
mozilla-central? Isn't there something for mozilla
René Jeschke
2015/06/22 10:24:48
There is only one .py config gile in this folder,
| |
50 | |
51 ###Configuration | |
52 | |
53 * Change `BUILD_DIR = "mozilla-central"` to `BUILD_DIR = "adblockbrowser"` in | |
54 `L3` | |
Felix Dahlke
2015/06/22 08:10:51
Was wondering for a while what "L3" for a while, b
René Jeschke
2015/06/22 10:24:48
Done.
| |
55 * Make sure `OBJDIR = "objdir-droid"` in `L12` matches your build output | |
56 folder | |
57 * If your `mozconfig` is not called `mozconfig`, change `MOZCONFIG` in `L17` | |
58 * **Remove the repository pulling part** from the config, i.e. `L26` to `L30`. | |
Felix Dahlke
2015/06/22 08:10:52
After reading this far, I Think what we should act
René Jeschke
2015/06/22 10:24:48
Why do you want to fork a local build configuratio
Felix Dahlke
2015/06/22 12:01:01
Sorry, I meant mozharness. We're setting up a new
René Jeschke
2015/06/22 12:09:14
Yes, maybe we should do this, needs another follow
Felix Dahlke
2015/06/22 18:18:27
Seems like something we should figure out now to m
| |
59 The code to remove looks like this: | |
60 | |
61 26 "repos": [{ | |
62 27 "repo": "https://hg.mozilla.org/%s" % REPO_PATH, | |
63 28 "tag": "default", | |
64 29 "dest": BUILD_DIR, | |
65 30 }], | |
66 * You might want to remove the `"backup-objdir"` build step in `L45` if you do | |
67 not want your objdir to be backupped. Keep in mind that you then need to | |
68 clobber for a single-locale build. | |
69 | |
70 An example configuration could look like this: | |
71 | |
72 1 import os | |
73 2 # The name of the directory we'll pull our source into. | |
74 3 BUILD_DIR = "adblockbrowser" | |
75 4 # This is everything that comes after https://hg.mozilla.org/ | |
76 5 # e.g. "releases/mozilla-aurora" | |
77 6 REPO_PATH = "mozilla-central" | |
78 7 # This is where the l10n repos are (everything after https://hg.mozilla.o rg/) | |
79 8 # for mozilla-central, that's "l10n-central". | |
80 9 # For mozilla-aurora, that's "releases/l10n/mozilla-aurora" | |
81 10 L10N_REPO_PATH = "l10n-central" | |
82 11 # Currently this is assumed to be a subdirectory of your build dir | |
83 12 OBJDIR = "obj-android" | |
84 13 # Set this to mobile/xul for XUL Fennec | |
85 14 ANDROID_DIR = "mobile/android" | |
86 15 # Absolute path to your mozconfig. | |
87 16 # By default it looks at "./mozconfig" | |
88 17 MOZCONFIG = os.path.join(os.getcwd(), "mozconfig") | |
89 18 | |
90 19 config = { | |
91 20 "work_dir": ".", | |
92 21 "log_name": "multilocale", | |
93 22 "objdir": OBJDIR, | |
94 23 "locales_file": "%s/%s/locales/maemo-locales" % (BUILD_DIR, ANDROID_D IR), | |
95 24 "locales_dir": "%s/locales" % ANDROID_DIR, | |
96 25 "ignore_locales": ["en-US", "multi"], | |
97 26 "l10n_repos": [{ | |
98 27 "repo": "https://hg.mozilla.org/build/compare-locales", | |
99 28 "tag": "RELEASE_AUTOMATION" | |
100 29 }], | |
101 30 "hg_l10n_base": "https://hg.mozilla.org/%s" % L10N_REPO_PATH, | |
102 31 "hg_l10n_tag": "default", | |
103 32 "l10n_dir": "l10n", | |
104 33 "merge_locales": True, | |
105 34 "mozilla_dir": BUILD_DIR, | |
106 35 "mozconfig": MOZCONFIG, | |
107 36 "default_actions": [ | |
108 37 "pull-locale-source", | |
109 38 "build", | |
110 39 "package-en-US", | |
111 40 "restore-objdir", | |
112 41 "add-locales", | |
113 42 "package-multi", | |
114 43 "summary", | |
115 44 ], | |
116 45 } | |
117 | |
118 ###Building | |
119 | |
120 For performing the multilocale build, invoke | |
121 | |
122 ./mozharness/scripts/multil10n.py --cfg abb-multi-cfg.py | |
123 | |
124 from inside `abb-multi`. The resulting build is located in | |
125 `BUILD_DIR/OBJ_DIR/dist/` | |
126 | |
127 | |
28 [1]: https://wiki.mozilla.org/Mobile/Fennec/Android | 128 [1]: https://wiki.mozilla.org/Mobile/Fennec/Android |
OLD | NEW |