1. Download Go. Download the "Archive" or "Installer" for version 1.8 or later for your CPU and OS. The "Source" download does not contain an executable and step 3 will fail.
2. Install Go on your system.
3. Add a new environment variable called GOPATH which points to the directory on your computer where Go libraries get installed. How to do this depends on your computer and operating system. Instructions for the most common platforms are below.
If you DO NOT have a shell profile file, follow ALL these instructions in your terminal. If you know about shell profiles, and have one, just do steps 4 and 5
$ cd ~
$ touch .bash_profile
$ open .bash_profile
- in your editor, add the following to .bash_profile, and save it
export GOPATH="$HOME/go" export PATH="$GOPATH/bin:$PATH"
5. $ source .bash_profile
First you'll need to install some necessary programs if you don't already have them.
Install Windows git. Be sure to select the appropriate options so that git is accessible from the Windows command line.
Next, in your Control Panel, select System>Advanced system settings>Environment Variables... and under System Variablesdo the following:
Add a new entry with the name
GOPATHand the value
%USERPROFILE%\go(Or your Go workspace folder).
Double-click Path, and in the window that pops up add the following entries:
C:\Go\bin(Or wherever you installed Go to+
C:\Program Files (x86)\GnuWin32\bin(Or wherever you installed GnuWin32 make to+
4. Run the following command in a terminal to download the library and command lines tools
$ go get -d -v github.com/holochain/holochain-proto
5. Lastly, change directories into the new holochain-proto directory, and run
maketo build the library and command lines tools for your computer.
MAC and LINUX: $ cd $GOPATH/src/github.com/holochain/holochain-proto
WINDOWS: $ cd %GOPATH%/src/github.com/holochain/holochain-proto
and then (on both)
And thats it!
To see an initial confirmation that it works, you can try running one of the commands to check your version. You should see a result something like the following.
$ hcadmin -v hcadmin version 0.0.x (holochain y)