diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8800b7b..b8220fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -154,7 +154,6 @@ jobs: # # Mac OS # - Mac_OS: name: Mac OS runs-on: macos-latest diff --git a/.github/workflows/debuilder.sh b/.github/workflows/debuilder.sh index afa2030..9c3958a 100755 --- a/.github/workflows/debuilder.sh +++ b/.github/workflows/debuilder.sh @@ -15,26 +15,26 @@ BUILDDIR=${ZBARDIR}/../build echo "Generating an origin tarball" -cd ${ZBARDIR} +cd "${ZBARDIR}" -VER=$(cat ${ZBARDIR}/configure.ac|grep AC_INIT|perl -ne 'print $1 if /(\d+[.\d]+)/') +VER=$(cat "${ZBARDIR}/configure.ac" | grep AC_INIT | perl -ne 'print $1 if /(\d+[.\d]+)/') TAR=${ZBARDIR}/../zbar_${VER}.orig.tar.gz -git archive --format tgz -o ${TAR} HEAD +git archive --format tgz -o "${TAR}" HEAD echo "Retrieving Debian ruleset" -lftp -e "mget -c ${DEB_FNAME}; exit" ${DEB_URL} +lftp -e "mget -c ${DEB_FNAME}; exit" "${DEB_URL}" # Ensure to use just one version, in case multiple ones were downloaded -DEB_FNAME=$(ls -1 ${DEB_FNAME}|tail -1) +DEB_FNAME=$(ls -1 ${DEB_FNAME} | tail -1) echo "Preparing build environment" -rm -rf ${BUILDDIR}/ | true -mkdir -p ${BUILDDIR} -cd ${BUILDDIR} +rm -rf "${BUILDDIR}/" || true +mkdir -p "${BUILDDIR}" +cd "${BUILDDIR}" -tar xf ${TAR} -tar xf ${ZBARDIR}/${DEB_FNAME} +tar xf "${TAR}" +tar xf "${ZBARDIR}/${DEB_FNAME}" # Ensure that debhelper-compat will use the one expected by the build distro sed -E "s#debhelper-compat.*,#debhelper-compat (= $COMPAT),#" -i debian/control @@ -56,7 +56,7 @@ zbar (${VER}) unstable; urgency=medium -- LinuxTV bot $(date -R) EOF -OS_VERSION=$(. /etc/os-release && echo $ID-$VERSION_ID) +OS_VERSION=$(. /etc/os-release && echo "$ID-$VERSION_ID") echo "Building ZBar packages for ${OS_VERSION}" debuild -us -uc diff --git a/.gitignore b/.gitignore index d8566fe..2179d4d 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ x64/ .deps/ .dirstamp .libs/ +build/ ABOUT-NLS aclocal.m4 diff --git a/CMakeLists.txt b/CMakeLists.txt index 18631a0..b3ae0e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ set(ZBAR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "zbar root director if (MSVC) # "-DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake" -find_package(iconv REQUIRED) +find_package(Iconv REQUIRED) find_package(JPEG REQUIRED) find_package(libpng CONFIG REQUIRED) find_package(ZLIB REQUIRED) diff --git a/ChangeLog b/ChangeLog index 79e0abf..5a68b52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -709,7 +709,7 @@ version 0.2: - moved EAN/UPC specific decoding into it's own module * fix confusing configure behavior which quietly avoided building targets with missing dependencies(?!) - configure will now fail with a descriptive error message if you + configure will now fail with a descriptive error message if you do not have Magick++ and fail to specify --without-imagemagick or do not have SDL and fail to specify --without-sdl * add configure summary describing what will be built (req #1698196) diff --git a/HACKING.md b/HACKING.md index 127be34..67d7f9f 100644 --- a/HACKING.md +++ b/HACKING.md @@ -22,7 +22,7 @@ Gitlab: You can use git clone to get the latest version from any of the above repositories. -if you haven't already, grab the ZBar git repository. For example, to +If you haven't already, grab the ZBar git repository. For example, to get it from Github, use: git clone https://github.com/mchehab/zbar.git @@ -30,19 +30,21 @@ get it from Github, use: autoreconf -vfi This will generate ./configure and all that other foo you usually get with -a release. you will need to have recent versions of some basic "developer +a release. You will need to have recent versions of some basic "developer tools" installed in order for this to work, particularly GNU autotools. -these versions of autotools are known to work (newer versions should also +These versions of autotools are known to work (newer versions should also be fine): + GNU autoconf 2.61 GNU automake 1.10.1 GNU libtool 2.2.6 GNU gettext 0.18.1.1 GNU pkg-config 0.25 xmlto 0.0.20-5 (for docs building) -all above mentioned tools (except xmlto) must be installed in the same -prefix. mixing prefixes (i.g. /usr/bin and /usr/local/bin) may lead to -errors in configuration stages + +All above mentioned tools (except xmlto) must be installed in the same +prefix. Mixing prefixes (e.g. /usr/bin and /usr/local/bin) may lead to +errors in configuration stages. Writing descriptions for your patches ===================================== @@ -60,7 +62,7 @@ In practice, please add: Signed-off-by: your name -on your pathes. +on your patches. Submitting patches ================== @@ -72,7 +74,7 @@ patches and then push again to your clone, asking the patch merge using the GUI. Although we prefer if you submit patches via either Github or -Gitlab, you can also submit them via e-mail to: +Gitlab, you can also submit them via e-mail to: linux-media@vger.kernel.org @@ -80,11 +82,9 @@ If you opt to do so, please place [PATCH ZBar] at the subject of your e-mails for us to not mix them with patches for the Kernel or for other media tools. +To make your patch, run: - and want to make your patch, run: - - git diff > hacked.patch - + git diff > hacked.patch Other things for you to read, in order to know more about how to submit your work for upstreaming processes in general, that diff --git a/NEWS.md b/NEWS.md index bb69b97..36e21b4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -35,7 +35,7 @@ Version 0.21 (2019-02-12) Added support for SQ code, and the ability of compiling ZBar with the LLVM/Clang compiler. Several bugs fixes and enhancements are also found - in this release; qexisting users are encouraged to upgrade. + in this release; existing users are encouraged to upgrade. Version 0.20.1 (2018-08-08) =========================== diff --git a/README-windows.md b/README-windows.md index 3fbeb0f..9cd1009 100644 --- a/README-windows.md +++ b/README-windows.md @@ -6,7 +6,7 @@ from various sources, such as video streams, image files and raw intensity sensors. It supports EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 93, Code 39, Codabar, Interleaved 2 of 5 and QR Code. Included with the library are basic applications for decoding captured bar code images and using a video device -(eg, webcam) as a bar code scanner. For application developers, language +(e.g. webcam) as a bar code scanner. For application developers, language bindings are included for C, C++, Python and Perl as well as GUI widgets for Qt, GTK and PyGTK. @@ -133,13 +133,13 @@ Building on Ubuntu Bionic You need to install the following packages: sudo apt-get install -y \ - autoconf automake autotools-dev libdbus-1-dev \ - pkg-config binutils-mingw-w64-i686 gcc-mingw-w64 \ - mingw-w64-i686-dev mingw-w64-common win-iconv-mingw-w64-dev \ - xmlto - -Then, build Zbar with: - + autoconf automake autotools-dev libdbus-1-dev \ + pkg-config binutils-mingw-w64-i686 gcc-mingw-w64 \ + mingw-w64-i686-dev mingw-w64-common win-iconv-mingw-w64-dev \ + xmlto autopoint + +Then, build Zbar with: + export PKG_CONFIG_PATH=/usr/x86_64-w64-mingw32/lib/pkgconfig autoreconf -vfi @@ -166,13 +166,13 @@ With Cocolatey installed, ensure that you have minGw and needed deps with: choco install -r --no-progress -y msys2 make -Then use pacman to install the needed packages: - - pacman -Syu --noconfirm autoconf libtool automake make \ - autoconf-archive pkg-config - -Once you have everything needed and set the PATH to the places where the -building environment is, you can build ZBar with: +Then use pacman to install the needed packages: + + pacman -Syu --noconfirm autoconf libtool automake make \ + autoconf-archive pkg-config autopoint gettext-devel + +Once you have everything needed and set the PATH to the places where the +building environment is, you can build ZBar with: autoreconf -vfi @@ -241,7 +241,7 @@ To start the webcam reader using the default camera, type: zbarcam -To decode an image file, type eg: +To decode an image file, type e.g.: zbarimg -d examples\barcode.png diff --git a/README.md b/README.md index 9f05a93..0214cfd 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ intensity sensors. It supports EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 93, Code 39, Codabar, Interleaved 2 of 5, QR Code and SQ Code. Included with the library are basic applications for decoding captured bar -code images and using a video device (eg, webcam) as a bar code scanner. +code images and using a video device (e.g. webcam) as a bar code scanner. For application developers, language bindings are included for C, C++, Python 2 and Perl as well as GUI widgets for Qt, GTK and PyGTK 2.0. diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index a6d44d4..f497968 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -12,4 +12,4 @@ - + diff --git a/android/README b/android/README index bbdee3e..c253110 100644 --- a/android/README +++ b/android/README @@ -19,7 +19,7 @@ http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt Copyright 2008-2012 © Jeff Brown et al The Android distribution also includes pre-compiled binaries of -supporting libaries, for which copyright, license and source code +supporting libraries, for which copyright, license and source code locations are as follows: * The GNU libiconv character set conversion library Copyright (C) 1999-2011 Free Software Foundation, Inc. @@ -47,11 +47,11 @@ Option 2 - via Eclipse Right click on Android Project Select "Import" -> "File System" Select "Browse" (next to "From directory File" and select the - ZBar-Android-SDK-/libs directory and click "Open". + ZBar-Android-SDK-/libs directory and click "Open". Click the check box next to "libs" and the "Options" "Create top-level folder" check box (below). Then click "Finish". - + You should then see a "libs" folder under your project. Building @@ -61,9 +61,9 @@ Via Eclipse You have to add the zbar.jar file to your build path 1) select zbar.jar under libs 2) right-click, select "Build Path" -> "Add to Build Path" - + Via command-line -You are all set; ant will automatcially find jar files under the "libs" +You are all set; ant will automatically find jar files under the "libs" subdirectory. Documentation @@ -88,7 +88,7 @@ ZBar image scanner with the camera. Manually building ZBar JNI library ---------------------------------- -First download and unzip the iconv library source from +First download and unzip the iconv library source from http://www.gnu.org/software/libiconv/ Then kick off the build from the ZBar android directory. You will @@ -96,7 +96,7 @@ need to run the android tools to setup the local.properties file which setups sdk.dir. 1) cd /android - 2) android update project --path . + 2) android update project --path . 3) ant -Dndk.dir= -Diconv.src= zbar-all This will rebuild all source files, create zbar.jar and @@ -108,5 +108,3 @@ To clean run: ant -Dndk.dir= zbar-clean See build-ndk.xml for additional target options. - - diff --git a/android/build-ndk.xml b/android/build-ndk.xml index 7e535a7..938afa4 100644 --- a/android/build-ndk.xml +++ b/android/build-ndk.xml @@ -1,4 +1,4 @@ -