raw
current commit
211202.1.1 · ugrep - easy building from Visual Studio 2019+

How to build ugrep with Microsoft Visual Studio

The following instructions apply to MSVC++ 2019 or greater.

Base-UGREP

The resulting binary will be in ...\ugrep\msvc\bin\Base-(configuration)\ugrep.exe.

Pcre-UGREP

To add support for PCRE2 regular expressions (use PCRE2 for the -P option) and for searching within compressed files, you’ll need to download and extract additional sources for the required external libraries. For each library described below, you’ll need to download the library, extract it, rename the library folder to remove the library version number, and move the library folder next to the ugrep folder.

For example, if my ugrep source code is in D:\sources\ugrep, I would download pcre2-10.39.tar.bz2, use tar xf pcre2-10.39.tar.bz2 to extract it (creating a folder named pcre2-10.39), then I would run move pcre2-10.39 D:\sources\pcre2 to move and rename the folder.

You should now be able to build the Pcre-Debug and Pcre-Release configurations. The resulting binary will be in ...\ugrep\msvc\bin\Pcre-(configuration)\ugrep.exe.

Boost-UGREP

To add support for Boost regular expressions (use Boost-RegEx for the -P option) and for searching within compressed files, you’ll need to follow the instructions for Pcre-UGREP and then use the following steps to enable Boost.

You should now be able to build the Boost-Debug and Boost-Release configurations. The resulting binary will be in ...\ugrep\msvc\bin\Boost-(configuration)\ugrep.exe.