-
Notifications
You must be signed in to change notification settings - Fork 81
Installation Instructions for Windows
The Chocolatey package manager provides an easy way to get the required build tools installed. If you don't have chocolatey yet, follow the instructions on https://chocolatey.org to install it first.
Then open an Administrator command prompt and install the build tools we need:
C:\Windows\system32> choco install git
C:\Windows\system32> choco install golang
C:\Windows\system32> choco install mingw
Installing these packages will set up the Path
environment variable.
Open a new command prompt to get the new Path
. The following steps don't
need Administrator privileges.
Please ensure that the installed Go version is 1.7 (or any later version).
First we'll create and set up a Go workspace directory layout, then clone the source.
OBS If, during the commands below, you get the following message:
WARNING: The data being saved is truncated to 1024 characters.
Then that means that the setx
command will fail, and proceeding will truncate the Path
/GOPATH
. If this happens, it's better to abort, and try to make some more room in Path
before trying again.
C:\Users\xxx> set "GOPATH=%USERPROFILE%"
C:\Users\xxx> set "Path=%USERPROFILE%\bin;%Path%"
C:\Users\xxx> setx GOPATH "%GOPATH%"
C:\Users\xxx> setx Path "%Path%"
C:\Users\xxx> mkdir src\github.com\truechain
C:\Users\xxx> git clone https://github.com/truechain/truechain-engineering-code src\github.com\truechain\truechain-engineering-code
C:\Users\xxx> cd src\github.com\truechain\truechain-engineering-code
C:\Users\xxx> go get -u -v golang.org/x/net/context
Finally, the command to compile getrue is:
C:\Users\xxx\src\github.com\truechain\truechain-engineering-code> go install -v ./cmd/...