2017年09月24日 How to read QRCode by using zbar-0.10 on Slackware-14.2 [長年日記]
_ Build of zbar-0.10 on Slackware-14.2
- ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h
- tar xvf zbar-0.10.tar.bz2
- cd zbar-0.10
- ./configure && make && make install
- rm /usr/include/linux/videodev.h
_ qrcode.sh
#! /bin/sh LD_PRELOAD=/usr/lib64/libv4l/v4l1compat.so zbarcam /dev/video0 |\ while : do read i if [ "X$i" = "X" ] then break else isUrl=`echo $i | egrep 'https*://'` if [ "X${isUrl}" != "X" ] then url=`echo $i | sed -e 's/^.*http/http/'` echo detected URL is ${url} /usr/local/firefox/firefox/firefox ${url} else echo Ignore $i fi fi done