diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index 65b8a9193..e465cc707 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -14,6 +14,11 @@ PRs when it's a visual change. #### Features 🚀 +- Windows support has landed! See [./docs/INSTALL.md](./docs/INSTALL.md#windows) for usage + instructions. [#96](https://github.com/terrastruct/d2/issues/96) + +Screenshot 2022-12-06 at 2 55 27 AM + - Sequence diagrams are now supported, experimentally. See [docs](https://d2lang.com/tour/sequence-diagrams). [#99](https://github.com/terrastruct/d2/issues/99) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 86b7e7bad..22af59e05 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -11,6 +11,8 @@ You may install `d2` through any of the following methods. - PREFIX - From source - Source Release +- Windows + - MSYS2 - Coming soon ## install.sh @@ -150,10 +152,42 @@ fonts and icons. Furthermore, when installing a non versioned commit, installing release will ensure that `d2 --version` works correctly by embedding the commit hash into the `d2` binary. +## Windows + +d2 builds and runs on Windows: + +We have prebuilt standalone releases for Windows though they're structured in the same way +as our Unix releases. So after extracting a release, you'll have to manually put the d2 +binary into your `$PATH` or add the `bin` directory of the release into your `$PATH`. + +See https://www.wikihow.com/Change-the-PATH-Environment-Variable-on-Windows + +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 +your `$PATH` for you. + +### MSYS2 + +Screenshot 2022-12-06 at 2 55 27 AM + +We recommend using [MSYS2](https://www.msys2.org/) or [Git +Bash](https://gitforwindows.org/#bash) (Git Bash is based on MSYS2) for an improved +terminal experience. + +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 +installation of our standalone releases via `make install` and makes the manpage +accessible via `man d2`. + +The MSYS2 terminal also enables `d2` to display colors like in the above screenshot. + +In addition, all of our development and CI scripts work under MSYS2 whereas they do not +under plain Windows. + ## Coming soon - Docker image -- Windows install - rpm and deb packages - with repositories and standalone - homebrew core