zint/README.linux
gitlost 32c9e6a98e Remove bitmap_byte_length member from zint_symbol
(was only set on BMP output to length of BMP pixel array)
EXCODE39: change to display check digit in HRT by default
CODE39/EXCODE39/LOGMARS: new hidden check digit option
  (`option_2 = 2`)
qr.c: suppress bogus gcc-13 warning (only appears on optimize)
GUI: move some symbology-specific options into Data Tab so
  separate tab unnecessary (those with few options and no
  Composite/ECI), namely: all C25XXX, CODE39/EXCODE39/LOGMARS,
  MSI_PLESSEY, CODABAR, DAFT, DPD, MAILMARK_2D, ITF-14, PZN,
  UPNQR, CHANNEL, CODE93 and VIN, adjusting grp uis.
  change Data dialog button (ellipsis) QToolButton -> QPushButton
  & vice versa zap/clear/eye/swap/scale buttons QPushButton ->
  QToolButton for better mac compat (also makes sense);
  remove some mac hacks that no longer seem necessary;
  use folder icon for Export dialog directory button
manual: document new Symbology-specific groupbox & CODE39/etc
  hidden check digit option; add annexes on Qt and Tcl backends;
  narrow some tables for better txt output;
  remove echoed image tags in txt (pandoc 3.1.5 regression?);
  add one-page HTML output to Makefile; also tex output (debug);
  add class attributes to images to aid HTML styling;
  various other fiddlings
2023-07-18 11:11:50 +01:00

129 lines
3.4 KiB
Plaintext

% Tested on Ubuntu 20.04.4 LTS, Ubuntu 22.04 LTS and Fedora Linux 38 (Workstation Edition)
1. Prerequisites for building zint
==================================
Prerequisites are git, cmake, make, gcc and gcc-c++, e.g. Ubuntu/Debian
sudo apt install git cmake build-essential
or Fedora (git, make and gcc should already be installed)
sudo dnf install cmake gcc-c++
libpng is optional but necessary for PNG support, e.g. Ubuntu/Debian
sudo apt install libpng-dev
or Fedora
sudo dnf install libpng-devel
Then either download the source code tarball
wget -O zint-2.12.0-src.tar.gz \
https://sourceforge.net/projects/zint/files/zint/2.12.0/zint-2.12.0-src.tar.gz/download
tar xf zint-2.12.0-src.tar.gz
cd zint-2.12.0-src
or clone the latest source
git clone https://git.code.sf.net/p/zint/code zint
cd zint
2. Prerequisites for building zint-qt
=====================================
zint-qt can be built with either Qt5 (preferred) or Qt6. First, install mesa (for OpenGL), e.g.
Ubuntu/Debian
sudo apt install mesa-common-dev libglu1-mesa-dev
or Fedora
sudo dnf install mesa-libGL mesa-libGL-devel
2.1. Using Qt packages
----------------------
If packages for Qt exist for your distro, it might be easiest to use them, although knowing
what their ever-changing names and contents are isn't. A complication is that zint-qt uses 2 Qt
components beyond the basic setup: Qt UI Tools (for dynamically loading the symbology-specific
tabs), and Qt SVG (for rendering icons).
E.g. on Ubuntu 22.04
sudo apt install qtbase5-dev qttools5-dev qttools5-dev-tools libqt5svg5-dev
or Ubuntu 20.04
sudo apt install qt5-default qt5-uitools
or Fedora 38 (not recommended)
sudo dnf install qt5-qtbase-devel qt5-qttools-devel qt5-qttools-static qt5-qtsvg-devel
You may need to tell CMake where to find the ".cmake" modules:
export CMAKE_MODULE_PATH=<cmake-module-path>/Qt5
e.g. CMAKE_MODULE_PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5
2.2. Using the Qt Maintenance Tool
----------------------------------
Alternatively, for a more consistent experience, sign up and download the Qt Maintenance Tool
from
https://www.qt.io/download-qt-installer
On Ubuntu/Debian you may need to install xinerama to run the tool:
sudo apt install libxcb-xinerama0
Launch the tool and install the "Desktop gcc 64-bit" component for either Qt 5.15.2 (preferred)
or Qt 6 (>= 6.1, 6.2.4 preferably, and not >= 6.3 which are incompatible).
Once Qt is installed you may need to tell CMake where it is:
export CMAKE_PREFIX_PATH=<qt-version-dir>/gcc_64
e.g. export CMAKE_PREFIX_PATH=/opt/Qt/5.15.2/gcc_64
3. Build
========
The rest is standard CMake
cd zint
mkdir build
cd build
cmake ..
make
sudo make install
4. CMake options
================
A number of options are available:
ZINT_COVERAGE:BOOL=OFF # Set code coverage flags
ZINT_DEBUG:BOOL=OFF # Set debug compile flags
ZINT_NOOPT:BOOL=OFF # Set no optimize compile flags
ZINT_SANITIZE:BOOL=OFF # Set sanitize compile/link flags
ZINT_SHARED:BOOL=ON # Build shared library
ZINT_STATIC:BOOL=OFF # Build static library
ZINT_TEST:BOOL=OFF # Set test compile flag
ZINT_USE_PNG:BOOL=ON # Build with PNG support
ZINT_USE_QT:BOOL=ON # Build with Qt support
ZINT_QT6:BOOL=OFF # If ZINT_USE_QT, use Qt6
which can be set by doing e.g.
cmake -DZINT_SANITIZE=ON ..
For details on ZINT_TEST and building the zint test suite, see "backend/tests/README".