summaryrefslogtreecommitdiff
path: root/other/apidsl/README.md
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2016-09-21 10:51:58 +0100
committeriphydf <iphydf@users.noreply.github.com>2016-10-02 23:54:03 +0100
commitb8b9789a6975266433904b0ab4d381a9f3317986 (patch)
tree22a472dcc207a712fc7bb8abf44c54dd211431bc /other/apidsl/README.md
parent66e1bb4510f69e3361ff95ebeaae42ee51a70675 (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.md51
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 @@
1This 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
5There 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
12If 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
151. Make sure that you have ``curl`` and ``>=astyle-2.03`` installed
162. Modify [``tox.in.h``](/other/apidsl/tox.in.h)
173. Run command below ↓
18
19Command to run from ``toxcore`` directory (quick way, involves using curl):
20```bash
21# For tox.h:
22curl -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:
27curl -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
33You may want to make sure with ``git diff`` that changes made in ``tox.h`` reflect changes in ``tox.in.h``.
34
35And you're done.
36
37
38## Manually
39
40If you prefer to have more control over what is happening, there are steps below:
41
421. Install [``apidsl``](https://github.com/TokTok/apidsl)
432. Install ``astyle``, version 2.03 or later.
443. Modify [``tox.in.h``](/other/apidsl/tox.in.h)
454. Use ``apidsl`` ``??``
465. Parse generated ``tox.h`` with astyle, minimal command for it would be:
47```bash
48astyle --options=other/astyle/astylerc toxcore/tox.h
49```
50
51**Always pass output from ``apidsl`` through astyle.**