### Installation of License Files Source: https://github.com/fralx/limereport/blob/master/3rdparty/easyprofiler/easy_profiler_core/CMakeLists.txt Installs the MIT and Apache license files to the root of the installation directory. ```cmake install( FILES LICENSE.MIT LICENSE.APACHE DESTINATION . ) ``` -------------------------------- ### Installation of Configuration and Header Files Source: https://github.com/fralx/limereport/blob/master/3rdparty/easyprofiler/easy_profiler_core/CMakeLists.txt Installs the generated configuration files and public header files to their respective destinations. ```cmake install( FILES "${project_config}" "${version_config}" DESTINATION "${config_install_dir}" ) install( FILES ${INCLUDE_FILES} DESTINATION include/easy ) ``` -------------------------------- ### Installation Rules Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/backend_qt/CMakeLists.txt Defines rules for installing the Zint library and its header file. ```cmake install(TARGETS ${PROJECT_NAME} ${INSTALL_TARGETS_DEFAULT_ARGS}) install(FILES qzint.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel) ``` -------------------------------- ### Include Installation and Package Helpers Source: https://github.com/fralx/limereport/blob/master/CMakeLists.txt Includes CMake modules for managing installation directories and creating package configuration files. ```cmake include(GNUInstallDirs) include(CMakePackageConfigHelpers) ``` -------------------------------- ### Install Target Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/frontend/CMakeLists.txt Installs the executable target to the specified runtime directory. ```cmake install(TARGETS ${PROJECT_NAME} DESTINATION "${BIN_INSTALL_DIR}" RUNTIME) ``` -------------------------------- ### Project and Source File Setup Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/backend_qt/CMakeLists.txt Defines the project name and initializes source files for the Zint Qt backend. ```cmake project(QZint) set(${PROJECT_NAME}_SRCS qzint.cpp) ``` -------------------------------- ### Installation of the EasyProfiler Target and Exports Source: https://github.com/fralx/limereport/blob/master/3rdparty/easyprofiler/easy_profiler_core/CMakeLists.txt Installs the compiled easy_profiler library to the bin directory and exports its targets for use by other projects. ```cmake install( TARGETS easy_profiler EXPORT ${targets_export_name} DESTINATION bin INCLUDES DESTINATION "${include_install_dir}" ) install( EXPORT "${targets_export_name}" DESTINATION "${config_install_dir}" ) ``` -------------------------------- ### Install Zint Find Module Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/CMakeLists.txt Installs the FindZint.cmake module to the configured installation path. ```cmake install(FILES cmake/modules/FindZint.cmake DESTINATION ${CMAKE_MODULES_INSTALL_PATH} COMPONENT Devel) ``` -------------------------------- ### Run Zint Installation Test Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Execute the test script to verify Zint installation. ```bash ./test.sh ``` -------------------------------- ### Include Directory Setup Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/backend_qt/CMakeLists.txt Adds the backend directory to the include paths for the Zint library. ```cmake target_include_directories(${PROJECT_NAME} PUBLIC "${CMAKE_SOURCE_DIR}/backend") ``` -------------------------------- ### Setting up VC6 Build Environment Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/win32/zint_cmdline_vc6/readme.txt This command opens the Visual C++ 6.0 build environment from a standard command prompt. Ensure the path to VCVARS32.BAT is correct for your installation. ```batch "C:\Program Files (x86)\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT" ``` -------------------------------- ### Install Zint Header File Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/backend/CMakeLists.txt Installs the main Zint header file (zint.h) to the include directory. This is necessary for users to include the Zint library in their projects. ```cmake install(FILES zint.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel) ``` -------------------------------- ### Install Zint using Homebrew on macOS Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Install Zint on macOS using the Homebrew package manager. ```bash /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew install zint ``` -------------------------------- ### Install Zint Targets Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/backend/CMakeLists.txt Installs the Zint shared and static libraries. This makes the built libraries available for use by other projects. ```cmake install(TARGETS zint ${INSTALL_TARGETS_DEFAULT_ARGS}) if(ZINT_STATIC) install(TARGETS zint-static ${INSTALL_TARGETS_DEFAULT_ARGS}) endif() ``` -------------------------------- ### Build Zint on Linux Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Build and install Zint on a Linux system using CMake. ```bash mkdir build cd build cmake .. make sudo make install ``` -------------------------------- ### Install Limereport Target Source: https://github.com/fralx/limereport/blob/master/CMakeLists.txt Installs the Limereport target, including its archive, library, runtime, and public header files to specified destinations. ```cmake install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/limereport) ``` -------------------------------- ### Compile C code with libzint Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Shows the command-line instruction to compile a C source file that uses the libzint library and link against it. Ensure libzint is installed on your system. ```bash gcc -o simple simple.c -lzint ``` -------------------------------- ### API Example: Stacked Barcodes Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Demonstrates stacking barcodes using the Zint API. Call ZBarcode_Encode() multiple times for each row before calling ZBarcode_Print(). ```c my_symbol->symbology = BARCODE_CODE128; error = ZBarcode_Encode(my_symbol, "This", 0); error = ZBarcode_Encode(my_symbol, "That", 0); error = ZBarcode_Print(my_symbol); ``` -------------------------------- ### Get Zint Help Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/backend_tcl/readme.txt Display help information for the Zint Tcl binding. This command lists available options and usage details. ```tcl zint help ``` -------------------------------- ### CMakeLists.txt Configuration for EasyProfiler GUI Source: https://github.com/fralx/limereport/blob/master/3rdparty/easyprofiler/profiler_gui/CMakeLists.txt This snippet shows the main CMake configuration for the EasyProfiler GUI. It sets up build properties, finds Qt5, defines the executable target, links necessary libraries, and specifies installation rules. It also includes conditional compilation flags for Windows environments. ```cmake #set(CMAKE_PREFIX_PATH f:/qt/5.5/5.6/msvc2013_64/lib/cmake) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) find_package(Qt5Widgets) if (Qt5Widgets_FOUND) if (NOT("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") AND WIN32) set(APPLICATION_PLATFORM WIN32) endif () add_executable(profiler_gui ${APPLICATION_PLATFORM} main.cpp arbitrary_value_inspector.h arbitrary_value_inspector.cpp blocks_graphics_view.h blocks_graphics_view.cpp blocks_tree_widget.h blocks_tree_widget.cpp common_functions.h common_functions.cpp common_types.h descriptors_tree_widget.h descriptors_tree_widget.cpp easy_chronometer_item.h easy_chronometer_item.cpp easy_frame_rate_viewer.h easy_frame_rate_viewer.cpp easy_graphics_item.h easy_graphics_item.cpp easy_graphics_scrollbar.h easy_graphics_scrollbar.cpp easy_qtimer.h easy_qtimer.cpp globals.h globals.cpp globals_qobjects.cpp main_window.h main_window.cpp tree_widget_item.h tree_widget_item.cpp tree_widget_loader.h tree_widget_loader.cpp treeview_first_column_delegate.h treeview_first_column_delegate.cpp resources.qrc resources.rc ) target_link_libraries(profiler_gui Qt5::Widgets easy_profiler) if (WIN32) target_compile_definitions(profiler_gui PRIVATE -D_WIN32_WINNT=0x0600) endif () if (MINGW) target_compile_definitions(profiler_gui PRIVATE -DSTRSAFE_NO_DEPRECATE) endif () install( TARGETS profiler_gui RUNTIME DESTINATION bin ) set_property(TARGET profiler_gui PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE) else () message(STATUS "INFO\n\n\tQt5 not found! Generating EasyProfiler projects without GUI.\n") endif () ``` -------------------------------- ### Configure Include Directories for EasyProfiler Source: https://github.com/fralx/limereport/blob/master/3rdparty/easyprofiler/easy_profiler_core/CMakeLists.txt Sets the include directories for the EasyProfiler target. It specifies both build-time and install-time include paths, ensuring the library can be found during compilation and after installation. ```cmake target_include_directories(easy_profiler PUBLIC $ $ # /include ) ``` -------------------------------- ### Set Zint CMake Modules Install Path Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/CMakeLists.txt Configures the installation path for CMake modules based on whether DATA_INSTALL_DIR is set. ```cmake if(DATA_INSTALL_DIR) set(CMAKE_MODULES_INSTALL_PATH ${DATA_INSTALL_DIR}/cmake/modules) else() set(CMAKE_MODULES_INSTALL_PATH ${CMAKE_ROOT}/Modules) endif() ``` -------------------------------- ### Direct Output to Stdout Example Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Outputs the generated symbol directly to stdout, allowing it to be used in pipes. The file type can be specified using --filetype. ```bash zint -b 84 --direct --filetype=pcx -d "Data to encode" ``` -------------------------------- ### Configure Qt5 Support in CMake Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/CMakeLists.txt This snippet configures the build to use Qt5 if Qt6 is not detected or specified. It finds necessary Qt5 modules and handles potential versioning differences. Ensure Qt5 is installed and discoverable. ```cmake else() message(STATUS "Using Qt5") find_package(Qt5Widgets) find_package(Qt5Gui) find_package(Qt5UiTools) find_package(Qt5Xml) if(Qt5Widgets_FOUND AND Qt5Gui_FOUND AND Qt5UiTools_FOUND AND Qt5Xml_FOUND) message(STATUS "Qt version: " ${Qt5Core_VERSION_STRING}) # Old Qt does not provide QT_VERSION_MAJOR if (NOT QT_VERSION_MAJOR) string(SUBSTRING ${Qt5Core_VERSION_STRING} 0 1 QT_VERSION_MAJOR) endif() add_subdirectory(backend_qt) add_subdirectory(frontend_qt) else() message(STATUS "Could NOT find Qt5") endif() endif() ``` -------------------------------- ### MaxiCode Mode 4 Example Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Generates a MaxiCode barcode in Mode 4, which does not use a primary message. The mode is specified using the --mode option. ```bash zint -o test.eps -b 57 --mode=4 -d "A MaxiCode Message in Mode 4" ``` -------------------------------- ### MaxiCode Primary and Secondary Message Example Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Creates a MaxiCode barcode with specified primary and secondary messages. The primary message is set using --primary and the secondary using -d. ```bash zint -o test.eps -b 57 --primary="999999999840012" -d "Secondary Message Here" ``` -------------------------------- ### Configure Qt6 Support in CMake Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/CMakeLists.txt This snippet configures the build to use Qt6 if detected. It sets specific CMake policies and finds necessary Qt6 modules. Ensure Qt6 is installed and discoverable in your environment. ```cmake elseif($ENV{CMAKE_PREFIX_PATH} MATCHES "6[.][0-9][.][0-9]") set(USE_QT6 TRUE) message(STATUS "Using Qt6") cmake_policy(SET CMP0012 NEW) # Recognize constants in if() cmake_policy(SET CMP0072 NEW) # Choose OpenGL over legacy GL find_package(Qt6Widgets) find_package(Qt6Gui) find_package(Qt6UiTools) find_package(Qt6Xml) if(Qt6Widgets_FOUND AND Qt6Gui_FOUND AND Qt6UiTools_FOUND AND Qt6Xml_FOUND) message(STATUS "Qt version: " ${Qt6Core_VERSION_MAJOR}.${Qt6Core_VERSION_MINOR}.${Qt6Core_VERSION_PATCH}) add_subdirectory(backend_qt) add_subdirectory(frontend_qt) else() message(STATUS "Could NOT find Qt6") endif() ``` -------------------------------- ### Configure and Build Zint Backend Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/frontend_qt/howto_build_qzint_using_msvs2015.txt Uses qmake to configure the backend_qt project and then nmake to build the release version. ```bash cd backend_qt qmake backend_qt.pro nmake clean nmake release ``` -------------------------------- ### Configure and Build Zint Frontend Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/frontend_qt/howto_build_qzint_using_msvs2015.txt Uses qmake to configure the frontend_qt project and then nmake to build the release version, resulting in qtZint.exe. ```bash cd ..\frontend_qt qmake frontend_qt.pro nmake clean nmake release ``` -------------------------------- ### Initialize and Use LimeReport Engine Source: https://github.com/fralx/limereport/blob/master/README.md Include necessary headers and create a ReportEngine instance. This snippet demonstrates adding a data source, loading a report template, and previewing the report. ```cpp #include "lrreportengine.h" #include "lrcallbackdatasourceintf.h" report = new LimeReport::ReportEngine(this); report->dataManager()->addModel("string_list",stringListModel,true); report->loadFromFile("File name"); report->previewReport(); ``` -------------------------------- ### Build Project on Linux Source: https://github.com/fralx/limereport/blob/master/3rdparty/easyprofiler/README.md Standard commands to create a build directory, navigate into it, configure the project with CMake for a Release build type, and then compile the project on Unix-like systems. ```bash $ mkdir build $ cd build $ cmake -DCMAKE_BUILD_TYPE="Release" .. $ make ``` -------------------------------- ### Configure Console Project with CMake Source: https://github.com/fralx/limereport/blob/master/console/CMakeLists.txt Sets up the project name, enables Qt's meta-object, UI, and resource compilers, defines source files, and links required libraries. ```cmake project(console) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) set(PROJECT_SOURCES main.cpp ) add_executable(${PROJECT_NAME} main.cpp ${PROJECT_SOURCES}) target_link_libraries(${PROJECT_NAME} PRIVATE Qt${QT_VERSION_MAJOR}::Core limereport-qt${QT_VERSION_MAJOR} ) ``` -------------------------------- ### Build zint_bundled_getopt Static Library Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/getopt/CMakeLists.txt Defines the project name and builds a static library from the specified C source files. It also configures public include directories for the target. ```cmake project(zint_bundled_getopt) add_library(${PROJECT_NAME} STATIC getopt.c getopt1.c) target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) ``` -------------------------------- ### Run Zint GUI on Windows Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Access the Zint Barcode Studio GUI on Windows. ```bash qtZint.exe ``` -------------------------------- ### Configure Static Qt Build Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/frontend_qt/howto_build_qzint_using_msvs2015.txt Configures the Qt build with static linking, release mode, and specific modules enabled. Ensure Python is in the PATH. ```bash configure.bat -static -release -prefix c:\qt\5.15.2static -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -no-openssl -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests -mp ``` -------------------------------- ### C: Setting Symbology by Numeric Value Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Shows how to set the barcode symbology using its corresponding numeric value, for example, 50 for Code 11. ```c symbol->symbology = 50; ``` -------------------------------- ### Library Creation Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/backend_qt/CMakeLists.txt Adds a static library target for the Zint Qt backend. ```cmake add_library(${PROJECT_NAME} STATIC ${QZint_SRCS}) ``` -------------------------------- ### Help Options Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Provides access to command-line help. Use -h or --help for all options, -t or --types for symbology tables, and -e or --ecinos for ECI codes. ```bash zint -h ``` ```bash zint --types ``` ```bash zint --ecinos ``` -------------------------------- ### Project Definition and Build Settings Source: https://github.com/fralx/limereport/blob/master/designer/CMakeLists.txt Defines the project name and enables automatic build system integration for Qt's meta-object system. ```cmake project(LRDesigner) set(CMAKE_AUTOMOC ON) ``` -------------------------------- ### Generate Uninstall CMake Script Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/CMakeLists.txt This command generates an uninstall script based on a template. It's used to create a custom target that allows users to uninstall the installed files. ```cmake configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY) ``` -------------------------------- ### Set Foreground Color Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Specify the foreground (ink) color using the --fg= option followed by an RRGGBB hexadecimal value. This example sets the symbol to dark green. ```bash zint --fg=004700 -d "This" ``` -------------------------------- ### UPC Version E with Number System 1 (Command Line) Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Encodes a UPC-E symbol using Number System 1, which requires a 7-digit article number starting with '1'. ```bash zint --barcode=UPCE -d 1123456 ``` -------------------------------- ### Source File Declaration Source: https://github.com/fralx/limereport/blob/master/designer/CMakeLists.txt Lists all the source and header files required to build the LRDesigner executable. ```cmake set(LRDESIGNER_FILES designersettingmanager.h designersettingmanager.cpp main.cpp mainicon.rc ) ``` -------------------------------- ### Run Zint GUI Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Access the Zint graphical user interface. ```bash zint-qt ``` -------------------------------- ### Get Zint Library Version with ZBarcode_Version Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Retrieve the version of the linked Zint library using ZBarcode_Version. The version is returned as an integer where parts are separated by hundreds (e.g., 2.9.1 becomes 20901). ```c int ZBarcode_Version(); ``` -------------------------------- ### UPC Version E with Number System 1 (API) Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Encodes a UPC-E symbol using Number System 1 via the Zint API. This symbology is for a 7-digit article number starting with '1'. ```c my_symbol->symbology = BARCODE_UPCE; error = ZBarcode_Encode_and_Print(my_symbol, "1123456", 0, 0); ``` -------------------------------- ### Dump Profiling Blocks to File Source: https://github.com/fralx/limereport/blob/master/3rdparty/easyprofiler/README.md Enable the profiler using the EASY_PROFILER_ENABLE macro and then dump all collected profiling data to a file using profiler::dumpBlocksToFile. ```cpp int main() { EASY_PROFILER_ENABLE; /* do work*/ profiler::dumpBlocksToFile("test_profile.prof"); } ``` -------------------------------- ### Set Foreground Color with Alpha Channel Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt For output formats supporting alpha channels (PNG, TIF, SVG), specify foreground color with transparency using RRGGBBAA format. This example creates a semi-transparent green foreground. ```bash zint --fg=00ff0055 -d "This" ``` -------------------------------- ### Add Windows Kit to PATH (if rc.exe not found) Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/frontend_qt/howto_build_qzint_using_msvs2015.txt Adds the Windows Kit's x86 binary directory to the PATH environment variable if the 'rc.exe' tool is not found. ```bash set "PATH=C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86;%PATH%" ``` -------------------------------- ### UPC Version E Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Zero-compressed UPC-A for smaller packages. Requires a 6-digit article number. Check digit calculated by Zint. EAN-2/EAN-5 add-ons supported. Number System 1 encoding supported with a 7-digit input starting with '1'. ```APIDOC ## UPC Version E ### Description UPC-E is a zero-compressed version of UPC-A developed for smaller packages. The code requires a 6 digit article number (digits 0-9). The check digit is calculated by Zint. EAN-2 and EAN-5 add-on symbols can be added using the + character as with UPC-A. In addition Zint also supports Number System 1 encoding by entering a 7-digit article number stating with the digit 1. ### Command Line Example ```bash zint --barcode=UPCE -d 1123456 ``` ### API Example ```c my_symbol->symbology = BARCODE_UPCE; error = ZBarcode_Encode_and_Print(my_symbol, "1123456", 0, 0); ``` ### Options - **BARCODE_UPCE_CHK** (38): Use if input data already includes the check digit (7 or 8 digits). - **--addongap=** or **option_2**: Adjusts gap between main symbol and add-on (7-12, default 7). ``` -------------------------------- ### Generate Visual Studio Solution on Windows (Way 2) Source: https://github.com/fralx/limereport/blob/master/3rdparty/easyprofiler/README.md Command to generate a Win64 solution for Visual Studio 2013 using CMake after setting the Qt5Widgets_DIR system variable. This approach simplifies the CMake command by relying on the environment variable. ```batch $ mkdir build $ cd build $ cmake .. -G "Visual Studio 12 2013 Win64" ``` -------------------------------- ### Generate Visual Studio Solution on Windows (Way 1) Source: https://github.com/fralx/limereport/blob/master/3rdparty/easyprofiler/README.md Command to generate a Win64 solution for Visual Studio 2013 using CMake. This method requires specifying the path to the Qt5 CMake scripts. Adjust the generator name for different Visual Studio versions. ```batch $ mkdir build $ cd build $ cmake -DCMAKE_PREFIX_PATH="C:\Qt\5.3\msvc2013_64\lib\cmake" .. -G "Visual Studio 12 2013 Win64" ``` -------------------------------- ### Define Source Files Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/frontend/CMakeLists.txt Lists the source files for the project. ```cmake set(${PROJECT_NAME}_SRCS main.c) ``` -------------------------------- ### Define Zint Project and Configuration Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/backend/CMakeLists.txt Initializes the CMake project for Zint and configures header files. This sets up the build environment for the library. ```cmake project(zint) configure_file(zintconfig.h.in ${CMAKE_CURRENT_SOURCE_DIR}/zintconfig.h) ``` -------------------------------- ### Setting Output Options in Zint Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Demonstrates how to combine multiple output options using the bitwise OR operator. Options like BARCODE_BIND and READER_INIT can be set to modify the barcode output. ```c my_symbol->output_options |= BARCODE_BIND | READER_INIT; ``` -------------------------------- ### Set Environment Variables for Zint Build Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/frontend_qt/howto_build_qzint_using_msvs2015.txt Sets the necessary environment variables for the Qt directory, PATH, and qmake specification before building zint. ```bash set QTDIR=C:\Qt\5.15.2static set PATH=C:\Qt\5.15.2static\bin;%PATH% set QMAKESPEC=win32-msvc ``` -------------------------------- ### Define Source and Header Files for EasyProfiler Source: https://github.com/fralx/limereport/blob/master/3rdparty/easyprofiler/easy_profiler_core/CMakeLists.txt Lists the C++ source files, header files, and include files used to build the EasyProfiler library. These are organized into separate variables for clarity. ```cmake set(CPP_FILES block.cpp easy_socket.cpp event_trace_win.cpp nonscoped_block.cpp profile_manager.cpp reader.cpp thread_storage.cpp ) set(H_FILES chunk_allocator.h current_time.h current_thread.h event_trace_win.h nonscoped_block.h profile_manager.h thread_storage.h spin_lock.h stack_buffer.h ) set(INCLUDE_FILES include/easy/arbitrary_value.h include/easy/easy_net.h include/easy/easy_socket.h include/easy/profiler.h include/easy/reader.h include/easy/serialized_block.h include/easy/details/arbitrary_value_aux.h include/easy/details/arbitrary_value_public_types.h include/easy/details/easy_compiler_support.h include/easy/details/profiler_aux.h include/easy/details/profiler_colors.h include/easy/details/profiler_public_types.h ) source_group(include FILES ${INCLUDE_FILES}) set(SOURCES ${CPP_FILES} ${H_FILES} ${INCLUDE_FILES} ) ``` -------------------------------- ### Run Zint Command Line on Windows Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Execute the Zint command line program on Windows, including the executable extension if not in PATHEXT. ```bash zint.exe -d "This Text" ``` -------------------------------- ### Compiling Zint Command Line with VC6 GUI Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/win32/zint_cmdline_vc6/readme.txt Opens the Zint command-line project file in the Visual C++ 6.0 IDE for compilation. This step assumes the zlib and libpng libraries have been successfully compiled and placed in their respective directories. ```text open zint_cmdline_vc6.dsw in this folder with the msvc6 gui and compile ``` -------------------------------- ### Load Zint Tcl Library Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/backend_tcl/readme.txt Load the Zint Tcl library into your Tcl environment. This is the first step before using any Zint Tcl commands. ```tcl load zint.dll ``` -------------------------------- ### Setting Input Mode in Zint Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Illustrates setting the input mode for Zint, showing combinations of mutually exclusive modes (like UNICODE_MODE) with optional modes (like ESCAPE_MODE). ```c my_symbol->input_mode = UNICODE_MODE | ESCAPE_MODE; ``` -------------------------------- ### Run Zint Command Line Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Access the Zint command line program with options. ```bash zint {options} ``` -------------------------------- ### Compiling zlib library Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/win32/zint_cmdline_vc6/readme.txt Compiles the zlib library using nmake. Assumes zlib is placed in the $ZR\..\zlib directory relative to the Zint source. Generates zlib.lib and zlib1.dll. ```batch cd $ZR\..\zlib nmake -f win32\Makefile.msc ``` -------------------------------- ### Add Qt Library Directory to qmake Project Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/frontend_qt/howto_build_qzint_using_msvs2015.txt Appends the Qt static library directory to the QMAKE_LIBDIR variable within the frontend_qt.pro file to resolve linker errors. ```makefile QMAKE_LIBDIR += C:/qt/5.15.2static/lib ``` -------------------------------- ### Text and Color Options Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Controls text rendering and color space. --notext removes text, --bold makes it bold, --small uses a smaller font. --cmyk is for EPS and TIF output. ```bash zint --notext --bold --small -d "Data" ``` ```bash zint --cmyk -d "Data" ``` -------------------------------- ### Link Libraries Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/frontend/CMakeLists.txt Links the main zint library to the executable. Conditionally links 'zint_bundled_getopt' if getopt is not available. ```cmake target_link_libraries(${PROJECT_NAME} zint) if(NOT HAVE_GETOPT) target_link_libraries(${PROJECT_NAME} zint_bundled_getopt) endif() ``` -------------------------------- ### Report Qt Version and Found Components Source: https://github.com/fralx/limereport/blob/master/CMakeLists.txt Logs the detected major version of Qt and confirms if specific Qt components like QtGui and QtWidgets were found. ```cmake message(STATUS "Qt version: ${QT_VERSION_MAJOR}") if (Qt${QT_VERSION_MAJOR}Widgets_FOUND) message(STATUS "QtGui found") endif() if (Qt${QT_VERSION_MAJOR}Widgets_FOUND) message(STATUS "QtWidgets found") endif() ``` -------------------------------- ### Find Core Qt Components Source: https://github.com/fralx/limereport/blob/master/CMakeLists.txt Finds the necessary Qt components (Core, Widgets, Sql, Network, Xml, Svg, Qml, PrintSupport) required for the project. This is a required dependency. ```cmake find_package( Qt${QT_VERSION_MAJOR} COMPONENTS Core Widgets Sql Network Xml Svg Qml PrintSupport REQUIRED) ``` -------------------------------- ### Define Source Files Source: https://github.com/fralx/limereport/blob/master/3rdparty/easyprofiler/sample/CMakeLists.txt Sets the C++ source files for the project. ```cmake set(CPP_FILES main.cpp ) set(SOURCES ${CPP_FILES} ) ``` -------------------------------- ### Integrate LimeReport with CMake (FetchContent) Source: https://github.com/fralx/limereport/blob/master/README.md Use FetchContent to download and integrate LimeReport directly into your CMake project. Specify the Git repository and tag for the desired commit. ```cmake include(FetchContent) FetchContent_Declare( LimeReport GIT_REPOSITORY https://github.com/fralx/LimeReport.git GIT_TAG sha-of-the-commit ) FetchContent_MakeAvailable(LimeReport) target_link_libraries(myapp PRIVATE limereport-qt${QT_VERSION_MAJOR}) ``` -------------------------------- ### Add Executable with Profiler Enabled Source: https://github.com/fralx/limereport/blob/master/3rdparty/easyprofiler/sample/CMakeLists.txt Creates an executable linked with the EasyProfiler library. ```cmake add_executable(profiler_sample ${SOURCES}) target_link_libraries(profiler_sample easy_profiler) ``` -------------------------------- ### Define Project Name with Qt Version Source: https://github.com/fralx/limereport/blob/master/CMakeLists.txt Sets the project name, appending the major version of Qt being used. ```cmake set(PROJECT_NAME ${PROJECT_NAME}-qt${QT_VERSION_MAJOR}) ``` -------------------------------- ### Link Math Library on Non-MSVC Systems Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/backend/CMakeLists.txt Links the Zint library with the standard C math library ('m') on systems that are not using MSVC. This ensures math functions are available. ```cmake if(NOT MSVC) zint_target_link_libraries(m) endif() ``` -------------------------------- ### Package Configuration File Generation Source: https://github.com/fralx/limereport/blob/master/3rdparty/easyprofiler/easy_profiler_core/CMakeLists.txt Generates version and configuration files for package management using CMake's helper functions. ```cmake set(config_install_dir "lib/cmake/${PROJECT_NAME}") set(include_install_dir "include") set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated") # Configuration set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake") set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake") set(targets_export_name "${PROJECT_NAME}Targets") include(CMakePackageConfigHelpers) include(InstallRequiredSystemLibraries) write_basic_package_version_file( "${version_config}" VERSION ${EASY_PRODUCT_VERSION_STRING} COMPATIBILITY SameMajorVersion ) configure_package_config_file( "cmake/config.cmake.in" "${project_config}" INSTALL_DESTINATION "${config_install_dir}" ) ``` -------------------------------- ### Compiling libpng library Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/win32/zint_cmdline_vc6/readme.txt Compiles the libpng library using nmake. Assumes libpng is placed in the $ZR\..\lpng directory relative to the Zint source. Generates libpng.lib. ```batch cd $ZR\..\lpng nmake -f scripts\makefile.vcwin32 ``` -------------------------------- ### Library Linking Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/backend_qt/CMakeLists.txt Links the Zint library against necessary Qt modules and the core zint library. ```cmake target_link_libraries(${PROJECT_NAME} zint Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Gui) ``` -------------------------------- ### Find Qt Package Source: https://github.com/fralx/limereport/blob/master/CMakeLists.txt Locates the Qt package, dynamically selecting between Qt6 and Qt5 based on the USE_QT6 option. ```cmake if(USE_QT6) find_package(QT NAMES Qt6) else() find_package(QT NAMES Qt5) endif(USE_QT6) ``` -------------------------------- ### C: Encode and Print Barcode with Error Handling Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Demonstrates how to create a Zint symbol, encode data, and print a barcode while checking for errors. It shows how to access error messages and handle different error levels. ```c #include #include #include int main(int argc, char **argv) { struct zint_symbol *my_symbol; int error = 0; my_symbol = ZBarcode_Create(); strcpy(my_symbol->fgcolour, "nonsense"); error = ZBarcode_Encode_and_Print(my_symbol, argv[1], 0, 0); if (error != 0) { /* some warning or error occurred */ printf("%s\n", my_symbol->errtxt); } if (error >= ZINT_ERROR) { /* stop now */ ZBarcode_Delete(my_symbol); return 1; } /* otherwise carry on with the rest of the application */ ZBarcode_Delete(my_symbol); return 0; } ``` -------------------------------- ### Library Linking for LRDesigner Source: https://github.com/fralx/limereport/blob/master/designer/CMakeLists.txt Links the LRDesigner executable against necessary Qt modules and the limereport-qt library. ```cmake target_link_libraries(${PROJECT_NAME} PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::PrintSupport Qt${QT_VERSION_MAJOR}::Qml limereport-qt${QT_VERSION_MAJOR} ) ``` -------------------------------- ### Encoding and Saving to File Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Shows how to encode data into a barcode and save it to a file using ZBarcode_Encode() and ZBarcode_Print(). ```APIDOC ## Encoding and Saving to File ### Description Encodes data into a barcode symbol and writes the resulting image to a file. ### Functions - `ZBarcode_Encode(struct zint_symbol *symbol, const unsigned char *source, int length)`: Encodes the provided data into the symbol. - `ZBarcode_Print(struct zint_symbol *symbol, int rotate_angle)`: Writes the encoded symbol to a file (format determined by library build, typically PNG or GIF). - `ZBarcode_Encode_and_Print(struct zint_symbol *symbol, const unsigned char *source, int length, int rotate_angle)`: Combines encoding and printing into a single step. ### Example (Encode and Print) ```c #include int main(int argc, char **argv) { struct zint_symbol *my_symbol; my_symbol = ZBarcode_Create(); ZBarcode_Encode(my_symbol, argv[1], 0); ZBarcode_Print(my_symbol, 0); ZBarcode_Delete(my_symbol); return 0; } ``` ### Example (Encode and Print in One Stage) ```c #include int main(int argc, char **argv) { struct zint_symbol *my_symbol; my_symbol = ZBarcode_Create(); ZBarcode_Encode_and_Print(my_symbol, argv[1], 0, 0); ZBarcode_Delete(my_symbol); return 0; } ``` ### Notes - Input data is assumed to be Latin-1 or binary unless `input_mode` is set. - A `length` of 0 for `ZBarcode_Encode` encodes data up to the first NUL character. - `rotate_angle` can be 0, 90, 180, or 270. ``` -------------------------------- ### C: Setting Symbology by Name Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Illustrates how to set the barcode symbology using a symbolic constant, such as BARCODE_LOGMARS. ```c symbol->symbology = BARCODE_LOGMARS; ``` -------------------------------- ### Build with CMake for EasyProfiler Source: https://github.com/fralx/limereport/blob/master/3rdparty/easyprofiler/README.md Integrate EasyProfiler into your CMake build system by finding the package and linking against the library. Ensure CMAKE_PREFIX_PATH is set correctly. ```cmake project(app_for_profiling) set(SOURCES main.cpp ) #CMAKE_PREFIX_PATH should be set to /lib/cmake/easy_profiler find_package(easy_profiler REQUIRED) add_executable(app_for_profiling ${SOURCES}) target_link_libraries(app_for_profiling easy_profiler) ``` -------------------------------- ### Add Demo Subdirectories Conditionally Source: https://github.com/fralx/limereport/blob/master/CMakeLists.txt Adds subdirectories for demos (console, designer, demo_r1, demo_r2) only if the LIMEREPORT_DEMO option is enabled. ```cmake if (LIMEREPORT_DEMO) add_subdirectory(console) add_subdirectory(designer) add_subdirectory(demo_r1) add_subdirectory(demo_r2) endif() ``` -------------------------------- ### Link Directories Source: https://github.com/fralx/limereport/blob/master/3rdparty/easyprofiler/sample/CMakeLists.txt Specifies directories to search for libraries. ```cmake link_directories(${CMAKE_SOURCE_DIR}/../bin) ``` -------------------------------- ### Link Core Qt Libraries Source: https://github.com/fralx/limereport/blob/master/CMakeLists.txt Links the LimeReport library against essential Qt modules including Core, Widgets, Qml, Xml, Sql, PrintSupport, and Svg. ```cmake target_link_libraries( ${PROJECT_NAME} PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Qml Qt${QT_VERSION_MAJOR}::Xml Qt${QT_VERSION_MAJOR}::Sql Qt${QT_VERSION_MAJOR}::PrintSupport Qt${QT_VERSION_MAJOR}::Svg) ``` -------------------------------- ### Interface Source Include Directory Source: https://github.com/fralx/limereport/blob/master/CMakeLists.txt Adds the include directory from the current source directory as an interface include directory. ```cmake target_include_directories( ${PROJECT_NAME} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include) ``` -------------------------------- ### Enable C++ Build Features Source: https://github.com/fralx/limereport/blob/master/CMakeLists.txt Configures C++ build settings, including enabling automatic handling of moc, uic, and rcc, setting the C++ standard to C++17, and enabling position-independent code. ```cmake set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) ``` -------------------------------- ### Define Project Name Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/frontend/CMakeLists.txt Sets the project name for CMake. ```cmake project(zint_frontend) ``` -------------------------------- ### Read Input Data from File Source: https://github.com/fralx/limereport/blob/master/3rdparty/zint-2.10.0/docs/manual.txt Use the -i switch to specify an input file for barcode data. The input file is assumed to be UTF-8 encoded. ```bash zint -i ./somefile.txt ```