Skip to content

Latest commit

 

History

History
107 lines (89 loc) · 3.76 KB

install-tools.md

File metadata and controls

107 lines (89 loc) · 3.76 KB

Installing tools for Downstream

These tools are required for building Downstream from source using make.

A quicker way of running Downstream is to use Docker - see the main readme for details.

Tools list

Tools required to build Downstream:

  • Unity Editor 2021.3.13f1
    • Unity WebGL submodule

(🖥 Windows The following should all be installed to WSL:)

  • make
  • gcc
  • node (use nvm to match correct version)
  • go (version go1.19.13 - similar versions may be fine)
  • forge (version 0.2.0)
  • ethereum tools (including solc and abigen)

Installation Instructions

OS specific instructions

  • 🖥 Windows users will need to instal Windows Subsystem for Linux (WSL) and carefully follow the instructions as to which tools need to be installed to native Windows vs inside WSL.
  • 🍏 MacOS supports all the tools natively.

1. Unity

  • Install Unity Hub
  • Install Unity Editor version 2021.3.13f1 via Unity LTS archive
    • 🖥 Windows only Use "C:\Program Files\Unity\Hub\Editor\2021.3.13f1" as your install path (be sure to change the default path and folder name)
  • Install WebGL submodule

2. WSL (Windows Subsystem for Linux)

🖥 Windows only

  • Install WSL: Follow the guide at Microsoft WSL Install. Note that enabling virtualization might vary based on your CPU model.

  • Initial Setup in PowerShell:

    • Run wsl --install.
    • Restart your PC.
    • Upon reboot, follow the on-screen instructions to complete Ubuntu setup.
    • Create a username and password as per Microsoft's best practices.
  • Switch to WSL1: The default WSL2 can be changed to WSL1, which works better for our purposes.

    • In PowerShell, run wsl --list --verbose to find your Ubuntu distribution name.
    • Switch to WSL1 with wsl --set-version [distribution name] 1. Example: wsl --set-version Ubuntu 1.
  • Installing WSL essentials

  • Access WSL: Use wsl command in PowerShell or open the Ubuntu application.

  • Install gcc & make:

    sudo apt update
    sudo apt install build-essential
    

⚠️ All remaining tools should be installed to WSL if running on Windows

3. Node

  • Recommended to use nvm (nvm install script).
  • Run the following commands:
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
    
    Navigate to the ds directory and run nvm install.

🖥 Windows:

  • Note ds path with be under /mnt/; e.g. $cd /mnt/d/playmint/ds
  • Extra Node configuration under WSL may be necessary:
    • Set environment variable:
      NODE_OPTIONS=--max-old-space-size=4096
      
    • Restart your machine.
    • Update Node packages:
      npm update -g
      
    • Update Node packages:
    npm cache clean -f
    

4. Go

  • Download go1.19.13.linux-amd64.tar.gz from Go Downloads.
  • Follow installation instructions at Go Install Guide;
  • ⚠️ 🖥 Windows use the Linux download and install instructions to setup in WSL.

5. Ethereum Tools

🖥 Windows

sudo add-apt-repository ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install solc
sudo apt-get install abigen

🍏 MacOS

brew tap ethereum/ethereum
brew install ethereum

6. Foundry (forge and anvil)

Follow instructions at Foundry Installation:

curl -L https://foundry.paradigm.xyz | bash
foundryup