Skip to content

Compiling and or running

TheUnnamedDude edited this page Apr 1, 2016 · 10 revisions

Table of content

Compiling on OS X

Installing dependencies

Compiling Steven requires a working rust installation(currently only nightly), openssl and sdl2, installing this is easiest with homebrew.

Installing multirust

The easiest way to install a nightly version of rust is probably by using multirust, to install multirust issue the command:

brew install multirust

Installing dependencies with homebrew

To install openssl and sdl2 issue these commands:

brew install sdl2
brew install openssl

Older versions of OS X comes with a older version of openssl while El Capitan and newer does not come with openssl at all, compiling steven with older OS X versions would most likely work without installing the openssl library(and using the OPENSSL_ environment variables) but I would recommend installing it anyway.

TODO: Instructions without homebrew

Compiling

To compile steven you can either use this simple bash script to set the environment variables so the compiler can find the required libraries and run ./scriptname.sh build --release to compile or ./scriptname.sh run --release to run:

#!/bin/bash
export LIBRARY_PATH="$LIBRARY_PATH:/usr/local/lib"
export OPENSSL_INCLUDE_DIR=`brew --prefix openssl`/include
export OPENSSL_LIB_DIR=`brew --prefix openssl`/lib
cargo "$@"

or add the variables directly to the command:

LIBRARY_PATH="$LIBRARY_PATH:/usr/local/lib" OPENSSL_INCLUDE_DIR=`brew --prefix openssl`/include OPENSSL_LIB_DIR=`brew --prefix openssl`/lib cargo build --release

Note: If you're not using homebrew you probably don't need to set the environment variables.

Clone this wiki locally