📄 readme
字号:
================================================================= libdmtx - Open Source Data Matrix Software================================================================= libdmtx README file (all platforms)This summary of the libdmtx package applies generally to allplatforms. For instructions regarding your specific platformplease also read the README.xxx file in this directory thatmatches your system (e.g., README.linux, README.windows,README.osx, etc...).1. Introduction-----------------------------------------------------------------libdmtx is open source software for reading and writing DataMatrix barcodes on Linux, Unix, OS X, Windows, and some mobiledevices. At its core libdmtx is a shared library, allowing C/C++programs to use its capabilities without restrictions oroverhead.The included utility programs, dmtxread and dmtxwrite, providethe official command line interface to libdmtx, and also serve asa good reference for programmers who wish to write their ownprograms that interact with libdmtx. All of the software in thelibdmtx package is distributed under the LGPL and can be usedfreely under its terms.2. Package Components-----------------------------------------------------------------libdmtx serves a diverse audience and contains several unrelatedcomponents, many of which may not be useful to you. Componentsfall into one of four categories: * Core library (useful to all libdmtx users) * Utility programs (useful to command line users) * Test programs (useful to libdmtx developers) * Language Wrappers (useful to non-C/C++ developers)The default installation will compile and install the corelibrary and all three command line utilities. The test programswill compile by performing an additional "make check", and thelanguage wrappers are built using instructions found in theirspecific directories.Users who only want the core library can disable the command lineutilities by passing any combination of the following parametersto "./configure": --disable-dmtxread --disable-dmtxwrite --disable-dmtxqueryThis is often useful in reducing compile times and avoidingunnecessary dependencies. Do note, however, that these utilitiesprovide a convenient way to test the library and learn itsbehavior, so their inclusion is recommended if possible.Appendix A. at the end of this file provides a full list of thepackage components and their properties.3. Installation-----------------------------------------------------------------libdmtx uses GNU Autotools so installation should be familiar tofree software veterans. If your platform cannot easily run theAutotools scripts (e.g., MS Visual Studio) then refer to theappropriate platform-specific README.xxx located in thisdirectory for alternate instructions.Ideally, the following 3 steps will compile and install libdmtxon your system: $ ./configure $ make $ sudo make installHowever, nobody is ever that lucky. Some details are providedbelow for when things go wrong or if you want to customize beyondthe defaults.Details on "configure" step----------------------------------------If you obtained libdmtx from Subversion you may have received anerror like "./configure: No such file or directory". Run thiscommand and try again: $ ./autogen.shThe autogen.sh command requires autoconf, automake, libtool, andpkgconfig to be installed on your system.The configure script offers many options for customizing thebuild process, many of which are described in the INSTALL file inthis directory. If the INSTALL file does not exist then you mayneed to run the "./autogen.sh" step first. Examples of commoncustomizations include: $ ./configure CC=/usr/local2/bin/gcc $ ./configure --prefix=/your/custom/path $ ./configure --disable-dmtxread --disable-dmtxwriteDetails on "make" step----------------------------------------Errors encountered during the "make" step are often a result ofmissing software dependencies. These dependencies are listed inAppendix A. in this file. Install any missing software and startover.Details on "sudo make install" step----------------------------------------If the 'sudo' command is not configured on your system thenalternatively you can yell "Yeeehaww!" as you log in as root andrun this instead: $ make installAnd finally...----------------------------------------If you want to verify that everything is working properly you canoptionally build the test programs like this: $ make checkThis command will not perform any tests, but will build theprograms that contain the test logic: simpletest, unittest,and gltest. Note that the gltest program has significantdependencies due to its graphical nature, and does not providesignificant utility unless you are testing the library decodinginternals.4. Basic Usage-----------------------------------------------------------------New users are encouraged to read the man pages for the libraryand command line utilities. However, here are a few simple casesto get you started:The dmtxwrite utility turns messages into a barcode images.Messages are passed to dmtxwrite via file or standard input, andthe output images are written to file or standard output. Thefollowing examples all produce equivalent results: $ echo -n 123456 | dmtxwrite > image.png $ echo -n 123456 | dmtxwrite -o image.png $ echo -n 123456 > message.txt; dmtxwrite message.txt > image.png $ dmtxwrite <(echo -n 123456) -o image.pngConversely,the dmtxread utility turns barcode images intomessages. Images are passed to dmtxread via standard input orfile, and the output is written to standard output. The followingexamples produce equivalent results: $ dmtxread -n image.png $ cat image.png | dmtxread -nOther typical cases: $ dmtxread -n -N1 image1.png image2.png image3.png $ dmtxread -n -N1 -m500 image.pngYou can even combine the utilities like this: $ echo 'Hello, world!' | dmtxwrite | dmtxread Hello, world! $ dmtxread image1.png | dmtxwrite -o image2.pngNote in this last example that the resulting image2.png mightlook different than image1.png. Both barcodes will contain anidentical message, but the shape of the barcode and the internalrepresentation of the encoded bits may be completely different.5. Contact-----------------------------------------------------------------Official website: http://www.libdmtx.orgSourceForge.net page: http://www.sourceforge.net/projects/libdmtxOhLoh.net page: https://www.ohloh.net/projects/libdmtxOpen mailing list: libdmtx-open_discussion@lists.sourceforge.netAppendix A. Full Listing of libdmtx Components-----------------------------------------------------------------Name: libdmtxType: Core libraryDescription: Data Matrix encoding/decoding logicLocation: libdmtxBuild: makeRequires: No dependencies-----------------------------------Name: dmtxreadType: Utility programDescription: Read Data Matrix barcodes from the command lineLocation: libdmtx/util/dmtxreadBuild: makeRequires: GraphicsMagickDisable: ./configure --disable-dmtxread-----------------------------------Name: dmtxwriteType: Utility programDescription: Create Data Matrix barcodes from the command lineLocation: libdmtx/util/dmtxwriteBuild: makeRequires: libpngDisable: ./configure --disable-dmtxwrite-----------------------------------Name: dmtxqueryType: Utility program (currently non functional)Description: Query and merge scan results from dmtxread utilityLocation: libdmtx/util/dmtxqueryBuild: makeRequires: No dependenciesDisable: Currently not possible-----------------------------------Name: pydmtxType: Language wrapperDescription: Python libdmtx wrapperLocation: libdmtx/wrappers/pythonBuild: See INSTALL file in libdmtx/wrappers/python directoryRequires: python, pilDisable: Not included in default build-----------------------------------Name: libdmtx-phpType: Language wrapperDescription: PHP libdmtx wrapperLocation: libdmtx/wrappers/phpBuild: See INSTALL file in libdmtx/wrappers/php directoryRequires: php, php-cli, php-commonDisable: Not included in default build-----------------------------------Name: libdmtx Cocoa wrapperType: Language wrapperDescription: Cocoa libdmtx wrapperLocation: libdmtx/wrappers/cocoaBuild: See INSTALL file in libdmtx/wrappers/cocoa directoryRequires: OS XDisable: Not included in default build-----------------------------------Name: gltestType: test programDescription: Scan simulated camera input from OpenGL in realtimeLocation: libdmtx/Build: make checkRequires: mesa-libGL, mesa-libGLU, SDL, libpngDisable: Not included in default build-----------------------------------Name: simpletestType: test programDescription: Simple round-trip encoding and decoding testBuild: make checkRequires: No dependenciesDisable: Not included in default build-----------------------------------Name: unittestType: test programDescription: Unit test programBuild: make checkRequires: No dependenciesDisable: Not included in default build-----------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -