Commit graph

97 commits

Author SHA1 Message Date
gitlost
d97fc7e110 CMake: use "GNUInstallDirs" instead of old (2008) KDE
"SetPaths.cmake" (removed) - resolves absolute paths in
  "zint-targets.cmake", ticket #318, props John Alexander;
  also remove "FindZint.cmake" install as not best practice
  (Daniel Pfeifer “Effective CMake"), but retain in tree for now;
  also remove APPLE stuff re UNIVERSAL build, obsolete, and
  setting of CMAKE_OSX_SYSROOT, seems unnecessary
2024-06-21 15:18:00 +01:00
gitlost
0a00d04ccc CMakeLists.txt: check against c not c++ (CheckCXX -> CheckC etc)
BMP/EMF/PCX/TIF: use more portable packed attribute instead of
  pragma if not MSVC
CHANNEL: pass ptr not struct to `channel_copy_precalc()`
2024-05-27 20:55:04 +01:00
gitlost
1449866d18 CMake: check for getopt_long_only() instead of just getopt()
so behaviour of CLI same
general: AIX compat, suppress some warnings
2024-01-17 21:55:11 +00:00
gitlost
6ff485e6fa Bump version to 2.13.0.9 (dev) 2023-12-18 10:28:14 +00:00
gitlost
a9b526be08 Version 2.13.0 2023-12-18 09:44:47 +00:00
ShiXiaodi
7080918350 Fix compilation errors when using CMake to add a project through add_subdirectory. 2023-10-17 15:39:20 +08:00
gitlost
55458cf659 CMake: fix clang no-deprecated-declarations 2023-06-12 14:11:49 +01:00
gitlost
9a5bcdacee CMake: disable Clang deprecations (`sprintf()') on sanitize
README: Copyright 2022 -> 2023
github: try gcc-12 for 32-bit Ubuntu
2023-06-12 13:42:15 +01:00
gitlost
5669addf01 CMake: allow ctest to be run without having to install zint or
manually set LD_LIBRARY_PATH and PATH (ticket #279, props
  Alexey Dokuchaev)
2023-01-09 01:14:42 +00:00
gitlost
a437f80d01 Bump version to 2.12.0.9 (dev) 2022-12-12 21:45:16 +00:00
gitlost
9cfc2a85b0 Version 2.12.0 2022-12-12 21:06:08 +00:00
Todor Prokopov
536a581d9e Install CMake export 2022-11-21 17:12:02 +02:00
Todor Prokopov
66431d8ec1 Add ZINT_SHARED CMake option
Either shared or static (or both) libraries can be built now.
Executables (zint and zint-qt) are linked with the static library if the shared
library it not built.
2022-11-21 15:35:06 +02:00
gitlost
c790f36815 Convert bwipp_dump.ps patch to append (.diff -> .cat) 2022-09-04 16:31:14 +01:00
gitlost
ac421144c9 Bump version to 2.11.1.9 (dev) 2022-08-25 17:58:13 +01:00
gitlost
8310a4b938 Release 2.11.1 2022-08-22 16:28:22 +01:00
gitlost
5ee3895bca Update to latest BWIPP; add ZINT_QT6 option to cmake
docs: RM4SCC 4-State -> 4-State Customer code; man page, ChangeLog
2022-07-08 19:16:02 +01:00
gitlost
e30e1f9651 RMQR: update to ISO/IEC 23941:2022 - R13x77 numeric cclens change 8 -> 7
QRCODE: use stricter interpretation of ZINT_FULL_MULTIBYTE, excluding
  certain trailing bytes
libzint: fix some confusing error messages introduced by segment stuff
general: new escape chars \U, \d and \o
backend_qt: fudge rendering of border rectangles due to scaling/translation
  rounding errors TODO: better fudge
GUI: foreground/background colours -> text boxes and icon buttons, add swap
  button, independently movable picker (NULL parent), preview colour changes,
  preview Data Window changes, add clear data (del) buttons, add zap button
  and Factory Reset menu option, various other fixes
libzint: remove STATIC_UNLESS_ZINT_TEST, use wrappers
CMake: add find package QtSvg, remove QtXml
manual: split symbology and general specs and sort, move DAFT to 4-state,
  UPC/EAN -> EAN/UPC, DataBar -> GS1 DataBar always, expand MAILMARK info,
  various other fiddlings
man page: options or -> |, expand MSI Plessey check digit options
README.linux: add packages info
license: add SPDX-License-Identifier to touched files
2022-06-09 21:52:02 +01:00
gitlost
71e72d7ecb Bump version to 2.11.0.9 (dev) 2022-05-24 21:52:02 +01:00
gitlost
6ac8c85dbb Update zint version to 2.11.0 2022-05-24 21:08:51 +01:00
gitlost
719613d4c3 GRIDMATRIX: default char set is GB 2312 only, not Latin-1 with GB 2312 alt
HANXIN/QRCODE: use Hanzi/Kanji modes when compatible ECIs given
manual: one true source now manual.pmd from which manual.txt is generated
CLI: man page moved from frontend/zint.1.gz to docs/zint.1.gz, now
  generated from docs/zint.1.pmd
add README.linux to root dir
2022-05-19 10:17:51 +01:00
gitlost
fab7435fac Performance improvements for linear encoding and raster output
- use fixed-length string tables (mostly) instead of (char *) pointer ones
   (saves ~40K)
 - re-use C128Table for CODABLOCKF and CODE16K
   (required removal of Stop character and extra CODE16K-only entry)
 - use pointer to destination and copy (memcpy/strcpy(), bin_append_posn())
   instead of concatenating (strcat()) (mostly)
 - replace last remaining bin_append()s with bin_append_posn();
   bin_append() removed
 - add length arg to toupper() and expand() (avoids strlen())
 - change is_sane() to use table-based flags (avoids an iteration)
 - rename lookup() to is_sane_lookup() and change to check and return posns
   and use in pointer to destination loops (avoids strcat()s)
 - remove special case PHARMA in expand() (dealt with in pharma())
 - make #define SILVER/CALCIUM/TECHNETIUM/KRSET etc static strings
 - replace strchr() -> posn()
 - CODE128: populate destination once in checksum loop; re-use and export
   some more routines (c128_set_a/b/c(), c128_put_in_set()) for sharing;
   prefix defines (SHIFTA -> C128_SHIFTA etc) and existing exported routines
 - use factor XOR toggle trick in checksum calcs (avoids branch)
 - raster.c: fill out single 1-pixel row and copy using new draw_bar_line(),
   copy_bar_line() routines; similarly in buffer_plot compare previous line &
   copy if same (same technique as used to improve non-half-integer scaling,
   significant performance increase, (c) codemonkey82);
   also done for PNG (BMP/GIF/PCX/TIFF not done)
 - raster/vector/output.c: shorten "output_" prefix -> "out_";
   sync vector to other raster changes to try to keep source files similar
 - 2of5.c: prefix "c25_"
JAPANPOST: return error if input data truncated (backward incompatible)
DAFT: max chars 50 -> 100
common.c: istwodigit() -> is_twodigit()
common.c/emf.c/output.c: use some further stripf()s (MSVC6 float variations)
library.c: new check_output_args() helper
zint.h: add BARCODE_LAST marker and use in library.c
QRCODE: remove a NOLINT (requires clang-tidy-13), one remaining
CMake: separate no-optimize from ZINT_DEBUG into new ZINT_NOOPT option
2021-10-20 23:05:30 +01:00
gitlost
62cc9e49f5 Bump version to 2.10.0.9 (dev) 2021-08-14 16:11:25 +01:00
gitlost
a04a44f1e6 Update zint version to 2.10.0 2021-08-10 16:14:10 +01:00
gitlost
3f33ed3eb9 CMakeLists.txt: cmake min required 3.13 -> 3.5 using CMAKE_REQUIRED_LIBRARIES; add ZINT_COVERAGE option
bmp/emf/ps.c: allow for foreground colour in ULTRA
bmp/gif/pcx.c: allow for BARCODE_STDOUT (fflush/fclose)
emf.c: hexagon rotation field not used; dont't use float index in font loop; Windows stdout binary mode
png.c: remove unused 8-bit; simplify libpng error handling and fclose outfile on error
ps.c: fix buffer overflow on colour_to_pscolor() CMYK
tif.c: fix BLACKISZERO indexes
CODE39: simplify check digit setting
reedsol.c: rs_uint_init_gf() log/alog tables must be zeroed
ZBarcode_Encode: debug: fix access out-of-bounds on non-NUL-terminated source if length < 10
manual.txt/zint.h: document NUL-terminated strings
tests: cover further cases for output (bmp/emf/etc), eci/gb18030/gb2312/sjis, reedsol, AZTEC, CODE39
2021-07-26 15:29:05 +01:00
gitlost
141cc0b866 cmake min 3.9 -> 3.13 so LINK_LIBRARIES available in try_compile()
cmake: hardcode -fsanitize=address for MSVC 2019
cmake: non-MSVC simplify setting sanitize address, undefined
test_code128: test_hibc_input: extra tests
2021-07-19 15:58:44 +01:00
gitlost
58420f3dde CMakeLists.txt: re-enable ZINT_SANITIZE for MSVC, though warning issues + works? 2021-07-12 17:06:49 +01:00
gitlost
d7d787383e backend/tests/CMakeLists.txt: cmake min 3.18 -> 3.9, bwipp_dump.ps tar (#235) 2021-07-08 12:08:59 +01:00
atom
3e995c70fb Simpily CMakeLists 2021-07-07 12:39:21 +03:00
gitlost
52c00e59ba C25/DBAR: use new func gs1_check_digit() for common GS1 check digit calc
CODE11/CODE39/EXCODE39/CODE93/PZN/CHANNEL/VIN/DBAR/UPCEAN: fuller error messages
DATAMATRIX: look_ahead_test debug counts
DBAR: consolidate option_2 cols_per_row
CMakeLists.txt: restore -fno-var-tracking-assignments for gcc no DEBUG
overall: suppress various warnings on various configs
testcommon.c: clean-up
2021-06-27 11:47:55 +01:00
gitlost
33ebcea30c Disable ZINT_SANITIZE for MSVC for now; use RESULT_VAR (MR #124, commit [ee3f25]) 2021-06-26 00:50:56 +01:00
Schaich
ee3f25fada Detect Sanitizer support
Sanitizers require both front and backend support on the target platform.
Detect whether applications can be compiled and linked with sanitizer support
and enable sanitizers that can be both compiled and linked with.
check_c_compiler_flags is insufficient here, because we need library support
on top of just compiler support.

This implicitly disables sanitizer support for most cross-compiling and
embedded targets which use gcc or llvm based toolchains but don't have library
support, while enabling it on MSVC and Intel compilers.

While here, bind the sanitizer dependency to the zint library targets, and
remove the hardcoded no-var-tracking-assignments. variable assignment
tracking is a very powerful tool to find the true source of uninitialized
value based conditional jumps, and, if undesired, it can be disabled by
configuring the ASAN_OPTIONS environment variable.
2021-06-25 03:26:12 +09:00
gitlost
54947fb435 Restore backend_qt - static only now; qzint: legacy support for renamed methods 2021-06-24 18:31:08 +01:00
gitlost
4a8cac2a5a CODEONE/DATAMATRIX/MAILMARK/PLESSEY: fix some 32-bit/portability bugs
PLESSEY: add options NCR weighted mod-10, hide check digit(s) in HRT
test suite: now runnable under MSVC 2019, 2017, 2015, MinGW/MSYS
win32/README: update with MSVC 2019 and CMake instructions
2021-06-10 11:15:39 +01:00
Schaich
88bbeb862b Move getopt out of the frontend, because it's used in the backend's test, too 2021-06-02 21:14:14 +09:00
Schaich
9ff3f13c19 Optionalize the PNG and the Qt dependencies
Expose the ability to turn these dependencies off, which results in reduced
functionality. However, it enables a developer using the zint library to
instruct cmake to build a libzint as deployed by e.g. build servers which
don't have png/zint installed, without having to uninstall those libraries
from the development system
2021-06-02 21:14:14 +09:00
Schaich
5a8e9a86ad [Untested] Remove odd looking libpng global link flag expansion
If explicit link flag handling is required, it *should* be handled by
FindPNG, and we should explicitly bind these kind of things to targets,
rather than expanding the global linker flags

I have no apple setup and can therefore not test this commit
2021-06-02 21:14:14 +09:00
Schaich
4c524838f5 Add enable_testing to the top level project
This enables us to run ctest on the top level build directory
2021-06-02 21:14:14 +09:00
Schaich
83bac8c8a5 Bind macro definitions to the zint library target
The libpng dependency is exported to consumers, while the ZINT_TEST option
affects the build output. Both are therefore marked public
2021-06-02 21:14:14 +09:00
gitlost
14f67331c2 #223 Use cmake options to interface command line parameters, props Schaich Alonso 2021-03-16 23:38:47 +00:00
gitlost
c875371289 #221 Use cmake import targets for the Qt dependency (Xml), props Schaich Alonso 2021-03-11 11:41:13 +00:00
gitlost
6322c0c2b0 #213 Use PNG::PNG for libpng, require cmake 3.5, props Schaich Alonso 2020-11-30 15:51:14 +00:00
Robin Stuart
f9b639ed9c Move QZint class into frontend binary 2020-11-22 20:17:46 +00:00
Robin Stuart
3eb31fe3f8 Take version information from CmakeLists.txt
Warning: potential incompatibility because version number is no longer stored in zint.h
2020-11-22 11:29:45 +00:00
gitlost
943ba79866 AZTEC: fix bit-stuffing; AZTECRUNE: fix >= 128; DATAMATRIX: eod shift -> 0 pad; Qt6 2020-10-26 12:21:43 +00:00
gitlost
90012ab23f EANX_CC: allow for check digit + buffer overflow for too long add-on; GUI text colour; cmake 3.0 2020-10-05 23:22:06 +01:00
gitlost
ac7b5dd282 #206 build: version to 2.9.1.9; ZINT_VERSION_BUILD (9 dev); tools/update_version.php 2020-09-04 16:38:11 +01:00
Robin Stuart
e9652df70c Change PDF417TRUNC -> PDF417COMP and version 2.8 -> 2.9 2020-07-29 22:35:31 +01:00
Robin Stuart
0628e3ee4d Update version 2.7.1 > 2.8.0 2020-04-07 17:27:45 +01:00
gitlost
9b771dba3a Make zint-static build optional 2020-03-30 10:54:21 +01:00