mirror of
https://github.com/golang/go
synced 2024-11-24 03:10:02 -07:00
doc: update install docs for Windows and Go 1, add golang-announce to /project
R=golang-dev, bradfitz, r, rsc CC=golang-dev https://golang.org/cl/5758044
This commit is contained in:
parent
88e86936be
commit
d70627e5d0
@ -17,6 +17,15 @@ Go is an open source project developed by a team at
|
|||||||
Go is distributed under a <a href="/LICENSE">BSD-style license</a>.
|
Go is distributed under a <a href="/LICENSE">BSD-style license</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<h3 id="announce"><a href="http://groups.google.com/group/golang-announce">Announcements Mailing List</a></h3>
|
||||||
|
<p>
|
||||||
|
A low traffic mailing list for important announcements, such as new releases.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
We encourage all Go users to subscribe to
|
||||||
|
<a href="http://groups.google.com/group/golang-announce">golang-announce</a>.
|
||||||
|
</p>
|
||||||
|
|
||||||
<h2 id="resources">Developer Resources</h2>
|
<h2 id="resources">Developer Resources</h2>
|
||||||
|
|
||||||
<h3 id="source"><a href="https://code.google.com/p/go/source">Source Code</a></h3>
|
<h3 id="source"><a href="https://code.google.com/p/go/source">Source Code</a></h3>
|
||||||
|
@ -97,7 +97,9 @@ If you want to build 32-bit binaries on a 64-bit system you'll also need the
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<font color="red">TODO: add Windows compiler info</font>
|
On Windows, install <code>gcc</code> with
|
||||||
|
<a href="http://www.mingw.org/">MinGW</a>.
|
||||||
|
(Make sure you add its <code>bin</code> subdirectory to your <code>PATH</code>.)
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2 id="mercurial">Install Mercurial, if needed</h2>
|
<h2 id="mercurial">Install Mercurial, if needed</h2>
|
||||||
@ -105,7 +107,7 @@ If you want to build 32-bit binaries on a 64-bit system you'll also need the
|
|||||||
<p>
|
<p>
|
||||||
To perform the next step you must have Mercurial installed. (Check that you
|
To perform the next step you must have Mercurial installed. (Check that you
|
||||||
have an <code>hg</code> command.) This suffices to install Mercurial on most
|
have an <code>hg</code> command.) This suffices to install Mercurial on most
|
||||||
systems:
|
Unix systems:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
@ -113,8 +115,7 @@ sudo easy_install mercurial==2.0
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
On Ubuntu/Debian,
|
On Ubuntu/Debian, the Mercurial in your distribution's
|
||||||
the Mercurial in your distribution's
|
|
||||||
package repository is most likely old and broken.
|
package repository is most likely old and broken.
|
||||||
You might try this first:
|
You might try this first:
|
||||||
</p>
|
</p>
|
||||||
@ -122,7 +123,7 @@ You might try this first:
|
|||||||
<pre>apt-get install python-setuptools python-dev build-essential</pre>
|
<pre>apt-get install python-setuptools python-dev build-essential</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If that fails, try installing manually from the
|
If that fails, or if you use Windows, install manually from the
|
||||||
<a href="http://mercurial.selenic.com/wiki/Download">Mercurial Download</a>
|
<a href="http://mercurial.selenic.com/wiki/Download">Mercurial Download</a>
|
||||||
page.
|
page.
|
||||||
</p>
|
</p>
|
||||||
@ -253,23 +254,14 @@ Bugs can be reported using the <a href="http://code.google.com/p/go/issues/list"
|
|||||||
|
|
||||||
<h2 id="releases">Keeping up with releases</h2>
|
<h2 id="releases">Keeping up with releases</h2>
|
||||||
|
|
||||||
<p>
|
|
||||||
XXX TODO XXX
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The Go project maintains two stable tags in its Mercurial repository:
|
The Go project maintains two stable tags in its Mercurial repository:
|
||||||
<code>release</code> and <code>weekly</code>.
|
<code>release</code> and <code>weekly</code>.
|
||||||
The <code>weekly</code> tag is updated about once a week, and should be used by
|
|
||||||
those who want to track the project's development.
|
|
||||||
The <code>release</code> tag is given, less often, to those weekly releases
|
|
||||||
that have proven themselves to be robust.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Most Go users will want to keep their Go installation at the latest
|
The <code>release</code> tag refers to the current stable release of Go.
|
||||||
<code>release</code> tag.
|
Most Go users should use this version. New releases are announced on the
|
||||||
New releases are announced on the
|
|
||||||
<a href="http://groups.google.com/group/golang-announce">golang-announce</a>
|
<a href="http://groups.google.com/group/golang-announce">golang-announce</a>
|
||||||
mailing list.
|
mailing list.
|
||||||
</p>
|
</p>
|
||||||
@ -286,6 +278,8 @@ $ ./all.bash
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
The <code>weekly</code> tag is updated about once a week, and should be used
|
||||||
|
only by those who are actively working on the Go core.
|
||||||
To use the <code>weekly</code> tag run <code>hg update weekly</code> instead.
|
To use the <code>weekly</code> tag run <code>hg update weekly</code> instead.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@ -298,143 +292,123 @@ The Go compilation environment can be customized by environment variables.
|
|||||||
to override the defaults.
|
to override the defaults.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<dl>
|
<blockquote>
|
||||||
<dt>
|
|
||||||
<code>$GOROOT</code>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
<p>
|
|
||||||
XXX FONT IS WRONG IN THESE ENTRIES XXX
|
|
||||||
XXX I NEED SOME SPAN THING XXX
|
|
||||||
The root of the Go tree, often <code>$HOME/go</code>.
|
|
||||||
Its value is built into the tree when it is compiled, and
|
|
||||||
defaults to the parent of the directory where <code>all.bash</code> was run.
|
|
||||||
There is no need to set this unless you want to switch between multiple
|
|
||||||
local copies of the repository.
|
|
||||||
</p>
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
<dt>
|
<p><code>$GOROOT</code></p>
|
||||||
<code>$GOROOT_FINAL</code>
|
<p>
|
||||||
</dt>
|
The root of the Go tree, often <code>$HOME/go</code>.
|
||||||
<dd>
|
Its value is built into the tree when it is compiled, and
|
||||||
<p>
|
defaults to the parent of the directory where <code>all.bash</code> was run.
|
||||||
The value assumed by installed binaries and scripts when
|
There is no need to set this unless you want to switch between multiple
|
||||||
<code>$GOROOT</code> is not set explicitly.
|
local copies of the repository.
|
||||||
It defaults to the value of <code>$GOROOT</code>.
|
</p>
|
||||||
If you want to build the Go tree in one location
|
|
||||||
but move it elsewhere after the build, set
|
|
||||||
<code>$GOROOT_FINAL</code> to the eventual location.
|
|
||||||
</p>
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
<dt>
|
<p><code>$GOROOT_FINAL</code></p>
|
||||||
<code>$GOOS</code> and <code>$GOARCH</code>
|
<p>
|
||||||
</dt>
|
The value assumed by installed binaries and scripts when
|
||||||
<dd>
|
<code>$GOROOT</code> is not set explicitly.
|
||||||
<p>
|
It defaults to the value of <code>$GOROOT</code>.
|
||||||
The name of the target operating system and compilation architecture.
|
If you want to build the Go tree in one location
|
||||||
These default to the values of <code>$GOHOSTOS</code> and
|
but move it elsewhere after the build, set
|
||||||
<code>$GOHOSTARCH</code> respectively (described below).
|
<code>$GOROOT_FINAL</code> to the eventual location.
|
||||||
|
</p>
|
||||||
|
|
||||||
<p>
|
<p><code>$GOOS</code> and <code>$GOARCH</code></p>
|
||||||
Choices for <code>$GOOS</code> are
|
<p>
|
||||||
<code>darwin</code> (Mac OS X 10.5 and above), <code>freebsd</code>,
|
The name of the target operating system and compilation architecture.
|
||||||
<code>linux</code>, <code>netbsd</code>, <code>openbsd</code>,
|
These default to the values of <code>$GOHOSTOS</code> and
|
||||||
<code>plan9</code>, and <code>windows</code>.
|
<code>$GOHOSTARCH</code> respectively (described below).
|
||||||
Choices for <code>$GOARCH</code> are
|
|
||||||
<code>amd64</code> (64-bit x86, the most mature port),
|
|
||||||
<code>386</code> (32-bit x86), and <code>arm</code> (32-bit ARM).
|
|
||||||
The valid combinations of <code>$GOOS</code> and <code>$GOARCH</code> are:
|
|
||||||
<table cellpadding="0">
|
|
||||||
<tr>
|
|
||||||
<th width="50"><th align="left" width="100"><code>$GOOS</code></th> <th align="left" width="100"><code>$GOARCH</code></th> <th align="left"></th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td><td><code>darwin</code></td> <td><code>386</code></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td><td><code>darwin</code></td> <td><code>amd64</code></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td><td><code>freebsd</code></td> <td><code>386</code></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td><td><code>freebsd</code></td> <td><code>amd64</code></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td><td><code>linux</code></td> <td><code>386</code></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td><td><code>linux</code></td> <td><code>amd64</code></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td><td><code>linux</code></td> <td><code>arm</code></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td><td><code>netbsd</code></td> <td><code>386</code></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td><td><code>netbsd</code></td> <td><code>amd64</code></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td><td><code>openbsd</code></td> <td><code>386</code></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td><td><code>openbsd</code></td> <td><code>amd64</code></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td><td><code>plan9</code></td> <td><code>386</code></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td><td><code>windows</code></td> <td><code>386</code></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td><td><code>windows</code></td> <td><code>amd64</code></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
<dt>
|
<p>
|
||||||
<code>$GOHOSTOS</code> and <code>$GOHOSTARCH</code>
|
Choices for <code>$GOOS</code> are
|
||||||
</dt>
|
<code>darwin</code> (Mac OS X 10.5 and above), <code>freebsd</code>,
|
||||||
<dd>
|
<code>linux</code>, <code>netbsd</code>, <code>openbsd</code>,
|
||||||
<p>
|
<code>plan9</code>, and <code>windows</code>.
|
||||||
The name of the host operating system and compilation architecture.
|
Choices for <code>$GOARCH</code> are
|
||||||
These default to the local system's operating system and
|
<code>amd64</code> (64-bit x86, the most mature port),
|
||||||
architecture.
|
<code>386</code> (32-bit x86), and <code>arm</code> (32-bit ARM).
|
||||||
|
The valid combinations of <code>$GOOS</code> and <code>$GOARCH</code> are:
|
||||||
|
<table cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<th width="50"><th align="left" width="100"><code>$GOOS</code></th> <th align="left" width="100"><code>$GOARCH</code></th> <th align="left"></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td><td><code>darwin</code></td> <td><code>386</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td><td><code>darwin</code></td> <td><code>amd64</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td><td><code>freebsd</code></td> <td><code>386</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td><td><code>freebsd</code></td> <td><code>amd64</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td><td><code>linux</code></td> <td><code>386</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td><td><code>linux</code></td> <td><code>amd64</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td><td><code>linux</code></td> <td><code>arm</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td><td><code>netbsd</code></td> <td><code>386</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td><td><code>netbsd</code></td> <td><code>amd64</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td><td><code>openbsd</code></td> <td><code>386</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td><td><code>openbsd</code></td> <td><code>amd64</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td><td><code>plan9</code></td> <td><code>386</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td><td><code>windows</code></td> <td><code>386</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td><td><code>windows</code></td> <td><code>amd64</code></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
<p>
|
<p><code>$GOHOSTOS</code> and <code>$GOHOSTARCH</code></p>
|
||||||
Valid choices are the same as for <code>$GOOS</code> and
|
<p>
|
||||||
<code>$GOARCH</code>, listed above.
|
The name of the host operating system and compilation architecture.
|
||||||
The specified values must be compatible with the local system.
|
These default to the local system's operating system and
|
||||||
For example, you should not set <code>$GOHOSTARCH</code> to
|
architecture.
|
||||||
<code>arm</code> on an x86 system.
|
</p>
|
||||||
</dd>
|
|
||||||
|
|
||||||
<dt>
|
<p>
|
||||||
<code>$GOBIN</code>
|
Valid choices are the same as for <code>$GOOS</code> and
|
||||||
</dt>
|
<code>$GOARCH</code>, listed above.
|
||||||
<dd>
|
The specified values must be compatible with the local system.
|
||||||
<p>
|
For example, you should not set <code>$GOHOSTARCH</code> to
|
||||||
The location where binaries from the main repository will be installed.
|
<code>arm</code> on an x86 system.
|
||||||
XXX THIS MAY CHANGE TO BE AN OVERRIDE EVEN FOR GOPATH ENTRIES XXX
|
</p>
|
||||||
The default is <code>$GOROOT/bin</code>.
|
|
||||||
After installing, you will want to arrange to add this
|
|
||||||
directory to your <code>$PATH</code>, so you can use the tools.
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
<dt>
|
<p><code>$GOBIN</code>
|
||||||
<code>$GOARM</code> (arm, default=6)
|
<p>
|
||||||
</dt>
|
The location where binaries from the main repository will be installed.
|
||||||
<dd>
|
XXX THIS MAY CHANGE TO BE AN OVERRIDE EVEN FOR GOPATH ENTRIES XXX
|
||||||
<p>
|
The default is <code>$GOROOT/bin</code>.
|
||||||
The ARM architecture version the run-time libraries should target.
|
After installing, you will want to arrange to add this
|
||||||
Setting <code>$GOARM</code> to 5 causes the linker to emit calls
|
directory to your <code>$PATH</code>, so you can use the tools.
|
||||||
to a software floating point implementation instead of using
|
</p>
|
||||||
hardware floating point support.
|
|
||||||
</dd>
|
<p><code>$GOARM</code> (arm, default=6)</p>
|
||||||
</dl>
|
<p>
|
||||||
|
The ARM architecture version the run-time libraries should target.
|
||||||
|
Setting <code>$GOARM</code> to 5 causes the linker to emit calls
|
||||||
|
to a software floating point implementation instead of using
|
||||||
|
hardware floating point support.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</blockquote>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Note that <code>$GOARCH</code> and <code>$GOOS</code> identify the
|
Note that <code>$GOARCH</code> and <code>$GOOS</code> identify the
|
||||||
|
@ -114,7 +114,14 @@ Terminal sessions for the change to take effect.
|
|||||||
<h3 id="windows">Windows</h3>
|
<h3 id="windows">Windows</h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<font color="red">TODO: windows installation instructions.</font>
|
Open the <code>.msi</code> file and follow the prompts to install the Go tools.
|
||||||
|
By default, the installer puts the Go distribution in <code>c:\Go</code>.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The installer should put the <code>c:\Go\bin</code> directory in your
|
||||||
|
<code>PATH</code> environment variable. You may need to restart any open
|
||||||
|
command prompts for the change to take effect.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2 id="testing">Testing your installation</h2>
|
<h2 id="testing">Testing your installation</h2>
|
||||||
@ -173,8 +180,13 @@ idiomatic Go code.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
For the full story, consult Go's extensive
|
For the full story, consult Go's extensive <a href="/doc/">documentation</a>.
|
||||||
<a href="/doc/">documentation</a>.
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Subscribe to the
|
||||||
|
<a href="http://groups.google.com/group/golang-announce">golang-announce</a>
|
||||||
|
mailing list to be notified when a new stable version of Go is released.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user