Skip to content

Commit

Permalink
Added the scripts to make a zip of all PDB files, named npcap-nmap-<V…
Browse files Browse the repository at this point in the history
…ersion>-<Revision>-DebugSymbols.zip. This will help debugging old versions of Npcap binaries.
  • Loading branch information
hsluoyz committed Feb 28, 2016
1 parent f6a61b1 commit 99a546c
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*.aps
*.pdb
*.exe
*.zip
*.ilk
*.obj
*.user
Expand Down
38 changes: 38 additions & 0 deletions installer/Deploy_Symbols.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

set PDB_FOLDER_NAME=npcap-DebugSymbols
set PDB_ZIP_NAME=npcap-nmap-0.05-DebugSymbols.zip
set ARCHIVE_7ZIP_TOOL="C:\Program Files\7-Zip\7z.exe"

set DRIVER_NAME=npcap
set DEPLOY_FOLDER_NAME=win7_above
set VISTA_DEPLOY_FOLDER_NAME=vista
set VS_CONFIG_MODE=
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Copy PDB files for Npcap driver
xcopy /Y "..\packetWin7\npf\Win7 Release%VS_CONFIG_MODE%\%DRIVER_NAME%.pdb" .\%PDB_FOLDER_NAME%\%DEPLOY_FOLDER_NAME%\x86\
xcopy /Y "..\packetWin7\npf\x64\Win7 Release%VS_CONFIG_MODE%\%DRIVER_NAME%.pdb" .\%PDB_FOLDER_NAME%\%DEPLOY_FOLDER_NAME%\x64\
xcopy /Y "..\packetWin7\npf\Vista Release%VS_CONFIG_MODE%\%DRIVER_NAME%.pdb" .\%PDB_FOLDER_NAME%\%VISTA_DEPLOY_FOLDER_NAME%\x86\
xcopy /Y "..\packetWin7\npf\x64\Vista Release%VS_CONFIG_MODE%\%DRIVER_NAME%.pdb" .\%PDB_FOLDER_NAME%\%VISTA_DEPLOY_FOLDER_NAME%\x64\

:: Copy PDB files for Packet.dll
xcopy /Y "..\packetWin7\Dll\Project\Release No NetMon and AirPcap%VS_CONFIG_MODE%\Packet.pdb" .\%PDB_FOLDER_NAME%\%DEPLOY_FOLDER_NAME%\x86\
xcopy /Y "..\packetWin7\Dll\Project\x64\Release No NetMon and AirPcap%VS_CONFIG_MODE%\Packet.pdb" .\%PDB_FOLDER_NAME%\%DEPLOY_FOLDER_NAME%\x64\

:: Copy PDB files for NPFInstall.exe
xcopy /Y "..\packetWin7\NPFInstall\Release%VS_CONFIG_MODE%\NPFInstall.pdb" .\%PDB_FOLDER_NAME%\%DEPLOY_FOLDER_NAME%\x86\
xcopy /Y "..\packetWin7\NPFInstall\x64\Release%VS_CONFIG_MODE%\NPFInstall.pdb" .\%PDB_FOLDER_NAME%\%DEPLOY_FOLDER_NAME%\x64\

:: Copy PDB files for NPcapHelper.exe
xcopy /Y "..\packetWin7\Helper\release\NPcapHelper.pdb" .\%PDB_FOLDER_NAME%\%DEPLOY_FOLDER_NAME%\x86\
xcopy /Y "..\packetWin7\Helper\x64\release\NPcapHelper.pdb" .\%PDB_FOLDER_NAME%\%DEPLOY_FOLDER_NAME%\x64\

:: Npcap uses the original WinPcap wpcap.dll with exactly the same code, we just changed the version number.
:: Copy PDB files for wpcap.dll
xcopy /Y "..\wpcap\PRJ\Release No AirPcap\x86\wpcap.pdb" .\%PDB_FOLDER_NAME%\
xcopy /Y "..\wpcap\PRJ\Release No AirPcap\x64\wpcap.pdb" .\%PDB_FOLDER_NAME%\x64\

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Generate the zip package for the PDB files using 7-Zip, make sure you installed 7-Zip first.
%ARCHIVE_7ZIP_TOOL% a %PDB_ZIP_NAME% .\%PDB_FOLDER_NAME%\*

pause
38 changes: 38 additions & 0 deletions installer/Deploy_Symbols_WinPcap.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

set PDB_FOLDER_NAME=npcap-DebugSymbols
set PDB_ZIP_NAME=npcap-nmap-0.05-DebugSymbols.zip
set ARCHIVE_7ZIP_TOOL="C:\Program Files\7-Zip\7z.exe"

set DRIVER_NAME=npf
set DEPLOY_FOLDER_NAME=win7_above_winpcap
set VISTA_DEPLOY_FOLDER_NAME=vista_winpcap
set VS_CONFIG_MODE=(WinPcap Mode)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Copy PDB files for Npcap driver
xcopy /Y "..\packetWin7\npf\Win7 Release%VS_CONFIG_MODE%\%DRIVER_NAME%.pdb" .\%PDB_FOLDER_NAME%\%DEPLOY_FOLDER_NAME%\x86\
xcopy /Y "..\packetWin7\npf\x64\Win7 Release%VS_CONFIG_MODE%\%DRIVER_NAME%.pdb" .\%PDB_FOLDER_NAME%\%DEPLOY_FOLDER_NAME%\x64\
xcopy /Y "..\packetWin7\npf\Vista Release%VS_CONFIG_MODE%\%DRIVER_NAME%.pdb" .\%PDB_FOLDER_NAME%\%VISTA_DEPLOY_FOLDER_NAME%\x86\
xcopy /Y "..\packetWin7\npf\x64\Vista Release%VS_CONFIG_MODE%\%DRIVER_NAME%.pdb" .\%PDB_FOLDER_NAME%\%VISTA_DEPLOY_FOLDER_NAME%\x64\

:: Copy PDB files for Packet.dll
xcopy /Y "..\packetWin7\Dll\Project\Release No NetMon and AirPcap%VS_CONFIG_MODE%\Packet.pdb" .\%PDB_FOLDER_NAME%\%DEPLOY_FOLDER_NAME%\x86\
xcopy /Y "..\packetWin7\Dll\Project\x64\Release No NetMon and AirPcap%VS_CONFIG_MODE%\Packet.pdb" .\%PDB_FOLDER_NAME%\%DEPLOY_FOLDER_NAME%\x64\

:: Copy PDB files for NPFInstall.exe
xcopy /Y "..\packetWin7\NPFInstall\Release%VS_CONFIG_MODE%\NPFInstall.pdb" .\%PDB_FOLDER_NAME%\%DEPLOY_FOLDER_NAME%\x86\
xcopy /Y "..\packetWin7\NPFInstall\x64\Release%VS_CONFIG_MODE%\NPFInstall.pdb" .\%PDB_FOLDER_NAME%\%DEPLOY_FOLDER_NAME%\x64\

:: Copy PDB files for NPcapHelper.exe
xcopy /Y "..\packetWin7\Helper\release\NPcapHelper.pdb" .\%PDB_FOLDER_NAME%\%DEPLOY_FOLDER_NAME%\x86\
xcopy /Y "..\packetWin7\Helper\x64\release\NPcapHelper.pdb" .\%PDB_FOLDER_NAME%\%DEPLOY_FOLDER_NAME%\x64\

:: Npcap uses the original WinPcap wpcap.dll with exactly the same code, we just changed the version number.
:: Copy PDB files for wpcap.dll
xcopy /Y "..\wpcap\PRJ\Release No AirPcap\x86\wpcap.pdb" .\%PDB_FOLDER_NAME%\
xcopy /Y "..\wpcap\PRJ\Release No AirPcap\x64\wpcap.pdb" .\%PDB_FOLDER_NAME%\x64\

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Generate the zip package for the PDB files using 7-Zip, make sure you installed 7-Zip first.
%ARCHIVE_7ZIP_TOOL% a %PDB_ZIP_NAME% .\%PDB_FOLDER_NAME%\*

pause

0 comments on commit 99a546c

Please sign in to comment.