josevcm / nfc-laboratory

NFC signal and protocol analyzer using SDR receiver
GNU General Public License v3.0
411 stars 47 forks source link

How to build nfc-laboratory / build error msys2 / mingw64 (Windows10) #1

Closed bvernoux closed 3 years ago

bvernoux commented 3 years ago

Could you add in Wiki an How to build nfc-laboratory with requirements (does it work with msys2 Mingw64 and which dependencies are required ...) ?

bvernoux commented 3 years ago

Working solution is to use Qt Creator (Tested with latest Qt Creator 4.15.2 with Qt 5.15.2 + mingw81_64 ) then import the nfc-laboratory/CMakeLists.txt project and built it with MinGW 64-bit (Tested with success with Qt 5.15.2 + mingw81_64 on Windows10Pro 21H1) Example of batch used(requires msys2/linux cp/rm commands) to do the deployment (after build of the release version with Qt Creator)

set qtpath=C:\Qt\5.15.2\mingw81_64\bin\
set PATH=%qtpath%;%PATH%
set execpath="%qtpath%\windeployqt.exe"
set nflabpath=D:\_proj\__Lab_Tools\NFC\nfc-laboratory
set build_path=%nflabpath%\..\build-nfc-laboratory-Desktop_Qt_5_15_2_MinGW_64_bit-Release\src\nfc-app\app-qt

cp -a %build_path%/. ./
rm -rf CMakeFiles nfc-lab_autogen installerResources cmake_install.cmake libnfc-lab.dll.a
%execpath% nfc-lab.exe

cp %qtpath%\libgcc_s_seh-1.dll ./
cp %qtpath%\libwinpthread-1.dll ./
cp %qtpath%\libstdc++-6.dll ./

cp %nflabpath%\dll\glew-2.1.0\x86_64-w64-mingw32\bin\libglew32.dll ./
cp %nflabpath%\dll\freetype-2.11.0\x86_64-w64-mingw32\bin\libfreetype.dll ./
cp %nflabpath%\dll\usb-1.0.20\x86_64-w64-mingw32\bin\libusb-1.0.dll ./

1) For information "Signal" Tab requires "Geometry Shader..." which are potentially not supported on integrated Intel Graphic Card (like old Intel HD Graphics 4000) so the Signal will show only NFC Field (NFC Frequency will do not display anything) 2) Disconnect AirSpy USB cable from computer before to launch the application as it seems the connection at startup/launch is not working correctly so AirSpy USB cable shall be connected after to have launched the application and all work fine.

josevcm commented 3 years ago

Thanks for the comments and help, I have included the build instructions in the project documentation.

josevcm commented 3 years ago

I will check the problem with the connection of the usb cable with AirSpy