forked from nmap/npcap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_include.bat
26 lines (15 loc) · 925 Bytes
/
create_include.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
@echo off
IF "%2"=="" (set WPDPACKDESTDIR=.\npcap-sdk\) ELSE (set WPDPACKDESTDIR=%2)
IF ""=="%1" (set WINPCAPSOURCEDIR=.\) ELSE (set WINPCAPSOURCEDIR=%1)
echo Creating \Include folder
mkdir %WPDPACKDESTDIR% 2>nul >nul
mkdir %WPDPACKDESTDIR%\Include 2>nul >nul
mkdir %WPDPACKDESTDIR%\Include\pcap 2>nul >nul
rem xcopy /v /Y %WINPCAPSOURCEDIR%\wpcap\libpcap\pcap\*.h %WPDPACKDESTDIR%\Include\pcap\ >nul
SETLOCAL ENABLEEXTENSIONS
for /F "usebackq tokens=2* delims==" %%i in (`C:\cygwin\bin\make.exe -p -q -f Makefile.in -C "%WINPCAPSOURCEDIR%\wpcap\libpcap" ^| findstr /b "PUBHDR"`) do set PUBHDR=%%i
for %%i in (%PUBHDR:/=\%) do copy /v /Y "%WINPCAPSOURCEDIR%\wpcap\libpcap\%%i" "%WPDPACKDESTDIR%\Include\%%i"
xcopy /v /Y %WINPCAPSOURCEDIR%\Common\Packet32.h %WPDPACKDESTDIR%\Include\ >nul
echo Folder \Include created successfully
set WPDPACKDESTDIR=
set WINPCAPSOURCEDIR=