| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 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 target platforms and prerequisites | 18 ### Supported target platforms and prerequisites |
| 19 | 19 |
| 20 You need a C++11 compatible compiler to build libadblockplus. | 20 You need a C++11 compatible compiler to build libadblockplus. |
| 21 | 21 |
| 22 Win32: | 22 Win32: |
| 23 * Microsoft Visual Studio 2015 | 23 * At least v140 Visual C++ toolset (available in Microsoft Visual Studio 2015). |
|
Eric
2017/05/30 17:31:40
We need to say here that VS 2017 will not work. Or
sergei
2017/05/31 12:47:10
Should we say in addition that VS 2020 and 2030 wi
| |
| 24 | 24 |
| 25 Linux: | 25 Linux: |
| 26 * g++ 5.2 | 26 * g++ 5.2 |
| 27 | 27 |
| 28 Mac: | 28 Mac: |
| 29 * clang 3.6 for OS X | 29 * clang 3.6 for OS X/macOS (Xcode should be installed and its developer tools sh ould be "selected"). |
| 30 | 30 |
| 31 Android: | 31 Android: |
| 32 * The host system should be Linux or OS X | 32 * The host system should be Linux or OS X |
| 33 * android-ndk-r12b Here are the links for downloading | 33 * android-ndk-r12b Here are the links for downloading |
| 34 [OS X](https://dl.google.com/android/repository/android-ndk-r12b-darwin-x86_64 .zip), | 34 [OS X](https://dl.google.com/android/repository/android-ndk-r12b-darwin-x86_64 .zip), |
| 35 [Linux 64](https://dl.google.com/android/repository/android-ndk-r12b-linux-x86 _64.zip). | 35 [Linux 64](https://dl.google.com/android/repository/android-ndk-r12b-linux-x86 _64.zip). |
| 36 * g++ multilib | 36 * g++ multilib |
| 37 | 37 |
| 38 If you have a compilation issue with another compiler please [create an issue](h ttps://issues.adblockplus.org/). | 38 If you have a compilation issue with another compiler please [create an issue](h ttps://issues.adblockplus.org/). |
| 39 | 39 |
| 40 You also need Python 2.7 and ensure that `python.exe` is in your `PATH`. | |
| 41 | |
| 40 ### Unix | 42 ### Unix |
| 41 | 43 |
| 42 All you need is Python 2.7 and Make: | 44 Using Make: |
| 43 | 45 |
| 44 make | 46 make |
| 45 | 47 |
| 46 The default target architecture is the architecture of a host. In order to build for a different architecture pass `ARCH` to `make`, e.g. run: | 48 The default target architecture is the architecture of a host. In order to build for a different architecture pass `ARCH` to `make`, e.g. run: |
| 47 | 49 |
| 48 make ARCH=ia32 | 50 make ARCH=ia32 |
| 49 | 51 |
| 50 supported values are `ia32` and `x64`. | 52 supported values are `ia32` and `x64`. |
| 51 | 53 |
| 52 | 54 |
| 53 To build and run the tests: | 55 To build and run the tests: |
| 54 | 56 |
| 55 make test | 57 make test |
| 56 | 58 |
| 57 Likewise, use the following with `ARCH`: | 59 Likewise, use the following with `ARCH`: |
| 58 | 60 |
| 59 make test ARCH=ia32 | 61 make test ARCH=ia32 |
| 60 | 62 |
| 61 To run specific tests, you can specify a filter: | 63 To run specific tests, you can specify a filter: |
| 62 | 64 |
| 63 make test FILTER=*.Matches | 65 make test FILTER=*.Matches |
| 64 | 66 |
| 65 ### Windows | 67 ### Windows |
| 66 | |
| 67 You need Microsoft Visual C++ 2015 (Community Edition is sufficient) | |
|
Eric
2017/05/30 17:31:40
Again, this should say that the C++ version in VS
sergei
2017/05/31 12:47:10
I'm not sure about it, as far as I know it's possi
| |
| 68 and Python 2.7. Make sure that `python.exe` is on your `PATH`. | |
| 69 | 68 |
| 70 * Execute `createsolution.bat` to generate project files, this will create | 69 * Execute `createsolution.bat` to generate project files, this will create |
| 71 `build\ia32\libadblockplus.sln` (solution for the 32 bit build) and | 70 `build\ia32\libadblockplus.sln` (solution for the 32 bit build) and |
| 72 `build\x64\libadblockplus.sln` (solution for the 64 bit build). Unfortunately, | 71 `build\x64\libadblockplus.sln` (solution for the 64 bit build). Unfortunately, |
| 73 V8 doesn't support creating both from the same project files. | 72 V8 doesn't support creating both from the same project files. |
| 74 * Open `build\ia32\libadblockplus.sln` or `build\x64\libadblockplus.sln` in | 73 * Open `build\ia32\libadblockplus.sln` or `build\x64\libadblockplus.sln` in |
| 75 Visual Studio and build the solution there. Alternatively you can use the | 74 Visual Studio and build the solution there. Alternatively you can use the |
| 76 `msbuild` command line tool, e.g. run `msbuild /m build\ia32\libadblockplus.sln` | 75 `msbuild` command line tool, e.g. run `msbuild /m build\ia32\libadblockplus.sln` |
| 77 from the Visual Studio Developer Command Prompt to create a 32 bit debug build. | 76 from the Visual Studio Developer Command Prompt to create a 32 bit debug build. |
| 78 | 77 |
| 78 Tested on Microsoft Visual Studio 2015 Community Edition. | |
| 79 | |
| 79 ### Building for Android | 80 ### Building for Android |
| 80 | 81 |
| 81 First set ANDROID_NDK_ROOT environment variable to your Android NDK directory. | 82 First set ANDROID_NDK_ROOT environment variable to your Android NDK directory. |
| 82 | 83 |
| 83 To build for *x86* arch run: | 84 To build for *x86* arch run: |
| 84 | 85 |
| 85 make android_x86 | 86 make android_x86 |
| 86 | 87 |
| 87 To build for *arm* arch run: | 88 To build for *arm* arch run: |
| 88 | 89 |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 241 | 242 |
| 242 ### Unix | 243 ### Unix |
| 243 | 244 |
| 244 The shell is automatically built by `make`, you can run it as follows: | 245 The shell is automatically built by `make`, you can run it as follows: |
| 245 | 246 |
| 246 build/out/abpshell | 247 build/out/abpshell |
| 247 | 248 |
| 248 ### Windows | 249 ### Windows |
| 249 | 250 |
| 250 Just run the project *abpshell*. | 251 Just run the project *abpshell*. |
| LEFT | RIGHT |