Contents:
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:
go version
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:
git version
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,
build the shenzhen-go
program, and put it in the go/bin
directory.
From a terminal in your home directory, run
go/bin/shenzhen-go
(or on Windows, something similar to go\bin\shenzhen-go.exe
).
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):
go
src
github.com
google
shenzhen-go
dev
examples
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:
shenzhen-go go/src/github.com/google/shenzhen-go/dev/examples/demo.szgo
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: