compile PCRE on Windows

This commit is contained in:
Vladimir Dubrovin 2026-03-27 19:01:48 +03:00
parent c2f381d0cc
commit 2e5dcb510b
5 changed files with 33 additions and 30 deletions

View File

@ -41,6 +41,9 @@ jobs:
- name: ln Windows - name: ln Windows
if: ${{ startsWith(matrix.target, 'windows') }} if: ${{ startsWith(matrix.target, 'windows') }}
run: copy Makefile.win Makefile run: copy Makefile.win Makefile
- name: install Windows libraries
if: ${{ startsWith(matrix.target, 'windows') }}
run: vcpkg install pcre:x64-windows
- name: dirs Windows - name: dirs Windows
if: ${{ startsWith(matrix.target, 'windows') }} if: ${{ startsWith(matrix.target, 'windows') }}
run: cmd /C 'echo LIBS := -L "c:/program files/openssl/lib/VC/x64/MT" $(LIBS) >>Makefile.win && echo CFLAGS := -I "c:/program files/openssl/include" $(CFLAGS) >>Makefile.win && type Makefile.win && dir "c:/program files/openssl/lib"' run: cmd /C 'echo LIBS := -L "c:/program files/openssl/lib/VC/x64/MT" $(LIBS) >>Makefile.win && echo CFLAGS := -I "c:/program files/openssl/include" $(CFLAGS) >>Makefile.win && type Makefile.win && dir "c:/program files/openssl/lib"'

View File

@ -28,7 +28,7 @@ REMOVECOMMAND = del
TYPECOMMAND = type TYPECOMMAND = type
COMPATLIBS = COMPATLIBS =
MAKEFILE = Makefile.msvc MAKEFILE = Makefile.msvc
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin FilePlugin SSLPlugin PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin FilePlugin SSLPlugin PCREPlugin
VERFILE = 3proxy.res $(VERFILE) VERFILE = 3proxy.res $(VERFILE)
VERSION = $(VERSION) VERSION = $(VERSION)
VERSIONDEP = 3proxy.res $(VERSIONDEP) VERSIONDEP = 3proxy.res $(VERSIONDEP)

View File

@ -31,7 +31,7 @@ TYPECOMMAND = type
COMPATLIBS = COMPATLIBS =
VERFILE = 3proxy.res $(VERFILE) VERFILE = 3proxy.res $(VERFILE)
VERSIONDEP = 3proxy.res $(VERSIONDEP) VERSIONDEP = 3proxy.res $(VERSIONDEP)
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin FilePlugin SSLPlugin PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin FilePlugin SSLPlugin PCREPlugin
AFTERCLEAN = del src\*.res AFTERCLEAN = del src\*.res
include Makefile.inc include Makefile.inc

View File

@ -28,7 +28,7 @@ REMOVECOMMAND = del 2>NUL >NUL
TYPECOMMAND = type TYPECOMMAND = type
COMPATLIBS = COMPATLIBS =
MAKEFILE = Makefile.msvcARM64 MAKEFILE = Makefile.msvcARM64
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin FilePlugin SSLPlugin PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin FilePlugin SSLPlugin PCREPlugin
VERFILE = 3proxy.res $(VERFILE) VERFILE = 3proxy.res $(VERFILE)
VERSIONDEP = 3proxy.res $(VERSIONDEP) VERSIONDEP = 3proxy.res $(VERSIONDEP)
AFTERCLEAN = del src\*.res AFTERCLEAN = del src\*.res

View File

@ -41,33 +41,33 @@ static struct pcreopt {
int value; int value;
} pcreopts[]= { } pcreopts[]= {
{"PCRE_CASELESS", 0x00000001}, {"PCRE_CASELESS", PCRE_CASELESS},
{"PCRE_MULTILINE", 0x00000002}, {"PCRE_MULTILINE", PCRE_MULTILINE},
{"PCRE_DOTALL", 0x00000004}, {"PCRE_DOTALL", PCRE_DOTALL},
{"PCRE_EXTENDED", 0x00000008}, {"PCRE_EXTENDED", PCRE_EXTENDED},
{"PCRE_ANCHORED", 0x00000010}, {"PCRE_ANCHORED", PCRE_ANCHORED},
{"PCRE_DOLLAR_ENDONLY", 0x00000020}, {"PCRE_DOLLAR_ENDONLY", PCRE_DOLLAR_ENDONLY},
{"PCRE_EXTRA", 0x00000040}, {"PCRE_EXTRA", PCRE_EXTRA},
{"PCRE_NOTBOL", 0x00000080}, {"PCRE_NOTBOL", PCRE_NOTBOL},
{"PCRE_NOTEOL", 0x00000100}, {"PCRE_NOTEOL", PCRE_NOTEOL},
{"PCRE_UNGREEDY", 0x00000200}, {"PCRE_UNGREEDY", PCRE_UNGREEDY},
{"PCRE_NOTEMPTY", 0x00000400}, {"PCRE_NOTEMPTY", PCRE_NOTEMPTY},
{"PCRE_UTF8", 0x00000800}, {"PCRE_UTF8", PCRE_UTF8},
{"PCRE_NO_AUTO_CAPTURE", 0x00001000}, {"PCRE_NO_AUTO_CAPTURE", PCRE_NO_AUTO_CAPTURE},
{"PCRE_NO_UTF8_CHECK", 0x00002000}, {"PCRE_NO_UTF8_CHECK", PCRE_NO_UTF8_CHECK},
{"PCRE_AUTO_CALLOUT", 0x00004000}, {"PCRE_AUTO_CALLOUT", PCRE_AUTO_CALLOUT},
{"PCRE_PARTIAL", 0x00008000}, {"PCRE_PARTIAL", PCRE_PARTIAL},
{"PCRE_DFA_SHORTEST", 0x00010000}, {"PCRE_DFA_SHORTEST", PCRE_DFA_SHORTEST},
{"PCRE_DFA_RESTART", 0x00020000}, {"PCRE_DFA_RESTART", PCRE_DFA_RESTART},
{"PCRE_FIRSTLINE", 0x00040000}, {"PCRE_FIRSTLINE", PCRE_FIRSTLINE},
{"PCRE_DUPNAMES", 0x00080000}, {"PCRE_DUPNAMES", PCRE_DUPNAMES},
{"PCRE_NEWLINE_CR", 0x00100000}, {"PCRE_NEWLINE_CR", PCRE_NEWLINE_CR},
{"PCRE_NEWLINE_LF", 0x00200000}, {"PCRE_NEWLINE_LF", PCRE_NEWLINE_LF},
{"PCRE_NEWLINE_CRLF", 0x00300000}, {"PCRE_NEWLINE_CRLF", PCRE_NEWLINE_CRLF},
{"PCRE_NEWLINE_ANY", 0x00400000}, {"PCRE_NEWLINE_ANY", PCRE_NEWLINE_ANY},
{"PCRE_NEWLINE_ANYCRLF", 0x00500000}, {"PCRE_NEWLINE_ANYCRLF", PCRE_NEWLINE_ANYCRLF},
{"PCRE_BSR_ANYCRLF", 0x00800000}, {"PCRE_BSR_ANYCRLF", PCRE_BSR_ANYCRLF},
{"PCRE_BSR_UNICODE", 0x01000000}, {"PCRE_BSR_UNICODE", PCRE_BSR_UNICODE},
{NULL, 0} {NULL, 0}
}; };