Skip to content
This repository has been archived by the owner on Feb 28, 2020. It is now read-only.

Editing the Code

dylancaponi edited this page Jul 6, 2015 · 9 revisions

Building on Mac OSX

Prerequisites

Getting a couple common questions about building and running the app on OSX. Here's a brief summary on how to get up and running.

  1. Download Java JDK 1.7 (http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html) (Note don't download the JRE, but the JDK. Newest version will throw Unsupported JDK: java.specification.version 1.8 != 1.7)
  2. Download SBT. This can be done in a couple ways, either through SBT website http://www.scala-sbt.org/ or download SBT via Homebrew by invoking brew install sbt in Terminal. Tinderbox uses an older version of SBT 0.13.2.
  3. Once you have these two programs downloaded, you can boot up SBT to run the source code via Terminal. From the project directory root type sbt run. If you want to use incremental compiling, then type sbt ~run.

If you still have issues running build scripts, please add a comment at this issue: https://github.com/crockpotveggies/tinderbox/issues/1

Running in "dev" mode

If you're making heavy changes and want to see them immediately, you can do so by using SBT's incremental compiler. SBT will look for changes in files and compile on-demand. You will need to refresh Tinderbox in the browser to see the changes.

You can run SBT incremental compiling with the command:

sbt ~run

Building the "dist"

If you've modified any of the source files and want to run Tinderbox the standard way (without using sbt run), you'll need to re-build the code. There is a build script available to automate the unzipping and moving of dist files into the dist folder. From the project directory root, type:

bash lib/build_tinderbox_dist

The OSX .app launcher needs the contents of the package to be unzipped to the project root so the structure looks like this:

- project root
-- dist
--- tinderbox-1.1-SNAPSHOT
---- bin
---- conf
---- lib
---- README.md
---- share

A note for Windows

It's been a while since I've worked with Windows so I don't have any support for that just yet. However, if you want to give it a try most issues you'll experience usually come down to SBT configs or issues with the JAVA_HOME variable.

Heads up!

If this is the first time you're running the app, it may take up to 20 minutes to fetch dependencies. This is partly because StanfordNLP is a beast and is at least 130MB big. This is on top of all the other dependencies.