2009-11-01 09:30:30 -08:00
|
|
|
This is only tested on Linux. With some trouble, it might work on Windows as well.
|
|
|
|
|
2010-08-19 17:41:26 -07:00
|
|
|
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".
|
|
|
|
|
2009-11-01 09:30:30 -08:00
|
|
|
To build the library only:
|
2010-08-19 17:41:26 -07:00
|
|
|
- Run "scons lib" in this folder (cpp)
|
2009-11-01 09:30:30 -08:00
|
|
|
|
|
|
|
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"
|
|
|
|
|
2009-12-08 13:16:43 -08:00
|
|
|
An simple example application is now also included, but no compilation instructions yet.
|
|
|
|
|
2009-11-01 09:30:30 -08:00
|
|
|
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
|
|
|
|
|
2009-12-08 13:16:43 -08:00
|
|
|
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
|