OLD | NEW |
1 libadblockplus | 1 libadblockplus |
2 ============== | 2 ============== |
3 | 3 |
4 A C++ library offering the core functionality of Adblock Plus. | 4 A C++ library offering the core functionality of Adblock Plus. |
5 | 5 |
6 Getting/updating the dependencies | 6 Getting/updating the dependencies |
7 --------------------------------- | 7 --------------------------------- |
8 | 8 |
9 libadblockplus has dependencies that aren't part of this repository. They are | 9 libadblockplus has dependencies that aren't part of this repository. They are |
10 retrieved and updated during the build process, but you can also manually update | 10 retrieved and updated during the build process, but you can also manually update |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 LIBV8_INCLUDE_DIR should point to the include directory of V8, e.g. | 66 LIBV8_INCLUDE_DIR should point to the include directory of V8, e.g. |
67 `.../v8/include` and there should be `libv8_monolith.a` in the directory | 67 `.../v8/include` and there should be `libv8_monolith.a` in the directory |
68 LIBV8_LIB_DIR. | 68 LIBV8_LIB_DIR. |
69 | 69 |
70 To build: | 70 To build: |
71 | 71 |
72 Using Make: | 72 Using Make: |
73 | 73 |
74 make | 74 make |
75 | 75 |
76 The default target architecture is the architecture of a host. In order to build
for a different architecture pass `TARGET_ARCH` to `make`, e.g. run: | 76 The default target architecture is the architecture of a host. In order to build
for a different architecture pass `ABP_TARGET_ARCH` to `make`, e.g. run: |
77 | 77 |
78 make TARGET_ARCH=ia32 | 78 make ABP_TARGET_ARCH=ia32 |
79 | 79 |
80 supported values are `ia32` and `x64`. | 80 supported values are `ia32` and `x64`. |
81 | 81 |
82 To build and run the tests: | 82 To build and run the tests: |
83 | 83 |
84 make test | 84 make test |
85 | 85 |
86 Likewise, use the following with `TARGET_ARCH`: | 86 Likewise, use the following with `ABP_TARGET_ARCH`: |
87 | 87 |
88 make test TARGET_ARCH=ia32 | 88 make test ABP_TARGET_ARCH=ia32 |
89 | 89 |
90 To run specific tests, you can specify a filter: | 90 To run specific tests, you can specify a filter: |
91 | 91 |
92 make test FILTER=*.Matches | 92 make test FILTER=*.Matches |
93 | 93 |
94 ### Windows | 94 ### Windows |
95 | 95 |
96 * Prepare V8. Let's say V8 is prepared in `build/v8`. There should be V8 | 96 * Prepare V8. Let's say V8 is prepared in `build/v8`. There should be V8 |
97 headers in `build/v8/include` and binaries in | 97 headers in `build/v8/include` and binaries in |
98 `build/v8/win-%PLATFORM%.%CONFIGURATION%`, e.g ensure that there is | 98 `build/v8/win-%PLATFORM%.%CONFIGURATION%`, e.g ensure that there is |
(...skipping 14 matching lines...) Expand all Loading... |
113 | 113 |
114 For more details see CI configuration for appveyor. | 114 For more details see CI configuration for appveyor. |
115 | 115 |
116 ### Building for Android | 116 ### Building for Android |
117 | 117 |
118 Configure V8 as for Unix and set ANDROID_NDK_ROOT environment variable to your | 118 Configure V8 as for Unix and set ANDROID_NDK_ROOT environment variable to your |
119 Android NDK directory. | 119 Android NDK directory. |
120 | 120 |
121 To build for *x86* arch run: | 121 To build for *x86* arch run: |
122 | 122 |
123 make TARGET_OS=android TARGET_ARCH=ia32 | 123 make TARGET_OS=android ABP_TARGET_ARCH=ia32 |
124 | 124 |
125 To build for *arm* or *arm64* arch run: | 125 To build for *arm* or *arm64* arch run: |
126 | 126 |
127 make TARGET_OS=android TARGET_ARCH=arm | 127 make TARGET_OS=android ABP_TARGET_ARCH=arm |
128 | 128 |
129 or | 129 or |
130 make TARGET_OS=android TARGET_ARCH=arm64 | 130 make TARGET_OS=android ABP_TARGET_ARCH=arm64 |
131 | 131 |
132 Usage | 132 Usage |
133 ----- | 133 ----- |
134 | 134 |
135 You can use libadblockplus to build an ad blocker. Or, strictly speaking, a web | 135 You can use libadblockplus to build an ad blocker. Or, strictly speaking, a web |
136 content filter. Just like Adblock Plus, it can detect resources that should be | 136 content filter. Just like Adblock Plus, it can detect resources that should be |
137 blocked based on their URL and context information, and generate CSS selectors | 137 blocked based on their URL and context information, and generate CSS selectors |
138 to hide DOM elements. | 138 to hide DOM elements. |
139 | 139 |
140 The basic usage is explained below, see the | 140 The basic usage is explained below, see the |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 Linting | 298 Linting |
299 ------- | 299 ------- |
300 | 300 |
301 You can lint the code using [ESLint](http://eslint.org). | 301 You can lint the code using [ESLint](http://eslint.org). |
302 | 302 |
303 npm run eslint | 303 npm run eslint |
304 | 304 |
305 In order to set up ESLint and | 305 In order to set up ESLint and |
306 [configuration eslint-config-eyeo](https://hg.adblockplus.org/codingtools/file/t
ip/eslint-config-eyeo) you need [Node.js 7 or higher](https://nodejs.org/) and o
nce it is installed please run `npm install` in the repository directory. | 306 [configuration eslint-config-eyeo](https://hg.adblockplus.org/codingtools/file/t
ip/eslint-config-eyeo) you need [Node.js 7 or higher](https://nodejs.org/) and o
nce it is installed please run `npm install` in the repository directory. |
307 | 307 |
OLD | NEW |