1
0
mirror of https://github.com/woo-j/zint.git synced 2024-12-23 13:33:55 +03:00
zint/frontend_qt/howto_build_qzint_using_msvs2015.txt

84 lines
2.7 KiB
Plaintext
Raw Normal View History

Harald Oehlmann
2021-06-24
How to build qzint.exe using:
- QT 5.15.2 source package
- MS Visual Studio 2015 (VC14)
2017-03-29 20:21:49 +03:00
Build static Qt:
---------------
- Go to: https://www.qt.io/offline-installers
- Download the zip "Qt 5.15.x source packages" (nearly 1 GB):
http://download.qt.io/official_releases/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.zip
- Unzip to C:\qt resulting in having the source in c:\qt\qt-everywhere-src-5.15.2
- Install Python (https://www.python.org/downloads/windows/) and make it available within the path.
2017-03-29 20:21:49 +03:00
- Start the VS2015 x86 native console by the start menu entry:
Visual Studio 2015\Visual Studio Tools\Windows Desktop Command Prompts\VS2015 x86 Native Tools-Eingabeaufforderung
- ("Eingabeaufforderung" = "Command Prompt")
- Note: if "rc.exe" not available, install a Windows Kit and update PATH (e.g.):
set "PATH=C:\Program Files (x86)\Windows Kits\10\bin\10.0.20348.0\x86;%PATH%"
cd C:\qt\qt-everywhere-src-5.15.2
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
- One may set another destination folder after the -prefix option.
- Attention, the upper command is one long line.
nmake
nmake install
- The last 3 commands run around 3 hours.
- Make sure, that python may be found in the path.
- the huge source folder may be deleted to save around 6GB of space.
2017-03-29 20:21:49 +03:00
Zint Folder structure:
----------------------
- zint source files in %ZH%, e.g.
set "ZH=%cd%\zint"
git clone https://git.code.sf.net/p/zint/code "%ZH%"
-> this file is in %ZH%\frontend_qt
- libpng source files in %ZH%\..\lpng
git clone https://git.code.sf.net/p/libpng/code "%ZH%\..\lpng"
-> %ZH%\..\lpng\png.h exists
- zlib source files in %ZH%\..\zlib
git clone https://github.com/madler/zlib.git "%ZH%\..\zlib"
-> %ZH%\..\zlib\zlib.h exists
Build libpng:
2017-03-29 20:21:49 +03:00
-------------
cd "%ZH%\..\zlib"
nmake -f win32\Makefile.msc clean
nmake -f win32\Makefile.msc
cd ..\lpng
nmake -f scripts\makefile.vcwin32 clean
nmake -f scripts\makefile.vcwin32
2017-03-29 20:21:49 +03:00
Build zint:
-----------
set QTDIR=C:\Qt\5.15.2static
set PATH=C:\Qt\5.15.2static\bin;%PATH%
set QMAKESPEC=win32-msvc
cd "%ZH%"
cd backend_qt
qmake backend_qt.pro
nmake clean
nmake release
cd ..\frontend_qt
qmake frontend_qt.pro
nmake clean
nmake release
-> qtZint.exe is in the release folder
Note:
For me, qt5core.lib was not found in the last step.
I only found the solution to add:
QMAKE_LIBDIR += C:/qt/5.15.2static/lib
into frontend_qt.pro
There is for sure a better solution.