summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCsaba Hruska <csaba.hruska@gmail.com>2018-02-03 23:43:36 +0100
committerCsaba Hruska <csaba.hruska@gmail.com>2018-02-03 23:43:36 +0100
commit085bf189dad484496630dd0a8eba504930549c79 (patch)
treed196faa90288d10040717c9486509a4af0d79024
parent297dfbf6f633a1269640b92ebc55b05ca58c102f (diff)
update readme
-rw-r--r--README.md59
-rw-r--r--lambdacube-gl.cabal6
-rw-r--r--stack.yaml11
3 files changed, 28 insertions, 48 deletions
diff --git a/README.md b/README.md
index bf81f5a..3173cf0 100644
--- a/README.md
+++ b/README.md
@@ -1,46 +1,23 @@
1# lambdacube-gl 1# lambdacube-gl
2 2
3This is the Haskell OpenGL backend for LambdaCube. It depends on the [lambdacube-ir](https://github.com/lambdacube3d/lambdacube-ir) package. 3Haskell OpenGL backend for LambdaCube 3D.
4 4
5## Building instructions 5## Building instructions
6 6
7Probably the easiest way to build this project is using [stack](https://github.com/commercialhaskell/stack/blob/master/doc/install_and_upgrade.md). 71. 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 82. Checkout the this repository then run the following commands.
91. 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 10stack setup
112. 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: 11stack build
12 12```
13 ``` 133. Run the examples.
14 git config core.symlinks true 14```
15 git reset --hard HEAD 15cd examples
16 ``` 16stack exec lambdacube-gl-hello
17 17stack exec lambdacube-gl-hello-obj
183. 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
204. 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
385. Execute `stack install GLFW-b` in `$LC_ROOT`.
39
406. 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
427. 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
448. In `$LC_ROOT/examples` execute `stack ghc -- --make Hello`.
45
469. 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,
diff --git a/stack.yaml b/stack.yaml
index c40015d..6fc16cc 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -1,14 +1,17 @@
1resolver: lts-9.0 1resolver: lts-10.4
2packages: 2packages:
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
10extra-deps: 10extra-deps:
11- wavefront-0.7.1 11- wavefront-0.7.1.1
12
13flags:
14 lambdacube-gl:
15 example: true
12 16
13flags: {}
14extra-package-dbs: [] 17extra-package-dbs: []