Windows: #196 Visual Studio 2017 Zint Studio instructions

This commit is contained in:
gitlost 2020-06-17 20:46:18 +01:00
parent 674e7b40d0
commit 9db5dd15c2
5 changed files with 123 additions and 16 deletions

View File

@ -0,0 +1,13 @@
TEMPLATE = lib
CONFIG += staticlib
TARGET = QtZintDLL
INCLUDEPATH += ../backend
LIBS += -L"../win32/Release" -lzint
HEADERS += qzint.h
SOURCES += qzint.cpp

View File

@ -0,0 +1,55 @@
TEMPLATE = app
TARGET = qtZint
QT += uitools
QT += widgets
# Input
HEADERS += barcodeitem.h \
datawindow.h \
exportwindow.h \
mainwindow.h \
sequencewindow.h
FORMS += extData.ui \
extExport.ui \
extSequence.ui \
grpAztec.ui \
grpC11.ui \
grpC128.ui \
grpC16k.ui \
grpC39.ui \
grpC49.ui \
grpChannel.ui \
grpCodabar.ui \
grpCodablockF.ui \
grpCodeOne.ui \
grpDBExtend.ui \
grpDM.ui \
grpDotCode.ui \
grpGrid.ui \
grpHX.ui \
grpLOGMARS.ui \
grpMaxicode.ui \
grpMicroPDF.ui \
grpMQR.ui \
grpMSICheck.ui \
grpPDF417.ui \
grpQR.ui \
grpRMQR.ui \
grpVIN.ui \
mainWindow.ui
SOURCES += barcodeitem.cpp \
datawindow.cpp \
exportwindow.cpp \
main.cpp \
mainwindow.cpp \
sequencewindow.cpp
RESOURCES += resources.qrc
INCLUDEPATH += ../backend_qt ../backend
LIBS += -lQtZintDLL -lzint
QMAKE_LIBDIR += ../backend_qt/release
QMAKE_LIBDIR += ../win32/Release

View File

@ -1,7 +1,8 @@
Visual Studio 2017 - library and zint.exe
-----------------------------------------
Visual Studio 2017
------------------
To build the zint library DLL and the command line tool "zint.exe" with PNG support:
To build the zint library DLL and the command line tool "zint.exe" with PNG
support for x86/Win32:
Install git (https://git-scm.com/downloads)
Install cmake (https://cmake.org/download/)
@ -11,8 +12,8 @@ Open a "Developer Command Prompt for VS 2017" (should be available under the
Make sure git and cmake are in your PATH, e.g. (your paths may differ)
set PATH="C:\Program Files\Git\cmd";%PATH%
set PATH="C:\Program Files\CMake\bin";%PATH%
set "PATH=C:\Program Files\Git\cmd;%PATH%"
set "PATH=C:\Program Files\CMake\bin;%PATH%"
Download zint, zlib and libpng by going to the directory you want to clone them
into:
@ -51,13 +52,51 @@ and then lpng:
cd ..
If you now open "<project-directory>\zint\win32\zint.sln" with Visual Studio
2017, you should be able to build both the Release and Debug configurations.
2017, you should be able to build the Release configuration for Win32.
"zint.dll" and "zint.exe" will be in "<project-dir>\zint\win32\Release".
Visual Studio 2017 - qtZint.exe
-------------------------------
To build Zint Studio ("qtZint.exe"), you need to have Qt installed, which
involves signing up for a Qt account and installing the Qt Maintenance Tool.
Using this tool you can install various versions of Qt and various optional
components.
TODO
The following requires the "MSVC 2017 32-bit" component to be installed.
As of writing Qt 5.14.2 is the latest release that includes this component and
is used here. Add the location of this component to your PATH, e.g. (your path
may differ):
set "PATH=C:\Qt\5.14.2\msvc2017\bin;%PATH%"
Next build the zint backend Qt library:
cd zint\backend_qt
qmake backend_qt_zintdll.pro
nmake clean
nmake release
cd ..\..
Then "qtZint.exe":
cd zint\frontend_qt
qmake frontend_qt_zintdll.pro
nmake clean
nmake release
cd ..\..
This creates "<project-directory>\zint\frontend_qt\release\qtZint.exe". It
requires the zint DLL to run, so add its location to your PATH:
set "PATH=<project-directory>\zint\win32\Release;%PATH%"
You should now be able to run Zint Studio:
zint\frontend_qt\release\qtZint
Visual Studio 2015
@ -68,6 +107,9 @@ sub-directory vs2015 and are no longer maintained. However by copying the steps
above and adapting the settings from the Visual Studio 2017 project files (and
adding any sources missing), they should be pretty serviceable.
For information on building a standalone version of Zint Studio using Visual
Studio 2015, see "frontend_qt/howto_build_qzint_using_msvs2015.txt"
Visual C++ 6
------------

View File

@ -78,9 +78,9 @@
</ProjectReference>
<Link>
<AdditionalDependencies>libpng16_static.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)zintd.dll</OutputFile>
<AdditionalLibraryDirectories>..\..\lpng\Build\Release;..\..\zlib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>libcmtd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<OutputFile>$(OutDir)zint.dll</OutputFile>
<AdditionalLibraryDirectories>..\..\lpng\build\Release;..\..\zlib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>libcmtd.lib;msvcrt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
@ -113,7 +113,7 @@
<Link>
<AdditionalDependencies>libpng16_static.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)zint.dll</OutputFile>
<AdditionalLibraryDirectories>..\..\lpng\Build\Release;..\..\zlib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>..\..\lpng\build\Release;..\..\zlib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>

View File

@ -82,9 +82,6 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat />
</ClCompile>
<Link>
<AdditionalLibraryDirectories>d:\opt\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\frontend\getopt.c" />