mirror of
https://github.com/zxing/zxing.git
synced 2025-01-13 20:27:34 -08:00
2c787d8440
This provide C++ support for Hanzi from issue 582. With it the C++ qrcode blackbox test results again match the Java results. The changes are mostly a re-port of various pieces of the Java code for supporting modes and bit stream parsing in QR codes. It expands the modes/parsing including ECI and FNC, refactors StringUtils as was done in Java, and makes DecoderResult include the fields that the Java code has. Although the non-qrcode blackbox tests don't all match the Java code (a known issue) the entire blackbox suite was run under valgrind and has no errors, including invalid memory references and leaks. This commit also includes a few cleanups for things like files that had mixed line endings, i.e., a combination of LF and CR-LF. git-svn-id: https://zxing.googlecode.com/svn/trunk@1966 59b500cc-1b3d-0410-9834-0bbf25fbcc57 |
||
---|---|---|
.. | ||
core | ||
ios.xcodeproj | ||
magick/src | ||
osx.xcodeproj | ||
scons | ||
.gitignore | ||
.svnignore | ||
.valgrind.supp | ||
.valgrindrc | ||
astyle-options | ||
blackboxtest.sh | ||
format | ||
ios_Prefix.pch | ||
README | ||
SConscript | ||
SConstruct |
This is only tested on Linux. With some trouble, it might work on Windows as well. The build process uses scons, a build tool written in python. You'll need to have python installed, but scons installation is optional: a runtime copy of scons (called scons-local) is included with zxing. To use the included copy of scons-local, where the instructons says enter "scons", enter "python scons/scons.py" instead. For example, to build the library only, you'd use "python scons/scons.py lib" instead of "scons lib". To build the library only: - Run "scons lib" in this folder (cpp) To build the unit tests: - Install cppunit (libcppunit-dev on Ubuntu) - Run "scons tests" - Run "testrunner" in the build folder To build the test utility: - Install Magick++ (libmagick++-dev on Ubuntu) - Run "scons zxing" An simple example application is now also included, but no compilation instructions yet. To clean: - Run "scons -c all" To use the test utility: - Basic usage: - "mkdir testout" - "zxing testout *.jpg > report.html" - With the zxing test data, from the cpp folder: - "mkdir testout" - "build/zxing testout ../core/test/data/blackbox/qrcode-*/* > report.html" To format the code: - Install astyle - Run ./format To profile the code (very useful to optimize the code): - Install valgrind - "valgrind --tool=callgrind build/zxing - path/to/test/data/*.jpg > report.html" - kcachegrind is a very nice tool to analize the output