diff options
author | iphydf <iphydf@users.noreply.github.com> | 2016-09-21 10:51:58 +0100 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2016-10-02 23:54:03 +0100 |
commit | b8b9789a6975266433904b0ab4d381a9f3317986 (patch) | |
tree | 22a472dcc207a712fc7bb8abf44c54dd211431bc /other/apidsl/README.md | |
parent | 66e1bb4510f69e3361ff95ebeaae42ee51a70675 (diff) |
Rebuild apidsl'd headers in cmake.
- Moved apidsl headers next to their generated versions. In the future,
perhaps all (or most) headers will be apidsl-generated, so the sources
should stay together.
- Try to find apidsl/apigen binary and astyle binary and use it for the
format test. Don't run the format test if these can't be found.
Diffstat (limited to 'other/apidsl/README.md')
-rw-r--r-- | other/apidsl/README.md | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/other/apidsl/README.md b/other/apidsl/README.md deleted file mode 100644 index 00f92c85..00000000 --- a/other/apidsl/README.md +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | This folder contains the input file (``tox.in.h``) that has to be used to generate the ``tox.h`` api with: https://github.com/TokTok/apidsl | ||
2 | |||
3 | # Minimal requirements | ||
4 | |||
5 | There are some minimal requirements to contribute to ``tox.h``: | ||
6 | * unix environment | ||
7 | * ``astyle`` ``>=2.03`` | ||
8 | * [``apidsl``](https://github.com/TokTok/apidsl) (you can use provided service with curl instead) | ||
9 | |||
10 | ## Quick way | ||
11 | |||
12 | If you want to do it quickly and you don't have time for anything other than copypasting commands, you should have ``curl`` installed. | ||
13 | |||
14 | |||
15 | 1. Make sure that you have ``curl`` and ``>=astyle-2.03`` installed | ||
16 | 2. Modify [``tox.in.h``](/other/apidsl/tox.in.h) | ||
17 | 3. Run command below ↓ | ||
18 | |||
19 | Command to run from ``toxcore`` directory (quick way, involves using curl): | ||
20 | ```bash | ||
21 | # For tox.h: | ||
22 | curl -X POST --data-binary @- https://apidsl.herokuapp.com/apidsl \ | ||
23 | < other/apidsl/tox.in.h \ | ||
24 | | astyle --options=other/astyle/astylerc \ | ||
25 | > toxcore/tox.h | ||
26 | # For toxav.h: | ||
27 | curl -X POST --data-binary @- https://apidsl.herokuapp.com/apidsl \ | ||
28 | < other/apidsl/toxav.in.h \ | ||
29 | | astyle --options=other/astyle/astylerc \ | ||
30 | > toxav/toxav.h | ||
31 | ``` | ||
32 | |||
33 | You may want to make sure with ``git diff`` that changes made in ``tox.h`` reflect changes in ``tox.in.h``. | ||
34 | |||
35 | And you're done. | ||
36 | |||
37 | |||
38 | ## Manually | ||
39 | |||
40 | If you prefer to have more control over what is happening, there are steps below: | ||
41 | |||
42 | 1. Install [``apidsl``](https://github.com/TokTok/apidsl) | ||
43 | 2. Install ``astyle``, version 2.03 or later. | ||
44 | 3. Modify [``tox.in.h``](/other/apidsl/tox.in.h) | ||
45 | 4. Use ``apidsl`` ``??`` | ||
46 | 5. Parse generated ``tox.h`` with astyle, minimal command for it would be: | ||
47 | ```bash | ||
48 | astyle --options=other/astyle/astylerc toxcore/tox.h | ||
49 | ``` | ||
50 | |||
51 | **Always pass output from ``apidsl`` through astyle.** | ||