diff --git a/backend_qt4/backend_qt4.pro b/backend_qt4/backend_qt4.pro index 7347c790..f0e081e2 100644 --- a/backend_qt4/backend_qt4.pro +++ b/backend_qt4/backend_qt4.pro @@ -19,12 +19,11 @@ TARGET = QtZint INCLUDEPATH += ../backend #EDIT THIS !!!! -DEFINES += ZINT_VERSION="\\\"2.3.0\\\"" NO_PNG +DEFINES += ZINT_VERSION="\\\"2.5.0\\\"" !contains(DEFINES, NO_PNG) { - LIBS += -llibpng - INCLUDEPATH += ../../../support/lpng169 - QMAKE_LIBDIR+=../../../support/lpng169/projects/visualc71/Win32_LIB_Release ../../../support/lpng169/projects/visualc71/Win32_LIB_Release/ZLib + INCLUDEPATH += ../../lpng + INCLUDEPATH += ../../zlib } contains(DEFINES, QR_SYSTEM){ @@ -104,7 +103,7 @@ SOURCES += ../backend/2of5.c \ ../backend/png.c \ qzint.cpp -VERSION = 2.3.0 +VERSION = 2.5.0 #DESTDIR = . diff --git a/frontend_qt4/frontend_qt4.pro b/frontend_qt4/frontend_qt4.pro index fa75cfff..05becb9f 100644 --- a/frontend_qt4/frontend_qt4.pro +++ b/frontend_qt4/frontend_qt4.pro @@ -7,7 +7,6 @@ TEMPLATE = app TARGET = qtZint DEPENDPATH += . debug release INCLUDEPATH += . -DEFINES += NO_PNG # Input HEADERS += barcodeitem.h \ @@ -56,4 +55,11 @@ CONFIG += warn_on thread qt uitools INCLUDEPATH += ../backend_qt4 ../backend LIBS += -lqtzint -lQtCore -QMAKE_LIBDIR += ../backend_qt4/release \ No newline at end of file +QMAKE_LIBDIR += ../backend_qt4/release + +!contains(DEFINES, NO_PNG) { + LIBS += -llibpng -lzlib + 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 +} diff --git a/frontend_qt4/howto_build_qzint_using_msvs9.txt b/frontend_qt4/howto_build_qzint_using_msvs9.txt new file mode 100644 index 00000000..7c21f4d7 --- /dev/null +++ b/frontend_qt4/howto_build_qzint_using_msvs9.txt @@ -0,0 +1,55 @@ +Harald Oehlmann +2016-02-28 + +How to build qzint.exe using: +- QT 4 +- MS Visual Studio 2008 (VC9) + +Folder structure: +- zint source files in $ZH + -> this file is in $ZH\frontend_qt4 +- png1620.zip unzipped in $ZH\..\lpng + -> $ZH\..\lpng\png.h exists +- zlib128.zip inzipped in folder $ZH\..\zlib + -> $ZH\..\zlib\zlib.h exists + +Prepare qt for static build + +- Start "Visual Studio 2008 Command Line" (or execute "%VS90COMNTOOLS%vsvars32.bat" ) +- cd c:\qt\4.8.6 +- configure -static -release -qt-zlib -qt-libpng -qt-libjpeg +- nmake + -> took around 2 hours for me + +Build pnglib and zlib +- cd $ZH\..\lpng\projects +- copy visual71 visual71_converted_to_9 +- Start Visual Studio 2..8 (CV9) +- open Project: $ZH\..\lpng\projects\visualc71_converted_to_9\libpng.sln +- convert it as proposed by the IDE (no backup, we have made a copy before) +- select "LIB Release" configuration +- go to project "libpng" and open project options (ALT-F7) +- On the left, select "C/C++->Code generation" +- On the right change "Run time library" from "Multi-Treaded (/MT)" to "Multithread-DLL (/MD)" +- also do the upper steps for the project "zlib" (change /MT to /MD) +- Build libpng and zlib project using the Buildall menu entry + -> this compiles png in the static lib: + lpng\projects\visualc71_converted_to_9\Win32_LIB_Release\libpng.lib + and zlib into the static lib + lpng\projects\visualc71_converted_to_9\Win32_LIB_Release\zlib\zlib.lib + +Build zint + +- Start "Visual Studio 2008 Command Line" (or execute "%VS90COMNTOOLS%vsvars32.bat" ) +- C:\Qt\4.8.6\bin\qtvars.bat +- cd $ZH +- cd backend_qt4 +- qmake backend_qt4.pro +- nmake clean +- nmake release + +- cd ..\frontend_qt4 +- qmake frontend_qt4.pro +- nmake clean +- nmake release + -> qzint.exe is in the release folder