Skip to content

Commit a7d7de0

Browse files
authored
[skip changelog] Clarify installation instructions for Windows (#706)
* [skip changelog] Document the install script's compatibility with Windows It's already quite clear that the Homebrew installation method is not available for Windows, so the first option for Windows users is the install script, which is also not well supported on Windows. * [skip changelog] Make the PATH instructions more prominent in the installation docs Although the installation script does recommend adding Arduino CLI to PATH, I though it worth providing an explanation of why in installation instructions. I combined the various download sources into sub-headings of a single "Download" installation option section so that the PATH instructions could be provided prominently only once for that installation option.
1 parent 097212f commit a7d7de0

File tree

1 file changed

+27
-14
lines changed

1 file changed

+27
-14
lines changed

docs/installation.md

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,37 @@ brew install arduino-cli
1010

1111
### Use the install script
1212

13-
The easiest way to get the latest version of the Arduino CLI on any
14-
supported platform is using the `install.sh` script:
13+
The script requires `sh`. This is always available on Linux and macOS. `sh` is
14+
not available by default on Windows. The script may be run on Windows by
15+
installing [Git for Windows], then running it from Git Bash.
16+
17+
This script will install the latest version of Arduino CLI to `$PWD/bin`:
1518

1619
```sh
1720
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
1821
```
1922

20-
The script will install `arduino-cli` at `$PWD/bin` but if you want to target a
21-
different directory, for example `~/local/bin`, set the `BINDIR` environment
22-
variable like this:
23+
If you want to target a different directory, for example `~/local/bin`, set the
24+
`BINDIR` environment variable like this:
2325

2426
```sh
2527
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=~/local/bin sh
2628
```
2729

28-
### Download the latest packages
30+
If you would like to use the `arduino-cli` command from any location, install
31+
Arduino CLI to a directory already in your `PATH` or add the Arduino CLI
32+
installation path to your `PATH` environment variable.
33+
34+
### Download
35+
36+
Pre-built binaries for all the supported platforms are available for download
37+
from the links below.
38+
39+
If you would like to use the `arduino-cli` command from any location, extract
40+
the downloaded file to a directory already in your `PATH` or add the Arduino CLI
41+
installation path to your `PATH` environment variable.
2942

30-
You can download the latest version of the pre-built binaries for the supported
31-
platforms from the [release page](https://github.com/arduino/arduino-cli/releases)
32-
or following the links in the following table. Once downloaded, extract the
33-
binary `arduino-cli` into a directory that is in your `PATH`.
43+
#### Latest packages
3444

3545
Platform | | |
3646
--------- | ------------------ | ------------------ |
@@ -52,7 +62,11 @@ Mac OSX | | [Mac OSX] |
5262
won’t be further updated. That URL will provide the version
5363
`0.3.7-alpha.preview`, regardless of further releases.
5464

55-
### Download a nightly build
65+
#### Previous versions
66+
67+
These are available from the [releases page](https://github.com/arduino/arduino-cli/releases)
68+
69+
#### Nightly builds
5670

5771
These builds are generated everyday at 01:00 GMT from the `master` branch and
5872
should be considered unstable. In order to get the latest nightly build
@@ -81,9 +95,6 @@ Mac OSX | | [Mac OSX] |
8195
Checksums for the nightly builds are available at
8296
`https://downloads.arduino.cc/arduino-cli/nightly/nightly-<DATE>-checksums.txt`
8397

84-
Once downloaded, extract the executable `arduino-cli` into a directory
85-
which is in your ``PATH``.
86-
8798
### Build from source
8899

89100
If you’re familiar with Golang or if you want to contribute to the
@@ -100,3 +111,5 @@ docker run -v $PWD:/arduino-cli -w /arduino-cli -e PACKAGE_NAME_PREFIX='snapshot
100111

101112
Once the build is over, you will find a `./dist/` folder containing the packages
102113
built out of the current source tree.
114+
115+
[Git for Windows]: https://gitforwindows.org/

0 commit comments

Comments
 (0)