If you already have Go and Git installed, skip to the next section. Otherwise, continue here.
First, install Go. The instructions vary by operating system. To quickly check that it is (probably) installed correctly, open a terminal and enter:
If this prints a
go version ..., it’s working.
Go is required both to install the Shenzhen Go program, and also to build any programs you write with it.
Secondly, install Git if not already available. To quickly check that Git is (probably) installed correctly, open a terminal and enter:
If this prints a
git version ..., it’s working.
To install Shenzhen Go, open a terminal and enter:
go get -u github.com/google/shenzhen-go
This should automatically download all the needed Go packages,
shenzhen-go program, and put it in the
From a terminal in your home directory, run
(or on Windows, something similar to
A web browser should appear and load the Shenzhen Go user interface (if not, follow the instructions it prints out).
The first view that loads is a file browser.
Clicking on the blue links navigates through files and directories.
If you started
shenzhen-go in your home directory, you can get to the
example programs by navigating (in order):
Finally, click on
demo.szgo to open it.
To short-circuit this process next time you want to use Shenzhen Go, you can start Shenzhen Go with a path to files to open as an argument:
Once you have opened
demo.szgo, the browser should look like this:
(Not the most exciting user interface - I know, I’m working on it.)
To test that the demo program works, hover over the Graph menu and click on Run.
The right-side panel should load a black terminal, that looks like the below.
Click on the terminal and enter a number (it doesn’t matter which number). The program should then complete.
Congratulations, everything appears to be working!
Things for you to explore in your own time: