Skip to content

Installing From Source

Tony Collen edited this page Mar 5, 2021 · 28 revisions

These instructions assume a basic knowledge of Linux/Unix and command-line tools.

open890 is currently supported under Linux, or Unix-like operating systems like MacOS. You can also follow these instructions in Windows 10 if you have WSL installed - much of this project was written under WSL.

If you are on Windows and do not have WSL installed, you can still compile the app, assuming you have the Windows versions of Elixir and NodeJS installed. See Developing on Windows for more information.

You will need Elixir (and thus, Erlang) and NodeJS installed, particularly if you are either developing features for open890, or using a non-binary (e.g. source) release.

Using a tool like asdf is recommended to manage the various versions of the development dependencies.

Using asdf

  • Install asdf

  • Install erlang, elixir and nodeJS plugins

    asdf plugin add erlang https://github.com/asdf-vm/asdf-erlang.git
    asdf plugin-add elixir https://github.com/asdf-vm/asdf-elixir.git
    asdf plugin-add nodejs https://github.com/asdf-vm/asdf-nodejs.git
    
  • At this point, Raspberry Pi users may need to install the following packages:

    sudo apt -y install autoconf libssl-dev libncurses5-dev
    
  • Install the specific versions listed in the .tool-versions file:

    bash -c '${ASDF_DATA_DIR:=$HOME/.asdf}/plugins/nodejs/bin/import-release-team-keyring'
    asdf install
    
  • The Erlang install will take a very long time on a Raspberry Pi. You may also see scary-looking messages during the Erlang install that says something like "fop is missing" or "documentation cannot be built" - this is OK.

  • Once everything has installed, you should be able to run elixir --version and also npm --version

Clone this repository

    git clone https://github.com/tonyc/open890.git
    cd open890

Optional: Check out the develop branch

There are two main branches in the repository: main and develop

  • main can be interpreted as "stable", but unreleased. Code that lands in main is next in line for a release. This is the default branch you get when cloning the repository.

  • develop should be considered "unstable". Things may break, things may change around rapidly, etc.

To check out the develop branch:

    git checkout develop

Compile the app

  • Install dependencies with mix deps.get. First-time users may need to answer Y to a couple of prompts

  • Compile with mix compile

  • Once that's finished, compile assets:

    cd assets/
    npm install
    cd ..
    

Start your server:

  • Run mix phx.server

Now you can visit http://localhost:4000 from your browser.

Stopping your server

Type ^C^C (aka: ctrl-c twice)

Clone this wiki locally