-
Notifications
You must be signed in to change notification settings - Fork 16
Compiling and or running
Install openssl and sdl2 (with headers) via your distro's package manager. (Packages with headers generally end with -dev
)
cargo run --release
Compiling Steven requires a working rust installation(currently only nightly), openssl and sdl2, installing this is easiest with homebrew.
The easiest way to install a nightly version of rust is probably by using multirust, to install multirust issue the command:
brew install multirust
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.
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.