Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: README.md

Issue 29537638: Issue 6226 - Use mesonbuild as a build system (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Cross compiling for Android on macOS works. Created April 3, 2018, 2:53 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « .travis.yml ('k') | cross-bootstrap.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 * At least v140 Visual C++ toolset (available in Microsoft Visual Studio 2015). 23 * At least v140 Visual C++ toolset (available in Microsoft Visual Studio 2015).
24 24
25 Linux: 25 Linux:
26 * g++ 5.2 26 * g++ 5.2
27 If building using meson:
28 * meson 0.40.0
27 29
28 Mac: 30 Mac:
29 * clang 3.6 for OS X/macOS (Xcode should be installed and its developer tools sh ould be "selected"). 31 * clang 3.6 for OS X/macOS (Xcode should be installed and its developer tools sh ould be "selected").
30 32
31 Android: 33 Android:
32 * The host system should be Linux or OS X 34 * The host system should be Linux or OS X
33 * android-ndk-r12b Here are the links for downloading 35 * 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), 36 [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). 37 [Linux 64](https://dl.google.com/android/repository/android-ndk-r12b-linux-x86 _64.zip).
36 * g++ multilib 38 * g++ multilib
37 39
38 If you have a compilation issue with another compiler please [create an issue](h ttps://issues.adblockplus.org/). 40 If you have a compilation issue with another compiler please [create an issue](h ttps://issues.adblockplus.org/).
39 41
40 You also need Python 2.7 and ensure that `python.exe` is in your `PATH`. 42 You also need Python 2.7 and ensure that `python.exe` is in your `PATH`.
41 43
42 ### Unix 44 ### Unix
43 45
44 Using Make: 46 You can use either `meson` or `make`.
47
48 #### Using Meson:
49
50 meson build
51
52 Then
53
54 ninja -C build
55
56 To build and run the tests
57
58 ninja -C build test
59
60 #### Using Make:
45 61
46 make 62 make
47 63
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: 64 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:
49 65
50 make ARCH=ia32 66 make ARCH=ia32
51 67
52 supported values are `ia32` and `x64`. 68 supported values are `ia32` and `x64`.
53 69
54 70
55 To build and run the tests: 71 To build and run the tests:
56 72
57 make test 73 make test
58 74
59 Likewise, use the following with `ARCH`: 75 Likewise, use the following with `ARCH`:
60 76
61 make test ARCH=ia32 77 make test ARCH=ia32
62 78
63 To run specific tests, you can specify a filter: 79 To run specific tests, you can specify a filter:
64 80
65 make test FILTER=*.Matches 81 make test FILTER=*.Matches
66 82
67 ### Windows 83 ### Windows
68 84
69 * Execute `createsolution.bat` to generate project files, this will create 85 * Execute `createsolution.bat` to generate project files, this will create
70 `build\ia32\libadblockplus.sln` (solution for the 32 bit build) and 86 `build\ia32\libadblockplus.sln` (solution for the 32 bit build) and
71 `build\x64\libadblockplus.sln` (solution for the 64 bit build). Unfortunately, 87 `build\x64\libadblockplus.sln` (solution for the 64 bit build). Unfortunately,
72 V8 doesn't support creating both from the same project files. 88 V8 doesn't support creating both from the same project files.
73 * Open `build\ia32\libadblockplus.sln` or `build\x64\libadblockplus.sln` in 89 * Open `build\ia32\libadblockplus.sln` or `build\x64\libadblockplus.sln` in
74 Visual Studio and build the solution there. Alternatively you can use the 90 Visual Studio and build the solution there. Alternatively you can use the
75 `msbuild` command line tool, e.g. run `msbuild /m build\ia32\libadblockplus.sln` 91 `msbuild` command line tool, e.g. run `msbuild /m build\ia32\libadblockplus.sln`
76 from the Visual Studio Developer Command Prompt to create a 32 bit debug build. 92 from the Visual Studio Developer Command Prompt to create a 32 bit debug build.
77 93
78 Tested on Microsoft Visual Studio 2015 Community Edition. 94 Tested on Microsoft Visual Studio 2015 Community Edition.
79 95
80 ### Building for Android 96 ### Building for Android
81 97
98 #### Using Meson
99
100 First set `ANDROID_NDK_ROOT` environment variable to your Android NDK directory.
101 If you don't have one yet, do not worry.
102
103 You need to initially run
104
105 ./cross-bootstrap.sh
106
107 This will configure the cross files to the location of the NDK.
108 If `ANDROID_NDK_ROOT` is not defined, then it will download it into
109 `third_party` first.
110
111 To configure a build
112
113 meson android-arm-build --cross-file cross/android-arm
114
115 Then to build
116
117 ninja -C android-arm-build
118
119 There are cross-files for android-x86 and android-arm64. You can use these
120 to configure other targets.
121
122 #### Using Make
123
82 First set ANDROID_NDK_ROOT environment variable to your Android NDK directory. 124 First set ANDROID_NDK_ROOT environment variable to your Android NDK directory.
83 125
84 To build for *x86* arch run: 126 To build for *x86* arch run:
85 127
86 make android_x86 128 make android_x86
87 129
88 To build for *arm* or *arm64* arch run: 130 To build for *arm* or *arm64* arch run:
89 131
90 make android_arm 132 make android_arm
91 133
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 Linting 316 Linting
275 ------- 317 -------
276 318
277 You can lint the code using [ESLint](http://eslint.org). 319 You can lint the code using [ESLint](http://eslint.org).
278 320
279 npm run eslint 321 npm run eslint
280 322
281 In order to set up ESLint and 323 In order to set up ESLint and
282 [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. 324 [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.
283 325
OLDNEW
« no previous file with comments | « .travis.yml ('k') | cross-bootstrap.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld