Skip to content

Commit 40edd4d

Browse files
committed
CI: update npcap-sdk to 1.16 and npcap-1.87
1 parent bb45b83 commit 40edd4d

3 files changed

Lines changed: 16 additions & 9 deletions

File tree

.github/workflows/msvc.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,9 @@ jobs:
133133
run: |
134134
IF NOT EXIST ${{env.INSTALL_DIR}}/npcap (
135135
C:\msys64\usr\bin\pacman.exe -S --noconfirm unzip
136-
C:\msys64\usr\bin\wget https://npcap.com/dist/npcap-sdk-1.15.zip
137-
C:\msys64\usr\bin\unzip -d ${{env.INSTALL_DIR}}\npcap npcap-sdk-1.15.zip
136+
; NOTE: 如何要修改版本号,需要同时修改后面打包部分和 Package\Windows.nsi 中相应的版本
137+
C:\msys64\usr\bin\wget https://npcap.com/dist/npcap-sdk-1.16.zip
138+
C:\msys64\usr\bin\unzip -d ${{env.INSTALL_DIR}}\npcap npcap-sdk-1.16.zip
138139
)
139140
140141
# 因为 vcpkg 中 PcapPlusPlus 依赖 winpcap , winpcap 不能在 windows 10 上工作,
@@ -491,8 +492,9 @@ jobs:
491492
xcopy /Y /S /I %QT_ROOT_DIR%\resources install\bin\resources
492493
xcopy /Y /S /I %QT_ROOT_DIR%\translations install\bin\translations
493494
xcopy /Y /S /I %QT_ROOT_DIR%\plugins\sqldrivers install\bin\sqldrivers
494-
C:\msys64\usr\bin\wget https://npcap.com/dist/npcap-1.80.exe
495-
copy npcap-1.80.exe install\bin
495+
; NOTE: 如何要修改版本号,需要同时修改 Package\Windows.nsi 中相应的版本
496+
C:\msys64\usr\bin\wget https://npcap.com/dist/npcap-1.87.exe
497+
copy npcap-1.87.exe install\bin
496498
;7z a RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_Portable.zip .\install\*
497499
makensis Windows.nsi
498500
copy /Y RabbitRemoteControl_Setup_${{env.RabbitRemoteControl_VERSION}}.exe RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_Setup.exe

Package/Windows.nsi

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,17 +136,18 @@ Function InstallRuntime
136136
FunctionEnd
137137

138138
Function InstallNpcap
139-
IfFileExists "$OUTDIR\bin\npcap-1.80.exe" ExecNpcap
139+
; NOTE: 如何要修改版本号,需要同时修改 .github\workflows\msvc.yml 中相应的版本
140+
IfFileExists "$OUTDIR\bin\npcap-1.87.exe" ExecNpcap
140141
MessageBox MB_YESNO|MB_ICONQUESTION "$(LANG_DOWNLOAD_NPCAP)" IDYES Download IDNO ExitNpcap
141142
Download:
142-
NSISdl::download "https://npcap.com/dist/npcap-1.80.exe" "$OUTDIR\bin\npcap-1.80.exe"
143+
NSISdl::download "https://npcap.com/dist/npcap-1.87.exe" "$OUTDIR\bin\npcap-1.87.exe"
143144
Pop $R0 ;Get the return value
144145
StrCmp $R0 "success" ExecNpcap
145146
ExecShell "open" "https://npcap.com/#download"
146-
MessageBox MB_OK "Download npcap-1.80.exe failed: $R0. Please install npcap manually from https://npcap.com/#download"
147+
MessageBox MB_OK "Download npcap-1.87.exe failed: $R0. Please install npcap manually from https://npcap.com/#download"
147148
Goto ExitNpcap
148149
ExecNpcap:
149-
ExecShell "" '"$OUTDIR\bin\npcap-1.80.exe"' "/winpcap_mode=enforced /dot11_support=yes /loopback_support=no /admin_only=no" SW_SHOWMAXIMIZED
150+
ExecShell "" '"$OUTDIR\bin\npcap-1.87.exe"' "/winpcap_mode=enforced /dot11_support=yes /loopback_support=no /admin_only=no" SW_SHOWMAXIMIZED
150151
ExitNpcap:
151152
FunctionEnd
152153

docs/Compile/Windows_zh_CN.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,9 @@
324324
cd vcpkg
325325
vcpkg install pcapplusplus
326326

327-
**注意**: vcpkg 中 PcapPlusPlus 依赖 WinPcap,但 WinPcap 不能在 Windows 10 及以后的版本上工作。
327+
**注意**: vcpkg 中 PcapPlusPlus 依赖 [WinPcap](https://www.winpcap.org/)
328+
但 WinPcap 不能在 Windows 10 及以后的版本上工作。并且它已停止更新。
329+
Windows10 及以后的版本需要 [npcap](https://npcap.com)
328330
所以从源码编译,依赖 [npcap](https://npcap.com) 库。
329331

330332
- 当 PcapPlusPlus 从源码编译时,编译本项需要指定的 CMake 参数:
@@ -333,6 +335,8 @@
333335
-DPacket_ROOT=[npcap SDK 目录] ^
334336
-DPcapPlusPlus_DIR=[PcapPlusPlus 安装目录]/lib/cmake/pcapplusplus
335337

338+
详见:[msvc.yml](.github\workflows\msvc.yml)
339+
336340
#### QFtpServer
337341

338342
- 从源码编译

0 commit comments

Comments
 (0)