Remove further refs to QZint; win32/README; add zintconfig.h to Win make files

This commit is contained in:
gitlost 2020-11-24 22:22:12 +00:00
parent 142cca7995
commit 4b7561ab29
11 changed files with 28 additions and 57 deletions

View File

@ -2,7 +2,7 @@
#if defined (_WIN32) && (defined(_USRDLL) || defined(DLL_EXPORT) || defined(PIC))
#include <windows.h>
#include <shlwapi.h>
#include "zint.h"
#include "zintconfig.h"
#ifdef __cplusplus
extern "C"

View File

@ -33,10 +33,10 @@ if (LIBZINT_LIBRARY AND LIBZINT_INCLUDE_DIR)
endif ()
if (LIBZINT_INCLUDE_DIR AND EXISTS "${LIBZINT_INCLUDE_DIR}/zint.h")
file (STRINGS "${LIBZINT_INCLUDE_DIR}/zint.h" ZINT_MAJOR_H REGEX "^#define ZINT_VERSION_MAJOR *[0-9]*")
file (STRINGS "${LIBZINT_INCLUDE_DIR}/zint.h" ZINT_MINOR_H REGEX "^#define ZINT_VERSION_MINOR *[0-9]*")
file (STRINGS "${LIBZINT_INCLUDE_DIR}/zint.h" ZINT_MICRO_H REGEX "^#define ZINT_VERSION_RELEASE *[0-9]*")
if (LIBZINT_INCLUDE_DIR AND EXISTS "${LIBZINT_INCLUDE_DIR}/zintconfig.h")
file (STRINGS "${LIBZINT_INCLUDE_DIR}/zintconfig.h" ZINT_MAJOR_H REGEX "^#define ZINT_VERSION_MAJOR *[0-9]*")
file (STRINGS "${LIBZINT_INCLUDE_DIR}/zintconfig.h" ZINT_MINOR_H REGEX "^#define ZINT_VERSION_MINOR *[0-9]*")
file (STRINGS "${LIBZINT_INCLUDE_DIR}/zintconfig.h" ZINT_MICRO_H REGEX "^#define ZINT_VERSION_RELEASE *[0-9]*")
string (REGEX REPLACE "^.*VERSION_MAJOR *([0-9]*)" "\\1" ZINT_MAJOR ${ZINT_MAJOR_H})
string (REGEX REPLACE "^.*VERSION_MINOR *([0-9]*)" "\\1" ZINT_MINOR ${ZINT_MINOR_H})
string (REGEX REPLACE "^.*VERSION_RELEASE *([0-9]*)" "\\1" ZINT_MICRO ${ZINT_MICRO_H})

View File

@ -1,5 +1,5 @@
# - Find Zint and QZint
# Find the native Zint and QZint includes and library
# - Find Zint
# Find the native Zint includes and library
#
# ZINT_INCLUDE_DIR - where to find zint.h, etc.
# ZINT_LIBRARIES - List of libraries when using zint.
@ -31,28 +31,3 @@ ELSE(ZINT_FOUND)
ENDIF(ZINT_FOUND)
MARK_AS_ADVANCED( ZINT_LIBRARY ZINT_INCLUDE_DIR )
################### FIND QZINT ######################
IF (QZINT_INCLUDE_DIR)
# Already in cache, be silent
SET(QZINT_FIND_QUIETLY TRUE)
ENDIF (QZINT_INCLUDE_DIR)
FIND_PATH(QZINT_INCLUDE_DIR qzint.h)
FIND_LIBRARY(QZINT_LIBRARY NAMES QZint )
# handle the QUIETLY and REQUIRED arguments and set QZINT_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(QZint DEFAULT_MSG QZINT_LIBRARY QZINT_INCLUDE_DIR)
IF(QZINT_FOUND)
SET( QZINT_LIBRARIES ${QZINT_LIBRARY} )
ELSE(QZINT_FOUND)
SET( QZINT_LIBRARIES )
ENDIF(QZINT_FOUND)
MARK_AS_ADVANCED( QZINT_LIBRARY QZINT_INCLUDE_DIR )

View File

@ -33,10 +33,10 @@ if (LIBZINT_LIBRARY AND LIBZINT_INCLUDE_DIR)
endif ()
if (LIBZINT_INCLUDE_DIR AND EXISTS "${LIBZINT_INCLUDE_DIR}/zint.h")
file (STRINGS "${LIBZINT_INCLUDE_DIR}/zint.h" ZINT_MAJOR_H REGEX "^#define ZINT_VERSION_MAJOR *[0-9]*")
file (STRINGS "${LIBZINT_INCLUDE_DIR}/zint.h" ZINT_MINOR_H REGEX "^#define ZINT_VERSION_MINOR *[0-9]*")
file (STRINGS "${LIBZINT_INCLUDE_DIR}/zint.h" ZINT_MICRO_H REGEX "^#define ZINT_VERSION_RELEASE *[0-9]*")
if (LIBZINT_INCLUDE_DIR AND EXISTS "${LIBZINT_INCLUDE_DIR}/zintconfig.h")
file (STRINGS "${LIBZINT_INCLUDE_DIR}/zintconfig.h" ZINT_MAJOR_H REGEX "^#define ZINT_VERSION_MAJOR *[0-9]*")
file (STRINGS "${LIBZINT_INCLUDE_DIR}/zintconfig.h" ZINT_MINOR_H REGEX "^#define ZINT_VERSION_MINOR *[0-9]*")
file (STRINGS "${LIBZINT_INCLUDE_DIR}/zintconfig.h" ZINT_MICRO_H REGEX "^#define ZINT_VERSION_RELEASE *[0-9]*")
string (REGEX REPLACE "^.*VERSION_MAJOR *([0-9]*)" "\\1" ZINT_MAJOR ${ZINT_MAJOR_H})
string (REGEX REPLACE "^.*VERSION_MINOR *([0-9]*)" "\\1" ZINT_MINOR ${ZINT_MINOR_H})
string (REGEX REPLACE "^.*VERSION_RELEASE *([0-9]*)" "\\1" ZINT_MICRO ${ZINT_MICRO_H})

View File

@ -28,9 +28,9 @@ add_dependencies(zint-qt zint)
link_directories( "${CMAKE_BINARY_DIR}/backend" )
if(USE_QT6)
target_link_libraries(zint-qt zint QZint Qt6::UiTools ${QT_QTXML_LIBRARY} Qt6::Gui Qt6::Core)
target_link_libraries(zint-qt zint Qt6::UiTools ${QT_QTXML_LIBRARY} Qt6::Gui Qt6::Core)
else()
target_link_libraries(zint-qt zint QZint Qt5::UiTools ${QT_QTXML_LIBRARY} Qt5::Gui Qt5::Core)
target_link_libraries(zint-qt zint Qt5::UiTools ${QT_QTXML_LIBRARY} Qt5::Gui Qt5::Core)
endif()
install(TARGETS zint-qt DESTINATION "${BIN_INSTALL_DIR}" RUNTIME)

View File

@ -71,17 +71,7 @@ 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":
Then build Zint Studio "qtZint.exe":
cd zint\frontend_qt
@ -204,19 +194,17 @@ This creates:
zint/build/backend/libzint.dll
zint/build/frontend/zint.exe
zint/build/backend_qt/libQZint.dll
zint/build/frontend_qt/zint-qt.exe
The Zint command line tool "zint.exe" needs "libzint.dll" to run so add its
location to your PATH:
The Zint command line tool "zint.exe" and Zint Studio "zint-qt.exe" need
"libzint.dll" to run so add its location to your PATH:
export PATH="${PROJECT_DIR}/zint/build/backend":${PATH}
You should now be able to run the command line tool:
zint/build/frontend/zint
Zint Studio "zint-qt.exe" needs "libQZint.dll" to run so add its location to
your PATH:
export PATH="${PROJECT_DIR}/zint/build/backend_qt":${PATH}
And Zint Studio:
zint/build/frontend_qt/zint-qt

View File

@ -204,6 +204,7 @@
<ClInclude Include="..\backend\stdint_msvc.h" />
<ClInclude Include="..\backend\tif.h" />
<ClInclude Include="..\backend\zint.h" />
<ClInclude Include="..\backend\zintconfig.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\backend\libzint.rc" />

View File

@ -589,6 +589,10 @@
RelativePath="..\backend\zint.h"
>
</File>
<File
RelativePath="..\backend\zintconfig.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"

View File

@ -383,6 +383,7 @@
<ClInclude Include="..\..\backend\stdint_msvc.h" />
<ClInclude Include="..\..\backend\tif.h" />
<ClInclude Include="..\..\backend\zint.h" />
<ClInclude Include="..\..\backend\zintconfig.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\backend\libzint.rc">

View File

@ -151,6 +151,7 @@
<ClInclude Include="..\..\backend\stdint_msvc.h" />
<ClInclude Include="..\..\backend\tif.h" />
<ClInclude Include="..\..\backend\zint.h" />
<ClInclude Include="..\..\backend\zintconfig.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\backend\libzint.rc">

View File

@ -204,6 +204,7 @@
<ClInclude Include="..\..\backend\stdint_msvc.h" />
<ClInclude Include="..\..\backend\tif.h" />
<ClInclude Include="..\..\backend\zint.h" />
<ClInclude Include="..\..\backend\zintconfig.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\backend\libzint.rc" />