Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 Adblock Plus for Chrome, Opera and Safari | 1 Adblock Plus for Chrome, Opera and Safari |
2 ========================================= | 2 ========================================= |
3 | |
4 This repository contains the platform-specific Adblock Plus source code for | |
5 Chrome, Opera and Safari. It can be used to build Adblock Plus for these | |
6 platforms, generic Adblock Plus code will be extracted from other repositories | |
7 automatically (see _dependencies_ file). | |
3 | 8 |
kzar
2015/02/17 09:38:05
I think usually a brief introduction at the start
| |
4 Building | 9 Building |
5 --------- | 10 --------- |
6 | 11 |
7 ### Requirements | 12 ### Requirements |
8 | 13 |
9 - [Python 2.x](https://www.python.org) | 14 - [Python 2.x](https://www.python.org) |
10 - [The Jinja2 module](http://jinja.pocoo.org/docs) | 15 - [The Jinja2 module](http://jinja.pocoo.org/docs) |
Sebastian Noack
2015/02/17 12:07:56
PIL (Python Imaging Library) is required as well.
| |
16 - [The PIL module](http://www.pythonware.com/products/pil/) | |
11 - For signed Chrome and Opera builds: [M2Crypto module](https://github.com/marti npaljak/M2Crypto) | 17 - For signed Chrome and Opera builds: [M2Crypto module](https://github.com/marti npaljak/M2Crypto) |
12 - For signed Safari builds: A [patched version of the xar command line tool](htt ps://github.com/mackyle/xar/) | 18 - For signed Safari builds: A [patched version of the xar command line tool](htt ps://github.com/mackyle/xar/) |
13 | 19 |
14 ### Building the extension | 20 ### Building the extension |
15 | 21 |
16 Run one of the following commands in the project directory, depending on your | 22 Run one of the following commands in the project directory, depending on your |
17 target platform: | 23 target platform: |
18 | 24 |
19 ./build.py -t chrome build -k adblockpluschrome.pem | 25 ./build.py -t chrome build -k adblockpluschrome.pem |
20 ./build.py -t opera build -k adblockplusopera.pem | 26 ./build.py -t opera build -k adblockplusopera.pem |
21 ./build.py -t safari build -k adblockplussafari.pem | 27 ./build.py -t safari build -k adblockplussafari.pem |
22 | 28 |
23 This will create a build with a name in the form | 29 This will create a build with a name in the form |
kzar
2015/02/17 09:38:05
Maybe mention something about how ensure_dependenc
Wladimir Palant
2015/02/17 13:19:21
I don't really want to document internals of build
| |
24 _adblockpluschrome-1.2.3.nnnn.crx_ or _adblockplussafari-1.2.3.nnnn.safariextz_. | 30 _adblockpluschrome-1.2.3.nnnn.crx_ or _adblockplussafari-1.2.3.nnnn.safariextz_. |
25 Note that you don't need an existing signing key for Chrome or Opera, a new key | 31 Note that you don't need an existing signing key for Chrome or Opera, a new key |
26 will be created automatically if the file doesn't exist. Safari on the other | 32 will be created automatically if the file doesn't exist. Safari on the other |
27 hand always requires a valid developer certificate, you need to get one in the | 33 hand always requires a valid developer certificate, you need to get one in the |
28 Apple Developer Center first. _adblockplussafari.pem_ should contain your | 34 Apple Developer Center first. _adblockplussafari.pem_ should contain the private |
Sebastian Noack
2015/02/17 12:07:56
adblockplussafari.pem must also contain the key fo
| |
29 developer certificate as well as all the certificates it was signed with | 35 key for your developer certificate, the developer certificate itself as well as |
30 (Apple's root certificate and intermediate certificates) in PEM format. | 36 all the certificates it was signed with (Apple's root certificate and |
37 intermediate certificates) in PEM format - in that order. | |
31 | 38 |
32 ### Development environment | 39 ### Development environment |
kzar
2015/02/17 09:38:05
Maybe the development environment section should b
Wladimir Palant
2015/02/17 13:19:21
Most people seem to start by generating an install
| |
33 | 40 |
34 To simplify the process of testing your changes you can create an unpacked | 41 To simplify the process of testing your changes you can create an unpacked |
35 development environment. For that run one of the following commands: | 42 development environment. For that run one of the following commands: |
36 | 43 |
37 ./build.py -t chrome devenv | 44 ./build.py -t chrome devenv |
38 ./build.py -t opera devenv | 45 ./build.py -t opera devenv |
39 ./build.py -t safari devenv | 46 ./build.py -t safari devenv |
40 | 47 |
41 This will create a _devenv_ directoy in the repository. In Chrome and Opera you | 48 This will create a _devenv_ directory in the repository. In Chrome and Opera you |
kzar
2015/02/17 09:38:05
I would use backticks ` instead of underscores _ f
Wladimir Palant
2015/02/17 13:19:21
Blame fhd - he started doing that (probably becaus
| |
42 should load it as an unpacked extension directory. After making changes to the | 49 should load it as an unpacked extension directory. After making changes to the |
43 source code re-run the command to update the development environment, the | 50 source code re-run the command to update the development environment, the |
44 extension should reload automatically after a few seconds. | 51 extension should reload automatically after a few seconds. |
45 | 52 |
46 In Safari you should load _devenv/adblockplussafari.safariextension_ as unpacked | 53 In Safari you should load _devenv/adblockplussafari.safariextension_ as unpacked |
47 extension directory. After making changes to the source code re-run the command | 54 extension directory. After making changes to the source code re-run the command |
48 to update the development environment. You will still need to reload the | 55 to update the development environment. You will still need to reload the |
49 extension explicitly in the Extension Builder, Safari currently doesn't allow | 56 extension explicitly in the Extension Builder, Safari currently doesn't allow |
50 automating this action. | 57 automating this action. |
51 | 58 |
52 Running the unit tests | 59 Running the unit tests |
53 ---------------------- | 60 ---------------------- |
54 | 61 |
55 To verify your changes you can use the unit test suite located in the _qunit_ | 62 To verify your changes you can use the unit test suite located in the _qunit_ |
56 directory of the repository. In order to run the unit tests go to the | 63 directory of the repository. In order to run the unit tests go to the |
57 extension's Options page, open JavaScript Console and type in: | 64 extension's Options page, open the JavaScript Console and type in: |
Sebastian Noack
2015/02/17 12:07:56
Nit: open the JavaScript Console
^
| |
58 | 65 |
59 location.href = "qunit/index.html"; | 66 location.href = "qunit/index.html"; |
60 | 67 |
61 The unit test will run automatically once the page loads. | 68 The unit tests will run automatically once the page loads. |
Wladimir Palant
2015/02/16 10:52:34
Should be "unit tests" here of course.
kzar
2015/02/17 09:38:05
Maybe add details of the code license(s) to the en
Wladimir Palant
2015/02/17 13:19:21
This doesn't belong in the README file, it should
| |
LEFT | RIGHT |