1
0
mirror of https://github.com/woo-j/zint.git synced 2024-12-25 09:33:56 +03:00

Managed to compile qzint with png save support included

This commit is contained in:
Harald Oehlmann 2016-02-28 22:18:58 +01:00
parent 372994d794
commit 922ee489a9
3 changed files with 67 additions and 7 deletions

View File

@ -19,12 +19,11 @@ TARGET = QtZint
INCLUDEPATH += ../backend INCLUDEPATH += ../backend
#EDIT THIS !!!! #EDIT THIS !!!!
DEFINES += ZINT_VERSION="\\\"2.3.0\\\"" NO_PNG DEFINES += ZINT_VERSION="\\\"2.5.0\\\""
!contains(DEFINES, NO_PNG) { !contains(DEFINES, NO_PNG) {
LIBS += -llibpng INCLUDEPATH += ../../lpng
INCLUDEPATH += ../../../support/lpng169 INCLUDEPATH += ../../zlib
QMAKE_LIBDIR+=../../../support/lpng169/projects/visualc71/Win32_LIB_Release ../../../support/lpng169/projects/visualc71/Win32_LIB_Release/ZLib
} }
contains(DEFINES, QR_SYSTEM){ contains(DEFINES, QR_SYSTEM){
@ -104,7 +103,7 @@ SOURCES += ../backend/2of5.c \
../backend/png.c \ ../backend/png.c \
qzint.cpp qzint.cpp
VERSION = 2.3.0 VERSION = 2.5.0
#DESTDIR = . #DESTDIR = .

View File

@ -7,7 +7,6 @@ TEMPLATE = app
TARGET = qtZint TARGET = qtZint
DEPENDPATH += . debug release DEPENDPATH += . debug release
INCLUDEPATH += . INCLUDEPATH += .
DEFINES += NO_PNG
# Input # Input
HEADERS += barcodeitem.h \ HEADERS += barcodeitem.h \
@ -56,4 +55,11 @@ CONFIG += warn_on thread qt uitools
INCLUDEPATH += ../backend_qt4 ../backend INCLUDEPATH += ../backend_qt4 ../backend
LIBS += -lqtzint -lQtCore LIBS += -lqtzint -lQtCore
QMAKE_LIBDIR += ../backend_qt4/release 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
}

View File

@ -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