You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -25,51 +25,104 @@ app and your native/hybrid app.
25
25
26
26
## Related projects
27
27
28
-
I created a couple of sample projects to demonstrate integrating the [schema.today.graphql](./samples/today/schema.today.graphql)
29
-
service into an Electron app. They're available under my personal account, feel free to use either or both of these as a
30
-
starting point to integrate your own generated service with Node or Electron:
31
-
*[electron-cppgraphql](https://github.com/wravery/electron-cppgraphql): Node Native Module which compiles
28
+
I created a couple of sample projects that worked up to version 2.x to demonstrate integrating the
29
+
[schema.today.graphql](./samples/today/schema.today.graphql) service into an Electron app. I haven't migrated them
30
+
to 3.x and C++17 yet, but they're available under my personal account. Feel free to use either or both of these as a
31
+
starting point to integrate your own generated service with Node or Electron. PRs with links to your own samples or
32
+
migrating either of those projects to 3.x are welcome.
33
+
34
+
-[electron-cppgraphql](https://github.com/wravery/electron-cppgraphql): Node Native Module which compiles
32
35
against the version of the Node headers included in Electron.
33
-
*[cppgraphiql](https://github.com/wravery/cppgraphiql): Electron app which consumes `electron-cppgraphql` and
36
+
-[cppgraphiql](https://github.com/wravery/cppgraphiql): Electron app which consumes `electron-cppgraphql` and
34
37
exposes an instance of [GraphiQL](https://github.com/graphql/graphiql) on top of it.
35
38
36
39
## Installation process
37
40
38
-
First, clone this repo, then make sure you have the dependencies. Acquiring the dependencies is a
39
-
bit different depending on your platform.
41
+
I've tested this on Windows with Visual Studio 2019 and Linux using an Ubuntu 18.04 LTS instance running in WSL with
42
+
both gcc 7.3.0 and clang 6.0.0. The key compiler requirement is support for C++17, recent updates to Visual Studio 2017
43
+
will probably work too.
40
44
41
-
I've tested this on Windows with Visual Studio 2017 and Linux using an Ubuntu instance running in
42
-
WSL.
45
+
The easiest way to get all of these and to build `cppgraphqlgen` in one step is to use
46
+
[Microsoft/vcpkg](https://github.com/Microsoft/vcpkg). To install with vcpkg, make sure you've pulled the latest version
47
+
and then run `vcpkg install cppgraphqlgen` (or `cppgraphqlgen:x64-windows`, `cppgraphqlgen:x86-windows-static`, etc.
48
+
depending on your platform). To install just the dependencies and work in a clone of this repo, you'll need some subset
49
+
of `vcpkg install pegtl boost-program-options boost-filesystem rapidjson gtest`. It works for Windows, Linux, and Mac,
50
+
but if you want to try building for another platform (e.g. Android or iOS), you'll need to do more of this manually.
43
51
44
-
I added a vcpkg port for this project, if you have vcpkg you can also install everything with `vcpkg install cppgraphqlgen`.
52
+
Manual installation will work best if you clone the GitHub repos for each of the dependencies and follow the installation
53
+
instructions for each project. You might also be able to find pre-built packages depending on your platform, but the
54
+
versions need to match.
45
55
46
56
## Software dependencies
47
57
48
-
As of version 3.0, this project depends on C++17. I also picked a few other projects as dependencies:
58
+
The build system for this project uses [CMake](http://www.cmake.org/). You will need to have CMake (at least version
59
+
3.8.0) installed, and the library dependencies need to be where CMake can find them. Otherwise you need to disable the
60
+
options which depend on them.
49
61
50
-
- GraphQL parsing: [Parsing Expression Grammar Template Library (PEGTL)](https://github.com/taocpp/PEGTL), which is part of [The Art of C++](https://taocpp.github.io/) library collection. While the PEGTL 3.0 release is still pending I've added this as a sub-module, so you should not install this separately.
51
-
- Command line handling: [Boost.Program_options](https://www.boost.org/doc/libs/1_69_0/doc/html/program_options.html).
0 commit comments