Installation Instructions for Windows

Compiling geth with Tools from Chocolatey

The Chocolatey package manager provides an easy way to install the required build tools. If you haven't yet installed Chocolatey, follow the instructions on to get started.

Next, open an Administrator command prompt and install the build tools you 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 at least 1.15 or higher.

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.

If you receive this warning message, this 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 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\\ela
C:\Users\xxx> git clone src\\ela\Elastos.ELA.SideChain.ESC
C:\Users\xxx> cd src\\ela\Elastos.ELA.SideChain.ESC
C:\Users\xxx> go get -u -v

Finally, the command to compile geth is:

C:\Users\xxx\src\\ela\Elastos.ELA.SideChain.ESC> go install -v ./cmd/...

Last updated