diff --git a/backend/dllversion.c b/backend/dllversion.c index bedad645..dbb89bc2 100644 --- a/backend/dllversion.c +++ b/backend/dllversion.c @@ -2,7 +2,7 @@ #if defined (_WIN32) && (defined(_USRDLL) || defined(DLL_EXPORT) || defined(PIC)) #include #include -#include "zint.h" +#include "zintconfig.h" #ifdef __cplusplus extern "C" diff --git a/backend/tests/cmake/Modules/FindLibZint.cmake b/backend/tests/cmake/Modules/FindLibZint.cmake index 7ef0ff36..bc85dae8 100644 --- a/backend/tests/cmake/Modules/FindLibZint.cmake +++ b/backend/tests/cmake/Modules/FindLibZint.cmake @@ -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}) diff --git a/cmake/modules/FindZint.cmake b/cmake/modules/FindZint.cmake index 7b4f6b5f..41c38328 100644 --- a/cmake/modules/FindZint.cmake +++ b/cmake/modules/FindZint.cmake @@ -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 ) - diff --git a/frontend/tests/cmake/Modules/FindLibZint.cmake b/frontend/tests/cmake/Modules/FindLibZint.cmake index 7ef0ff36..bc85dae8 100644 --- a/frontend/tests/cmake/Modules/FindLibZint.cmake +++ b/frontend/tests/cmake/Modules/FindLibZint.cmake @@ -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}) diff --git a/frontend_qt/CMakeLists.txt b/frontend_qt/CMakeLists.txt index 2b5ae9d5..2e00fc76 100644 --- a/frontend_qt/CMakeLists.txt +++ b/frontend_qt/CMakeLists.txt @@ -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) diff --git a/win32/README b/win32/README index 713974d0..c8617b11 100644 --- a/win32/README +++ b/win32/README @@ -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 diff --git a/win32/libzint.vcxproj b/win32/libzint.vcxproj index fa17376f..383c2ae2 100644 --- a/win32/libzint.vcxproj +++ b/win32/libzint.vcxproj @@ -204,6 +204,7 @@ + diff --git a/win32/vs2008/libzint.vcproj b/win32/vs2008/libzint.vcproj index 77dd7766..23a46c85 100644 --- a/win32/vs2008/libzint.vcproj +++ b/win32/vs2008/libzint.vcproj @@ -589,6 +589,10 @@ RelativePath="..\backend\zint.h" > + + + diff --git a/win32/vs2015/vsx/libzintMD.vcxproj b/win32/vs2015/vsx/libzintMD.vcxproj index 2f69c107..d37121fd 100644 --- a/win32/vs2015/vsx/libzintMD.vcxproj +++ b/win32/vs2015/vsx/libzintMD.vcxproj @@ -151,6 +151,7 @@ + diff --git a/win32/vs2019/libzint.vcxproj b/win32/vs2019/libzint.vcxproj index fb18185e..7800f6cb 100644 --- a/win32/vs2019/libzint.vcxproj +++ b/win32/vs2019/libzint.vcxproj @@ -204,6 +204,7 @@ + @@ -211,4 +212,4 @@ - \ No newline at end of file +