Add BUILD.md
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Junegunn Choi · committed by Junegunn Choi · parent a71c471 · Browse files · 4 files·+113 added−50 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+113 added−50 removed
- other:+113 added−50 removed
Provenance
- Commit
6702671- Tree
59d6fbc- Author
Junegunn Choi <junegunn.c@gmail.com>- Committer
Junegunn Choi <junegunn.c@gmail.com>- Parent
a71c471
4 files changed+113 added−50 removed
modified:src/README.md+1 added-49 removed
48 unmodified lines495051525354555354575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011025556575837 unmodified lines48 unmodified lines
Build-----
```sh# Build fzf executables and tarballsmake releaseSee [BUILD.md](../BUILD.md)
# Install the executable to ../bin directorymake install
# Build executables and tarballs for Linux using Dockermake linux```
### With ncurses 6
The official binaries of fzf are built with ncurses 5 because it's widelysupported by different platforms. However ncurses 5 is old and has a number oflimitations.
1. Does not support more than 256 color pairs (See [357][357])2. Does not support italics3. Does not support 24-bit color
[357]: https://github.com/junegunn/fzf/issues/357
But you can manually build fzf with ncurses 6 to overcome some of theselimitations. ncurses 6 supports up to 32767 color pairs (1), and supportsitalics (2). To build fzf with ncurses 6, you have to install it first. OnmacOS, you can use Homebrew to install it.
```shbrew install homebrew/dupes/ncursesLDFLAGS="-L/usr/local/opt/ncurses/lib" make install```
### With tcell
[tcell][tcell] is a portable alternative to ncurses and we currently use it tobuild Windows binaries. tcell has many benefits but most importantly, itsupports 24-bit colors. To build fzf with tcell:
```shTAGS=tcell make install```
However, note that tcell has its own issues.
- Poor rendering performance compared to ncurses- Does not support bracketed-paste mode- Does not support italics unlike ncurses 6- Some wide characters are not correctly displayed
Test----
Unit tests can be run with `make test`. Integration tests are written in Ruby37 unmodified linesadded:BUILD.md+106 added
1+Building fzf2+============3+4+Build instructions5+------------------6+7+### Prerequisites8+9+- `go` executable in $PATH10+11+### Using Makefile12+13+Makefile will set up and use its own `$GOPATH` under the project root.14+15+```sh16+# Source files are located in src directory17+cd src18+19+# Build fzf binary for your platform in src/fzf20+make21+22+# Build fzf binary and copy it to bin directory23+make install24+25+# Build 32-bit and 64-bit executables and tarballs26+make release27+28+# Build executables and tarballs for Linux using Docker29+make linux30+```31+32+### Using `go get`33+34+Alternatively, you can build fzf directly with `go get` command without35+cloning the repository.36+37+```sh38+go get -u github.com/junegunn/fzf/src/fzf39+```40+41+Build options42+-------------43+44+### With ncurses 645+46+The official binaries of fzf are built with ncurses 5 because it's widely47+supported by different platforms. However ncurses 5 is old and has a number of48+limitations.49+50+1. Does not support more than 256 color pairs (See [357][357])51+2. Does not support italics52+3. Does not support 24-bit color53+54+[357]: https://github.com/junegunn/fzf/issues/35755+56+But you can manually build fzf with ncurses 6 to overcome some of these57+limitations. ncurses 6 supports up to 32767 color pairs (1), and supports58+italics (2). To build fzf with ncurses 6, you have to install it first. On59+macOS, you can use Homebrew to install it.60+61+```sh62+brew install homebrew/dupes/ncurses63+LDFLAGS="-L/usr/local/opt/ncurses/lib" make install64+```65+66+### With tcell67+68+[tcell][tcell] is a portable alternative to ncurses and we currently use it to69+build Windows binaries. tcell has many benefits but most importantly, it70+supports 24-bit colors. To build fzf with tcell:71+72+```sh73+TAGS=tcell make install74+```75+76+However, note that tcell has its own issues.77+78+- Poor rendering performance compared to ncurses79+- Does not support bracketed-paste mode80+- Does not support italics unlike ncurses 681+- Some wide characters are not correctly displayed82+83+Third-party libraries used84+--------------------------85+86+- [ncurses][ncurses]87+- [mattn/go-runewidth](https://github.com/mattn/go-runewidth)88+ - Licensed under [MIT](http://mattn.mit-license.org)89+- [mattn/go-shellwords](https://github.com/mattn/go-shellwords)90+ - Licensed under [MIT](http://mattn.mit-license.org)91+- [mattn/go-isatty](https://github.com/mattn/go-isatty)92+ - Licensed under [MIT](http://mattn.mit-license.org)93+- [tcell](https://github.com/gdamore/tcell)94+ - Licensed under [Apache License 2.0](https://github.com/gdamore/tcell/blob/master/LICENSE)95+96+License97+-------98+99+[MIT](LICENSE)100+101+[install]: https://github.com/junegunn/fzf#installation102+[go]: https://golang.org/103+[gil]: http://en.wikipedia.org/wiki/Global_Interpreter_Lock104+[ncurses]: https://www.gnu.org/software/ncurses/105+[req]: http://golang.org/doc/install106+[tcell]: https://github.com/gdamore/tcellmodified:CHANGELOG.md+1 added-1 removed
12 unmodified lines13 - Supports more than 256 color pairs14 - Supports italics15 - *tcell*16 - 24-bit color support17- - See https://github.com/junegunn/fzf/blob/master/src/README.md#build17+ - See https://github.com/junegunn/fzf/blob/master/BUILD.md18 19 0.15.820 ------21 - Updated ANSI processor to handle more VT-100 escape sequences502 unmodified linesmodified:README.md+5 added
89 unmodified lines90 flawlessly.91 92 [wsl]: https://blogs.msdn.microsoft.com/wsl/93 94+Building fzf95+------------96+97+See [BUILD.md](BUILD.md).98+99 Usage100 -----101 102 fzf will launch curses-based finder, read the list from STDIN, and write the350 unmodified lines