Update windows install docs
This commit is contained in:
parent
3134648273
commit
44c11a13ce
2 changed files with 22 additions and 18 deletions
|
|
@ -19,23 +19,27 @@ ensure_os
|
||||||
if [ "$OS" = windows ]; then
|
if [ "$OS" = windows ]; then
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
|
||||||
We currently do not have a .msi for automatic installation on Windows so this release is
|
We currently do not have an \`.msi\` for automatic installation on Windows so this release
|
||||||
structured the same as our Unix releases.
|
is structured the same as our Unix releases.
|
||||||
|
|
||||||
Easiest way to use d2 on Windows is to just cd into the bin directory of this release
|
Easiest way to use d2 on Windows is to just \`chdir\` into the bin directory of this release
|
||||||
and invoke d2 like \`./d2.exe <full-input-file-path>\`
|
and invoke d2 like \`./d2 <full-input-file-path>\`
|
||||||
|
|
||||||
You can install on Windows with [MSYS2](https://www.msys2.org/) which emulates a Linux
|
For installation you'll have to add the \`./bin/d2.exe\` binary to your \`\$PATH\`. Or add
|
||||||
shell for Windows. It also enables d2 to show colors in its output.
|
the \`./bin\` directory of this release to your \`\$PATH\`.
|
||||||
|
|
||||||
But if you must install on Windows without MSYS2, for now you'll have to add the d2 binary
|
See https://www.wikihow.com/Change-the-PATH-Environment-Variable-on-Windows
|
||||||
in \`./bin/d2.exe\` to your \`\$PATH\` manually. Or you can add the \`./bin\` directory to
|
|
||||||
your \`\$PATH\`.
|
Then you'll be able to call \`d2\` from the commandline in \`cmd.exe\` or \`pwsh.exe\`.
|
||||||
|
|
||||||
We intend to have a \`.msi\` release installer sometime soon that handles putting \`d2\` into
|
We intend to have a \`.msi\` release installer sometime soon that handles putting \`d2\` into
|
||||||
your \`\$PATH\` for you.
|
your \`\$PATH\` for you.
|
||||||
|
|
||||||
See https://www.wikihow.com/Change-the-PATH-Environment-Variable-on-Windows
|
You can also use \`make install\` to install on Windows after first installing
|
||||||
|
[MSYS2](https://www.msys2.org/) which emulates a Linux shell for Windows. Its terminal
|
||||||
|
also enables d2 to show colors in its output. The manpage will also become accessible
|
||||||
|
with \`man d2\`.
|
||||||
|
|
||||||
See https://github.com/terrastruct/d2/blob/master/docs/INSTALL.md#windows
|
See https://github.com/terrastruct/d2/blob/master/docs/INSTALL.md#windows
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ go install oss.terrastruct.com/d2@latest
|
||||||
|
|
||||||
### Source Release
|
### Source Release
|
||||||
|
|
||||||
To install a proper release from source clone the repository and then:
|
To install a release from source clone the repository and then:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
./ci/release/build.sh --install
|
./ci/release/build.sh --install
|
||||||
|
|
@ -149,9 +149,9 @@ To install a proper release from source clone the repository and then:
|
||||||
```
|
```
|
||||||
|
|
||||||
Installing a real release will also install manpages and in the future other assets like
|
Installing a real release will also install manpages and in the future other assets like
|
||||||
fonts and icons. Furthermore, when installing a non versioned commit, installing a proper
|
fonts and icons. Furthermore, when installing a non versioned commit, installing a release
|
||||||
release will ensure that `d2 --version` works correctly by embedding the commit hash into
|
will ensure that `d2 --version` works correctly by embedding the commit hash into the `d2`
|
||||||
the `d2` binary.
|
binary.
|
||||||
|
|
||||||
## Windows
|
## Windows
|
||||||
|
|
||||||
|
|
@ -160,10 +160,10 @@ d2 builds and runs on Windows:
|
||||||
We have prebuilt standalone releases for Windows though they're structured in the same way
|
We have prebuilt standalone releases for Windows though they're structured in the same way
|
||||||
as our Unix releases.
|
as our Unix releases.
|
||||||
|
|
||||||
Easiest way to use d2 on Windows is to just cd into the bin directory of the release after
|
Easiest way to use d2 on Windows is to just `chdir` into the bin directory of the release
|
||||||
extracting it and invoking d2 like `./d2.exe <full-input-file-path>`
|
and invoke d2 like `./d2 <full-input-file-path>`
|
||||||
|
|
||||||
For installation, you'll have to manually put the d2 binary into your `$PATH` or add the
|
For installation, you'll have to put the `bin/d2.exe` binary into your `$PATH` or add the
|
||||||
`bin` directory of the release into your `$PATH`.
|
`bin` directory of the release into your `$PATH`.
|
||||||
|
|
||||||
See https://www.wikihow.com/Change-the-PATH-Environment-Variable-on-Windows
|
See https://www.wikihow.com/Change-the-PATH-Environment-Variable-on-Windows
|
||||||
|
|
@ -182,7 +182,7 @@ Bash](https://gitforwindows.org/#bash) (Git Bash is based on MSYS2) for an impro
|
||||||
terminal experience.
|
terminal experience.
|
||||||
|
|
||||||
MSYS2 provides a unix style shell environment that is native to Windows (unlike
|
MSYS2 provides a unix style shell environment that is native to Windows (unlike
|
||||||
[Cygwin](https://www.cygwin.com/)). MSYS2 allows `install.sh` to work, enables proper
|
[Cygwin](https://www.cygwin.com/)). MSYS2 allows `install.sh` to work, enables automatic
|
||||||
installation of our standalone releases via `make install` and makes the manpage
|
installation of our standalone releases via `make install` and makes the manpage
|
||||||
accessible via `man d2`.
|
accessible via `man d2`.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue