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 |
11 them by running the following: | 11 them by running the following: |
12 | 12 |
13 ./ensure_dependencies.py | 13 ./ensure_dependencies.py |
14 | 14 |
15 Building | 15 Building |
16 -------- | 16 -------- |
17 | 17 |
| 18 ### Supported compilers |
| 19 |
| 20 You need a C++11 compatible compiler to build libadblockplus. |
| 21 |
| 22 The compilation was tested with the following compilers: |
| 23 * g++ 4.8 |
| 24 * Microsoft Visual Studio 2010, 2012 |
| 25 * clang 3.4 for Android (from android-ndk-r9, android-ndk-r10c) |
| 26 * clang 3.6 for OS X |
| 27 * To compile for Android on linux one need to install g++-multilib |
| 28 |
| 29 You can download *android-ndk-r10c* for [Win 32](http://dl.google.com/android/nd
k/android-ndk-r10c-windows-x86.exe), [Win 64](http://dl.google.com/android/ndk/a
ndroid-ndk-r10c-windows-x86_64.exe), [OSX](http://dl.google.com/android/ndk/andr
oid-ndk-r10c-darwin-x86_64.bin), [Linux 32](http://dl.google.com/android/ndk/and
roid-ndk-r10c-linux-x86.bin), [Linux 64](http://dl.google.com/android/ndk/androi
d-ndk-r10c-linux-x86_64.bin). |
| 30 |
| 31 If you have a compilation issue with another compiler please [create an issue](h
ttps://issues.adblockplus.org/). |
| 32 |
18 ### Unix | 33 ### Unix |
19 | 34 |
20 All you need is Python 2.7 and Make: | 35 All you need is Python 2.7 and Make: |
21 | 36 |
22 make | 37 make |
23 | 38 |
24 The default target architecture is x64. On a 32 bit system, run: | 39 The default target architecture is x64. On a 32 bit system, run: |
25 | 40 |
26 make ARCH=ia32 | 41 make ARCH=ia32 |
27 | 42 |
(...skipping 16 matching lines...) Expand all Loading... |
44 | 59 |
45 * Execute `createsolution.bat` to generate project files, this will create | 60 * Execute `createsolution.bat` to generate project files, this will create |
46 `build\ia32\libadblockplus.sln` (solution for the 32 bit build) and | 61 `build\ia32\libadblockplus.sln` (solution for the 32 bit build) and |
47 `build\x64\libadblockplus.sln` (solution for the 64 bit build). Unfortunately, | 62 `build\x64\libadblockplus.sln` (solution for the 64 bit build). Unfortunately, |
48 V8 doesn't support creating both from the same project files. | 63 V8 doesn't support creating both from the same project files. |
49 * Open `build\ia32\libadblockplus.sln` or `build\x64\libadblockplus.sln` in | 64 * Open `build\ia32\libadblockplus.sln` or `build\x64\libadblockplus.sln` in |
50 Visual Studio and build the solution there. Alternatively you can use the | 65 Visual Studio and build the solution there. Alternatively you can use the |
51 `msbuild` command line tool, e.g. run `msbuild /m build\ia32\libadblockplus.sln` | 66 `msbuild` command line tool, e.g. run `msbuild /m build\ia32\libadblockplus.sln` |
52 from the Visual Studio Developer Command Prompt to create a 32 bit debug build. | 67 from the Visual Studio Developer Command Prompt to create a 32 bit debug build. |
53 | 68 |
54 ### Supported compilers | 69 ### Building for Android |
55 | 70 |
56 You need a C++11 compatible compiler to build libadblockplus. | 71 First set ANDROID_NDK_ROOT environment variable to your Android NDK directory. |
57 | 72 |
58 The compilation was tested with the following compilers: | 73 To build for *x86* arch run: |
59 * g++ 4.8 | |
60 * Microsoft Visual Studio 2010, 2012 | |
61 * clang 3.4 for Android (from android-ndk-r9) | |
62 * clang 3.6 for OS X | |
63 | 74 |
64 If you have a question about another compiler please [create an issue](https://i
ssues.adblockplus.org/). | 75 make android_x86 |
| 76 |
| 77 To build for *arm* arch run: |
| 78 |
| 79 make android_arm |
65 | 80 |
66 Usage | 81 Usage |
67 ----- | 82 ----- |
68 | 83 |
69 You can use libadblockplus to build an ad blocker. Or, strictly speaking, a web | 84 You can use libadblockplus to build an ad blocker. Or, strictly speaking, a web |
70 content filter. Just like Adblock Plus, it can detect resources that should be | 85 content filter. Just like Adblock Plus, it can detect resources that should be |
71 blocked based on their URL and context information, and generate CSS selectors | 86 blocked based on their URL and context information, and generate CSS selectors |
72 to hide DOM elements. | 87 to hide DOM elements. |
73 | 88 |
74 The basic usage is explained below, see the | 89 The basic usage is explained below, see the |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 | 224 |
210 ### Unix | 225 ### Unix |
211 | 226 |
212 The shell is automatically built by `make`, you can run it as follows: | 227 The shell is automatically built by `make`, you can run it as follows: |
213 | 228 |
214 build/out/abpshell | 229 build/out/abpshell |
215 | 230 |
216 ### Windows | 231 ### Windows |
217 | 232 |
218 Just run the project *abpshell*. | 233 Just run the project *abpshell*. |
OLD | NEW |