Skip to content

Commit cf46040

Browse files
committed
doc: windows zip archive installation instructions
Fixes #3254. R=golang-dev, r CC=golang-dev https://golang.org/cl/5794071
1 parent 6033a48 commit cf46040

File tree

1 file changed

+41
-1
lines changed

1 file changed

+41
-1
lines changed

doc/install.html

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ <h2 id="install">Installing the Go tools</h2>
5151

5252
<p>
5353
The Go binary distributions assume they will be installed in
54-
<code>/usr/local/go</code>, but it is possible to install them in a different
54+
<code>/usr/local/go</code> (or <code>c:\Go</code> under Windows),
55+
but it is possible to install them in a different
5556
location. If you do this, you will need to set the <code>GOROOT</code>
5657
environment variable to that directory when using the Go tools.
5758
</p>
@@ -66,6 +67,11 @@ <h2 id="install">Installing the Go tools</h2>
6667
export PATH=$PATH:$GOROOT/bin
6768
</pre>
6869

70+
<p>
71+
Windows users should read the section about <a href="#windows_env">setting
72+
environment variables under Windows</a>.
73+
</p>
74+
6975
<h3 id="freebsd_linux">FreeBSD and Linux</h3>
7076

7177
<p>
@@ -113,6 +119,15 @@ <h3 id="osx">Mac OS X</h3>
113119

114120
<h3 id="windows">Windows</h3>
115121

122+
<p>
123+
The Go project provides two installation options for Windows users
124+
(besides <a href="/doc/install/source">installing from source</a>):
125+
an MSI installer that configures your installation automatically,
126+
and a zip archive that requires you to set some environment variables.
127+
</p>
128+
129+
<h4 id="windows_msi">MSI installer</h3>
130+
116131
<p>
117132
Open the <code>.msi</code> file and follow the prompts to install the Go tools.
118133
By default, the installer puts the Go distribution in <code>c:\Go</code>.
@@ -124,6 +139,31 @@ <h3 id="windows">Windows</h3>
124139
command prompts for the change to take effect.
125140
</p>
126141

142+
<h4 id="windows_zip">Zip archive</h3>
143+
144+
<p>
145+
Extract the <code>.zip</code> file to the directory of your choice (we
146+
suggest <code>c:\Go</code>).
147+
</p>
148+
149+
<p>
150+
If you chose a directory other than <code>c:\Go</code>, you must set
151+
the <code>GOROOT</code> environment variable to your chosen path.
152+
</p>
153+
154+
<p>
155+
Add the <code>bin</code> subdirectory of your Go root (for example, <code>c:\Go\bin</code>) to to your <code>PATH</code> environment variable.
156+
</p>
157+
158+
<h4 id="windows_env">Setting environment variables under Windows</h4>
159+
160+
<p>
161+
Under Windows, you may set environment variables through the "Environment
162+
Variables" button on the "Advanced" tab of the "System" control panel. Some
163+
versions of Windows provide this control panel through the "Advanced System
164+
Settings" option inside the "System" control panel.
165+
</p>
166+
127167
<h2 id="testing">Testing your installation</h2>
128168

129169
<p>

0 commit comments

Comments
 (0)