Skip to content
Myr

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

4 files+113 added−50 removed

modified:src/README.md+1 added-49 removed
added:BUILD.md+106 added
1Building fzf2============34Build instructions5------------------67### Prerequisites89- `go` executable in $PATH1011### Using Makefile1213Makefile will set up and use its own `$GOPATH` under the project root.1415```sh16# Source files are located in src directory17cd src1819# Build fzf binary for your platform in src/fzf20make2122# Build fzf binary and copy it to bin directory23make install2425# Build 32-bit and 64-bit executables and tarballs26make release2728# Build executables and tarballs for Linux using Docker29make linux30```3132### Using `go get`3334Alternatively, you can build fzf directly with `go get` command without35cloning the repository.3637```sh38go get -u github.com/junegunn/fzf/src/fzf39```4041Build options42-------------4344### With ncurses 64546The official binaries of fzf are built with ncurses 5 because it's widely47supported by different platforms. However ncurses 5 is old and has a number of48limitations.49501. Does not support more than 256 color pairs (See [357][357])512. Does not support italics523. Does not support 24-bit color5354[357]: https://github.com/junegunn/fzf/issues/3575556But you can manually build fzf with ncurses 6 to overcome some of these57limitations. ncurses 6 supports up to 32767 color pairs (1), and supports58italics (2). To build fzf with ncurses 6, you have to install it first. On59macOS, you can use Homebrew to install it.6061```sh62brew install homebrew/dupes/ncurses63LDFLAGS="-L/usr/local/opt/ncurses/lib" make install64```6566### With tcell6768[tcell][tcell] is a portable alternative to ncurses and we currently use it to69build Windows binaries. tcell has many benefits but most importantly, it70supports 24-bit colors. To build fzf with tcell:7172```sh73TAGS=tcell make install74```7576However, note that tcell has its own issues.7778- 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 displayed8283Third-party libraries used84--------------------------8586- [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)9596License97-------9899[MIT](LICENSE)100101[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/tcell
modified:CHANGELOG.md+1 added-1 removed
12 unmodified lines
13 - 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.md18190.15.820------21- Updated ANSI processor to handle more VT-100 escape sequences
502 unmodified lines
modified:README.md+5 added
89 unmodified lines
90flawlessly.9192[wsl]: https://blogs.msdn.microsoft.com/wsl/9394Building fzf95------------9697See [BUILD.md](BUILD.md).9899Usage100-----101102fzf will launch curses-based finder, read the list from STDIN, and write the
350 unmodified lines