howto_build_qzint_using_msvs2015.txt 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. Harald Oehlmann
  2. 2021-06-24
  3. How to build qzint.exe using:
  4. - QT 5.15.2 source package
  5. - MS Visual Studio 2015 (VC14)
  6. Build static Qt:
  7. ---------------
  8. - Go to: https://www.qt.io/offline-installers
  9. - Download the zip "Qt 5.15.x source packages" (nearly 1 GB):
  10. http://download.qt.io/official_releases/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.zip
  11. - Unzip to C:\qt resulting in having the source in c:\qt\qt-everywhere-src-5.15.2
  12. - Install Python (https://www.python.org/downloads/windows/) and make it available within the path.
  13. - Start the VS2015 x86 native console by the start menu entry:
  14. Visual Studio 2015\Visual Studio Tools\Windows Desktop Command Prompts\VS2015 x86 Native Tools-Eingabeaufforderung
  15. - ("Eingabeaufforderung" = "Command Prompt")
  16. - Note: if "rc.exe" not available, install a Windows Kit and update PATH (e.g.):
  17. set "PATH=C:\Program Files (x86)\Windows Kits\10\bin\10.0.20348.0\x86;%PATH%"
  18. cd C:\qt\qt-everywhere-src-5.15.2
  19. configure.bat -static -release -prefix c:\qt\5.15.2static -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -no-openssl -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests -mp
  20. - One may set another destination folder after the -prefix option.
  21. - Attention, the upper command is one long line.
  22. nmake
  23. nmake install
  24. - The last 3 commands run around 3 hours.
  25. - Make sure, that python may be found in the path.
  26. - the huge source folder may be deleted to save around 6GB of space.
  27. Zint Folder structure:
  28. ----------------------
  29. - zint source files in %ZH%, e.g.
  30. set "ZH=%cd%\zint"
  31. git clone https://git.code.sf.net/p/zint/code "%ZH%"
  32. -> this file is in %ZH%\frontend_qt
  33. - libpng source files in %ZH%\..\lpng
  34. git clone https://git.code.sf.net/p/libpng/code "%ZH%\..\lpng"
  35. -> %ZH%\..\lpng\png.h exists
  36. - zlib source files in %ZH%\..\zlib
  37. git clone https://github.com/madler/zlib.git "%ZH%\..\zlib"
  38. -> %ZH%\..\zlib\zlib.h exists
  39. Build libpng:
  40. -------------
  41. cd "%ZH%\..\zlib"
  42. nmake -f win32\Makefile.msc clean
  43. nmake -f win32\Makefile.msc
  44. cd ..\lpng
  45. nmake -f scripts\makefile.vcwin32 clean
  46. nmake -f scripts\makefile.vcwin32
  47. Build zint:
  48. -----------
  49. set QTDIR=C:\Qt\5.15.2static
  50. set PATH=C:\Qt\5.15.2static\bin;%PATH%
  51. set QMAKESPEC=win32-msvc
  52. cd "%ZH%"
  53. cd backend_qt
  54. qmake backend_qt.pro
  55. nmake clean
  56. nmake release
  57. cd ..\frontend_qt
  58. qmake frontend_qt.pro
  59. nmake clean
  60. nmake release
  61. -> qtZint.exe is in the release folder
  62. Note:
  63. For me, qt5core.lib was not found in the last step.
  64. I only found the solution to add:
  65. QMAKE_LIBDIR += C:/qt/5.15.2static/lib
  66. into frontend_qt.pro
  67. There is for sure a better solution.