This article describes how to build a spectrum development environment in a MAC OS x environment.
Environment configuration
Installing Golang
brew install go
Configuring Golang Environment variables
vim ~/.bash_profile
Add Gopath under ~/.bash_profile
#replace ~/go_project with your pathexport GOPATH=~/go_project export PATH=.:$PATH:$GOPATH:$GOPATH/bin
Create a src,pkg,bin directory under Gopath
mkdir -p $GOPATH/bin $GOPATH/pkg $GOPATH/src
Detect GO Environment
source ~/.bash_profilego env
Install Git
brew install git
Source code Compilation
Download the latest source to Gopath
mkdir -p $GOPATH/src/github.com/SmartMeshFoundationcd $GOPATH/src/github.com/SmartMeshFoundationgit clone https://github.com/SmartMeshFoundation/Spectrum
Compiling SMC
cd $GOPATH/src/github.com/SmartMeshFoundation/Spectrum/go install -v ./cmd/smc
After the successful compilation, the path of the SMC executable file: $GOPAT/BIN/SMC
Test SMC
smc console
About the IDE
The IDE that is commonly used under Mac has Golion,vscode,govim, etc., can choose the IDE according to personal preference.