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