From 877201bcfe06dbe6a8e5c9d8f80ab3377574dad2 Mon Sep 17 00:00:00 2001 From: Harald Oehlmann Date: Wed, 18 Jan 2017 15:53:50 +0100 Subject: [PATCH] 2017-01-18 Tried to compile QT5 on windows: - no PNG (64 bit issues), exe does not run ;-) --- backend_qt/backend_qt.pro | 3 ++ frontend_qt/frontend_qt.pro | 18 ++++++----- .../howto_build_qzint_using_msvs2015.txt | 30 +++++++++++++++++++ 3 files changed, 43 insertions(+), 8 deletions(-) create mode 100644 frontend_qt/howto_build_qzint_using_msvs2015.txt diff --git a/backend_qt/backend_qt.pro b/backend_qt/backend_qt.pro index 5340ca10..fe3bdb0c 100644 --- a/backend_qt/backend_qt.pro +++ b/backend_qt/backend_qt.pro @@ -21,6 +21,9 @@ INCLUDEPATH += ../backend #EDIT THIS !!!! DEFINES += ZINT_VERSION="\\\"2.5.0\\\"" +# Win +DEFINES += NO_PNG + !contains(DEFINES, NO_PNG) { INCLUDEPATH += ../../lpng INCLUDEPATH += ../../zlib diff --git a/frontend_qt/frontend_qt.pro b/frontend_qt/frontend_qt.pro index 7a213247..def6b05d 100644 --- a/frontend_qt/frontend_qt.pro +++ b/frontend_qt/frontend_qt.pro @@ -4,6 +4,7 @@ DEPENDPATH += . debug release INCLUDEPATH += . QT += gui QT += uitools +DEFINES += NO_PNG # Input HEADERS += barcodeitem.h \ @@ -52,15 +53,16 @@ CONFIG += static CONFIG += warn_on thread qt uitools -INCLUDEPATH += ../backend_qt4 ../backend +INCLUDEPATH += ../backend_qt ../backend -LIBS += -lQZint -lQtCore -QMAKE_LIBDIR += ../backend_qt4/release +LIBS += -lQtZint -lQt5Core +QMAKE_LIBDIR += ../backend_qt/release !contains(DEFINES, NO_PNG) { - LIBS += -lpng -zlib - QMAKE_LIBDIR += /usr/local/lib /usr/lib/x86_64-linux-gnu/ -# QMAKE_LIBDIR+=../../lpng\projects\visualc71_converted_to_9\Win32_LIB_Release ../../lpng\projects\visualc71_converted_to_9\Win32_LIB_Release\zlib -# LIBS += -llibpng16 -lzlib1 -# QMAKE_LIBDIR+=../../lpng\projects\visualc71_converted_to_9\Win32_DLL_Release ../../lpng\projects\visualc71_converted_to_9\Win32_DLL_Release\zlib +# Win + LIBS += -llibpng -zlib + QMAKE_LIBDIR+=../../lpng/projects/visualc71_converted_to_9/Win32_LIB_Release ../../lpng/projects/visualc71_converted_to_9/Win32_LIB_Release/zlib +# Unix + #LIBS += -lpng -zlib + #QMAKE_LIBDIR += /usr/local/lib /usr/lib/x86_64-linux-gnu/ } diff --git a/frontend_qt/howto_build_qzint_using_msvs2015.txt b/frontend_qt/howto_build_qzint_using_msvs2015.txt new file mode 100644 index 00000000..772b1593 --- /dev/null +++ b/frontend_qt/howto_build_qzint_using_msvs2015.txt @@ -0,0 +1,30 @@ +Harald Oehlmann +2016-02-28 + +How to build qzint.exe using: +- QT 5.7 installed in C:\qt5 +- MS Visual Studio 2015 (VC12) + +Folder structure: +- zint source files in $ZH + -> this file is in $ZH\frontend_qt +- png1620.zip unzipped in $ZH\..\lpng + -> $ZH\..\lpng\png.h exists +- zlib128.zip unzipped in folder $ZH\..\zlib + -> $ZH\..\zlib\zlib.h exists + +Build zint + +- Start in the start menu: "VS2015 x64 Native Tools-Eingabeaufforderung" +- set PATH=C:\Qt5\5.7\msvc2015_64\bin;%PATH% +- cd $ZH +- cd backend_qt +- qmake backend_qt.pro +- nmake clean +- nmake release + +- cd ..\frontend_qt +- qmake frontend_qt.pro +- nmake clean +- nmake release + -> qzint.exe is in the release folder