Install Development Tools - theRAPTLab/gsgo GitHub Wiki

tested on Intel MacOS Mojave, Catalina, and clean Big Sur Intel.
tested on Apple Silicon MacOS Monterey clean

GEM-STEP is a collection of server and client code packages developed in Javascript. The system is implemented using NodeJS for the servers and HTML5 running in the browser. If you are familiar with Javascript development using a command line interface, then you will find these tools familiar. If not, we've tried to make the installation process as simple as possible.

If you are installing on a clean MacOS Mojave or later system, you'll need to do some initial setup. After this, you shouldn't have to do it again.

1. Install the XCode Command Line Tools

This adds a bunch of Unix-y command line utilities and program compilation tools.

  1. open Terminal app
  2. enter xcode-select --install (accept dialog box, then wait for install to complete)

You may be asked to accept the xcode license agreement. Just type the command and press space a bunch of times until you can type "agree"

2. Download the Repo

  1. enter cd ~; mkdir dev (creates a 'dev' directory in your user folder)
  2. enter cd ~/dev
  3. enter git clone https://github.com/theRAPTLab/gsgo.git
  4. enter cd gsgo

3. Install Node Version Manager

To install NodeJS, we are going to use the Node Version Manager (nvm). This will allow us to set which version of NodeJS we want to use on a per-directory basis. Quick install:

  1. open Terminal
  2. if you are on MacOS Catalina or later, type touch .zshrc. If you are on an earlier version, type touch .bash_profile
  3. go to https://github.com/nvm-sh/nvm
  4. copy the curl script string from the README, and execute it in the command line
  5. close terminal window, and reopen it...this will load the modified shell environment.

At this point, NodeJS is installed, which also installs the Node Package Manager (npm) which you will use to install and build packages. You can confirm NodeJS is installed by typing node --version into the terminal. You may also recover some disk space with nvm cache clear

NOTES on NVM USE

  • You can specify a node version by name, for example nvm use lts/fermium will load the latest version of the "long term service Fermium" branch.
  • nvm current will show you which version of NodeJS is active
  • Apple Silicon requires Node v14 or higher
  • If you get a zsh: npm command not found error, type nvm alias default v14.18.1 (substitute whatever version of node you like; this will be the one that is made available if no valid .nvmrc is found

4. Install Recommended Code Editor: VSCode

If you are planning to edit any source files in GEM-STEP, then you should also install Visual Studio Code (VSCode). This is our official code editor that supports our development requirements, and is available on all major platforms. This ensures consistent code formatting rules, pretty print, and provides live linting to help identify errors.

After you've installed VSCode, use the FILE menu to open the workspace named gsgo/gsgo.code-workspace. This workspace has project-specific settings in it. After you open the workspace, you should use this for all future editing within the project.

The first time you open the gsgo workspace, you will be prompted on what RECOMMENDED EXTENSIONS to install. You will have to install these manually by going to the EXTENSIONS tab on the left-side vertical panel.

For more information about what these extensions are doing, see 20-tooling/20-vscode-qol.md.

5. Run Install Script

At this point you can run our install script to set everything up. This script detect what version of a (supported) operating system you're running, and then emits the commands for you to type. Copy and paste them into the terminal window.

  1. enter ./scripts/install-helper.sh
  2. read the output to see what to do!

Your development environment should be all set up and you can now run the application. However, the application itself needs set up as well.

6. Running the System

After you've installed the development environment, follow the guide in Daily Operations. It covers running, updating, and switching different development branches.

⚠️ **GitHub.com Fallback** ⚠️