Skip to content

Building

George edited this page May 4, 2017 · 9 revisions

Dependencies

Name Version
Emscripten 1.35.0
Nodejs >= v4.1.1
gnu make 3.82
npm 2.14.4
python(optional) 2.7

Getting and Building the Code

octocat

1. Clone the repo:

$ git clone https://github.com/Gmadges/fluidPainter

2. Download packages:

$ cd fluidPainter
$ npm install

3. Building

Using Build tools

$ npm run build

This will build all and serve on localhost:3000. It will also look for changes made and rebuild and refresh accordingly.

Manually Building

There are 2 Steps to build the project "manually". Building the typescript and the Emscripten.

Typescript

Install typescript globally so we can call it easier

$ npm install -g typescript

To build

$ tsc

Or just run:

$ npm run build-ts
Emscripten
$ make clean
$ make

The "make clean" command is important if any changes have occured to data that will be packaged up(shaders, textures).

Installing Emscripten at University

This guide is specific to building emscripten on the Bournemouth University machines.

Emscripten

Download the emsdk from here. Extract this to a directory of your choice(I put mine in home).

# navigate to the axtracted file in the terminal. Mine was in home.
$ cd ~/emsdk-portable

# Fetch the latest registry of available tools.
$ ./emsdk update

# Download and install the versions we want
# This can take a while
$ ./emsdk install emscripten-1.35.0 clang-tag-e1.35.0-64bits

# Make the SDK "active"
$ ./emsdk activate emscripten-1.35.0 clang-tag-e1.35.0-64bit

# Set the current Emscripten path on Linux/Mac OS X
$ source ./emsdk_env.sh

We should now have emscripten, node & npm in our PATH. Now follow the Getting and Building the Code guide to build the project.