summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatai Gergely <patai.gergely@gmail.com>2016-01-13 20:57:42 +0200
committerPatai Gergely <patai.gergely@gmail.com>2016-01-13 20:57:42 +0200
commit5d869d1da1add07d926c06f6729b2ac49ed215ff (patch)
tree4a543d1f066d45b69b718449f9bb45986fdb514b
parent3b348023845eadeab94d6ffa9bcd50ea5af61e38 (diff)
Added instructions to the readme.
-rw-r--r--README.md45
1 files changed, 45 insertions, 0 deletions
diff --git a/README.md b/README.md
index 0cc3565..bf81f5a 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,46 @@
1# lambdacube-gl 1# lambdacube-gl
2
3This is the Haskell OpenGL backend for LambdaCube. It depends on the [lambdacube-ir](https://github.com/lambdacube3d/lambdacube-ir) package.
4
5## Building instructions
6
7Probably the easiest way to build this project is using [stack](https://github.com/commercialhaskell/stack/blob/master/doc/install_and_upgrade.md).
8
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.
10
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:
12
13 ```
14 git config core.symlinks true
15 git reset --hard HEAD
16 ```
17
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
19
204. Set up a local stack config in `$LC_ROOT`:
21
22 1. Execute `stack init --resolver lts-4.1` to generate `stack.yaml`.
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):
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.