Ask Your Question

How to package QT DLLs during packaging Wireshark on Windows using NSIS

asked 2019-06-18 13:26:37 +0000

kirankumarg.81 gravatar image

updated 2019-06-18 13:55:31 +0000

grahamb gravatar image

Hi all

I am using following versions:

Wireshark Version - 2.6.5
QT Version - 5.6
MSVisual Studio - 15

I am able to build and package Wireshark using following commands: Make:

msbuild /p:Configuration=RelWithDebInfo <>\Wireshark.sln
msbuild /p:Configuration=RelWithDebInfo <>\Wireshark.sln /t:Clean


msbuild /p:Configuration=RelWithDebInfo nsis_package_prep.vcxproj
msbuild /p:Configuration=RelWithDebInfo nsis_package.vcxproj

Wireshark exe is generated successfully, but when i tried to execute it is giving following error as pop-up.

"This application failed to start because it could not find or load the Qt platform plugin "Windows" in "".

When i execute Wireshark.exe just after the build it works fine. I tried to find out that it is because QT DLLs are not included properly.

Request your help to understand what changes to be done in configuration to include QT DLLs.

Thanks Kiran Kumar G

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2019-06-18 14:06:47 +0000

grahamb gravatar image

The cmake build process for Wireshark uses the Qt application windeployqt to copy the required Qt DLL's into the run\RelWithDebInfo directory, and the nsis packaging step copies those into the installer.

If you can execute Wireshark from the run\RelWithDebInfo directory then the relevant Qt DLL's have been copied.

If, after running the installer, an installed version of Wireshark fails, then it's likely that the installer did not pick up all the required DLL's.

What Qt*.dll files do you have in the run\RelWithDebInfo directory and what do you have in the installed Wireshark directory?

edit flag offensive delete link more


Inside run\RelWithDebInfo there are:


But, inside installed Wireshark directory there is none. Is something missing ?


kirankumarg.81 gravatar imagekirankumarg.81 ( 2019-06-18 16:12:03 +0000 )edit

OK the expected 8 files, can you share the output from the msbuild … nsis_package.vcxproj step? Add 2>&1 > package.txt to redirect the output to a file, then post the package.txt file to a public file share, e.g. Google Drive, DropBox etc. and then post a link to the file back here.

grahamb gravatar imagegrahamb ( 2019-06-18 16:20:32 +0000 )edit

Hi Graham I have uploaded the package.txt file at the following location, request your inputs.

Let me know if any issue in accessing the folder. Thanks.

kirankumarg.81 gravatar imagekirankumarg.81 ( 2019-06-18 18:22:22 +0000 )edit

Hi Graham, any inputs on the build logs ?

kirankumarg.81 gravatar imagekirankumarg.81 ( 2019-06-19 14:56:26 +0000 )edit

The size reported by nsis is curiously small, e.g. from your build:

  EXE header size:              328192 / 36864 bytes
  Install code:                          (145459 bytes)
  Install data:                          (111442756 bytes)
  Compressed data:            33852951 / 111588215 bytes
  CRC (0x28408604):                  4 / 4 bytes

And from the 2.6 x86 buildbot:

  EXE header size:              328192 / 36864 bytes
  Install code:                          (155017 bytes)
  Install data:                          (172369951 bytes)
  Compressed data:            53799604 / 172524968 bytes
  CRC (0x55569A31):                  4 / 4 bytes

Your "Install data" is approx 60 MB smaller.

I'm really not sure what's going wrong here.

grahamb gravatar imagegrahamb ( 2019-06-20 10:31:32 +0000 )edit

Thanks Graham for the inputs. I tried the following to see if it works. I observed that qt-dll-manifest.nsh was empty, as this need to contain the list of files (dlls/folders) to be copied while packaging. I found the PowerShell command used to fill this details and executed it manually from Windows PowerShell window. It worked fine and the entries inside qt-dll-manifest.nsh was populated properly. Then, I did the packaging once again and installed, this time the QT related DLLs were copied successfully and the execution of Wireshark.exe worked fine.

I am not sure why the below step of executing the PowerShell command was not executed during the MS packaging command ?

Request your inputs why this can happen. Thanks.

PS D:\> D:/Wireshark/wireshark-2.6.5/wireshark-2.6.5/packaging/nsis/windeployqt-to-nsis.ps1 -Executable D:\Wireshark\wireshark-2.6.5\wireshark-2.6.5\run\RelWithDebInfo\Wireshark.exe -Filepath D:\Wireshark\wireshark-2.6.5\wireshark-2.6.5\packaging\nsis\qt-dll-manifest.nsh
kirankumarg.81 gravatar imagekirankumarg.81 ( 2019-06-20 13:34:40 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-06-18 13:26:37 +0000

Seen: 57 times

Last updated: Jun 18