diff options
author | Csaba Hruska <csaba.hruska@gmail.com> | 2018-02-03 23:43:36 +0100 |
---|---|---|
committer | Csaba Hruska <csaba.hruska@gmail.com> | 2018-02-03 23:43:36 +0100 |
commit | 085bf189dad484496630dd0a8eba504930549c79 (patch) | |
tree | d196faa90288d10040717c9486509a4af0d79024 | |
parent | 297dfbf6f633a1269640b92ebc55b05ca58c102f (diff) |
update readme
-rw-r--r-- | README.md | 59 | ||||
-rw-r--r-- | lambdacube-gl.cabal | 6 | ||||
-rw-r--r-- | stack.yaml | 11 |
3 files changed, 28 insertions, 48 deletions
@@ -1,46 +1,23 @@ | |||
1 | # lambdacube-gl | 1 | # lambdacube-gl |
2 | 2 | ||
3 | This is the Haskell OpenGL backend for LambdaCube. It depends on the [lambdacube-ir](https://github.com/lambdacube3d/lambdacube-ir) package. | 3 | Haskell OpenGL backend for LambdaCube 3D. |
4 | 4 | ||
5 | ## Building instructions | 5 | ## Building instructions |
6 | 6 | ||
7 | Probably the easiest way to build this project is using [stack](https://github.com/commercialhaskell/stack/blob/master/doc/install_and_upgrade.md). | 7 | 1. Install Haskell [Stack](http://www.haskellstack.org) by following it's simple [install manual](https://docs.haskellstack.org/en/stable/README/#how-to-install). |
8 | 8 | 2. Checkout the this repository then run the following commands. | |
9 | 1. Clone the [lambdacube-ir](https://github.com/lambdacube3d/lambdacube-ir) and [lambdacube-gl](https://github.com/lambdacube3d/lambdacube-gl) repositories under a common root (from now on `$LC_ROOT`). If you want to run the hello world example, clone [lambdacube-compiler](https://github.com/lambdacube3d/lambdacube-compiler) as well. | 9 | ``` |
10 | 10 | stack setup | |
11 | 2. If you are a Windows user, you must enable symlink support for `lambdacube-ir`. Start your Git shell as an administrator and run the following commands: | 11 | stack build |
12 | 12 | ``` | |
13 | ``` | 13 | 3. Run the examples. |
14 | git config core.symlinks true | 14 | ``` |
15 | git reset --hard HEAD | 15 | cd examples |
16 | ``` | 16 | stack exec lambdacube-gl-hello |
17 | 17 | stack exec lambdacube-gl-hello-obj | |
18 | 3. If you just want to build this package, simply execute `stack build` in `$LC_ROOT/lambdacube-gl`. If you want to run the hello world example, continue with the steps below | 18 | ``` |
19 | 19 | ||
20 | 4. Set up a local stack config in `$LC_ROOT`: | 20 | ## Tutorials and Examples |
21 | 21 | ||
22 | 1. Execute `stack init --resolver lts-4.1` to generate `stack.yaml`. | 22 | - [Getting started](http://lambdacube3d.com/getting-started) |
23 | 2. Copy the `extra-deps` section from the stack config of `lambdacube-compiler` into the above file. The resulting file should look something like this (plus auto-generated comments): | 23 | - [Workshop material](https://github.com/csabahruska/lambdacube-workshop) |
24 | |||
25 | ``` | ||
26 | resolver: lts-4.1 | ||
27 | packages: | ||
28 | - lambdacube-ir\lambdacube-ir.haskell\ | ||
29 | - lambdacube-gl\ | ||
30 | - lambdacube-compiler\ | ||
31 | extra-deps: | ||
32 | - indentation-0.2.1.1 | ||
33 | - pretty-compact-1.0 | ||
34 | flags: {} | ||
35 | extra-package-dbs: [] | ||
36 | ``` | ||
37 | |||
38 | 5. Execute `stack install GLFW-b` in `$LC_ROOT`. | ||
39 | |||
40 | 6. Copy `lambdacube-gl/examples` into `$LC_ROOT/examples` (so it's not part of the `lambdacube-gl` local stack, which doesn't see `lambdacube-compiler`). | ||
41 | |||
42 | 7. Copy `lambdacube-compiler/testdata/accept/{Prelude|Builtins|Internals}.lc` into `$LC_ROOT/examples` (sadly we don't have a standard way to handle these dependencies yet). | ||
43 | |||
44 | 8. In `$LC_ROOT/examples` execute `stack ghc -- --make Hello`. | ||
45 | |||
46 | 9. Run the resulting executable and enjoy the view. | ||
diff --git a/lambdacube-gl.cabal b/lambdacube-gl.cabal index 50da59f..d473889 100644 --- a/lambdacube-gl.cabal +++ b/lambdacube-gl.cabal | |||
@@ -79,7 +79,7 @@ executable lambdacube-gl-hello | |||
79 | bytestring >=0.10 && <0.11, | 79 | bytestring >=0.10 && <0.11, |
80 | vector >=0.12 && <0.13, | 80 | vector >=0.12 && <0.13, |
81 | JuicyPixels >=3.2 && <3.3, | 81 | JuicyPixels >=3.2 && <3.3, |
82 | aeson >= 1.1.2 && <1.2, | 82 | aeson >= 1.1.2 && <1.3, |
83 | GLFW-b >= 1.4 && <1.5, | 83 | GLFW-b >= 1.4 && <1.5, |
84 | lambdacube-gl, | 84 | lambdacube-gl, |
85 | lambdacube-ir == 0.3.* | 85 | lambdacube-ir == 0.3.* |
@@ -103,7 +103,7 @@ executable lambdacube-gl-hello-obj | |||
103 | bytestring >=0.10 && <0.11, | 103 | bytestring >=0.10 && <0.11, |
104 | vector >=0.12 && <0.13, | 104 | vector >=0.12 && <0.13, |
105 | JuicyPixels >=3.2 && <3.3, | 105 | JuicyPixels >=3.2 && <3.3, |
106 | aeson >= 1.1.2 && <1.2, | 106 | aeson >= 1.1.2 && <1.3, |
107 | GLFW-b >= 1.4 && <1.5, | 107 | GLFW-b >= 1.4 && <1.5, |
108 | wavefront >= 0.7 && <1, | 108 | wavefront >= 0.7 && <1, |
109 | lambdacube-gl, | 109 | lambdacube-gl, |
@@ -132,7 +132,7 @@ executable lambdacube-gl-test-client | |||
132 | base64-bytestring >=1 && <1.1, | 132 | base64-bytestring >=1 && <1.1, |
133 | vector >=0.12 && <0.13, | 133 | vector >=0.12 && <0.13, |
134 | JuicyPixels >=3.2 && <3.3, | 134 | JuicyPixels >=3.2 && <3.3, |
135 | aeson >= 1.1 && <1.2, | 135 | aeson >= 1.1 && <1.3, |
136 | websockets >= 0.10 && <1, | 136 | websockets >= 0.10 && <1, |
137 | network >= 2.6 && <2.7, | 137 | network >= 2.6 && <2.7, |
138 | OpenGLRaw >=3.2 && <4, | 138 | OpenGLRaw >=3.2 && <4, |
@@ -1,14 +1,17 @@ | |||
1 | resolver: lts-9.0 | 1 | resolver: lts-10.4 |
2 | packages: | 2 | packages: |
3 | - '.' | 3 | - '.' |
4 | - location: | 4 | - location: |
5 | git: https://github.com/lambdacube3d/lambdacube-ir.git | 5 | git: https://github.com/lambdacube3d/lambdacube-ir.git |
6 | commit: a0bf64b83dd218d1ea29823749dcfa8a6ee959a9 | 6 | commit: b8b4ec9fa985b2eb756ac1a5a65af483a0bd586b |
7 | subdirs: | 7 | subdirs: |
8 | - lambdacube-ir.haskell | 8 | - lambdacube-ir.haskell |
9 | extra-dep: true | 9 | extra-dep: true |
10 | extra-deps: | 10 | extra-deps: |
11 | - wavefront-0.7.1 | 11 | - wavefront-0.7.1.1 |
12 | |||
13 | flags: | ||
14 | lambdacube-gl: | ||
15 | example: true | ||
12 | 16 | ||
13 | flags: {} | ||
14 | extra-package-dbs: [] | 17 | extra-package-dbs: [] |