This repository contains the necessary references and instructions to build PCRE (specifically PCRE2), from scratch, on a fresh Windows installation. The default build creates both 32-bit and 64-bit executables, built with the ANYCRLF end-of-line matching and "Just-In-Time" compilation options.
PowerShell v3.0+ (included with Windows 8, or later)
To install PowerShell 3.0 for Windows 7, see MS: Installing Windows PowerShell on Windows 7 and Windows Server 2008 R2 [@] or How to install/configure Powershell 3.0 in Windows 7 SP1 [@].
Microsoft also provides testing VMs for multiple OS/VMhost/IE combinations at MS: Download VMs; see Making Internet Explorer Testing Easier with new IE VMs [@]. The downloads can be used to create VMs which are licensed and fully functional for 90 days, after which the specific instance will expire. But the downloads can be used to recreate a new VM at any time, offering a continually free testing environment. Either the "Edge on Win10" or the "IE11 on Win8.1" VM will work easily out-of-the-box for this build.
Start with a fresh basic installation of Windows with PowerShell 3.0+. From a shell (either CMD or PowerShell):
-
install the CMD-friendly fork of
scoop
-
CMD Shell ·
C:\>
powershell -command "iex (new-object net.webclient).downloadstring( 'https://raw.github.com/rivy/scoop/master/bin/install.ps1' )" set PATH=%PATH%;%LOCALAPPDATA%\scoop\shims
-
PowerShell ·
PS C:\>
iex (new-object net.webclient).downloadstring( 'https://raw.github.com/rivy/scoop/master/bin/install.ps1' )
-
-
install support applications via
scoop
scoop install cmake git make scoop bucket add rivy "https://github.com/rivy/scoop-bucket" scoop install rivy/gcc
-
clone the PCRE repository into PCRE_REPO_DIR
git clone --recursive "https://github.com/rivy/PCRE.git" "PCRE_REPO_DIR"
-
build PCRE
cd "PCRE_REPO_DIR" .\build.bat
build.bat
uses cmake
and make
to configure and build PCRE. The build script reads the source code from a mirror of the PCRE2 SVN repository (in ".\PCRE2-mirror") and compiles all artifacts, out-of-source, into the ".@build" subdirectory.
Using a subsequent .\build.bat realclean
or git clean -fd
will remove all build artifacts.
Further configuration/customization of the build can be accomplished via user-configurable CMAKE build properties, which are detailed and annotated within build.bat
.