replaced zxing with zbarimg
This commit is contained in:
parent
5ab144f35d
commit
09e1e74cd4
20
README.md
20
README.md
|
@ -37,9 +37,9 @@ make
|
||||||
#### Prerequisites
|
#### Prerequisites
|
||||||
|
|
||||||
- MacOS
|
- MacOS
|
||||||
- Virtual ][
|
- Virtual ][ 9.2
|
||||||
- `curl`
|
- `curl`
|
||||||
- `zxing` (<https://github.com/glassechidna/zxing-cpp>)
|
- `zbarimg` (Google for `zbar-0.10.tar.bz2`)
|
||||||
- `tifftopnm` and `pnmtojpeg` from Netpbm (<http://netpbm.sourceforge.net/>)
|
- `tifftopnm` and `pnmtojpeg` from Netpbm (<http://netpbm.sourceforge.net/>)
|
||||||
- `sox` and `soxi` from SoX (<http://sox.sourceforge.net/>)
|
- `sox` and `soxi` from SoX (<http://sox.sourceforge.net/>)
|
||||||
|
|
||||||
|
@ -48,12 +48,14 @@ make test
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Ad Hoc Testing
|
#### Ad Hoc Testing
|
||||||
|
|
||||||
```
|
```
|
||||||
./quick.sh [search string or "random"]
|
./quick.sh [search string or "random"]
|
||||||
./demo.sh [search string or "random"]
|
./demo.sh [search string or "random"]
|
||||||
```
|
```
|
||||||
|
|
||||||
Example Ad Hoc Session:
|
Example Ad Hoc Session:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ ./demo.sh alien
|
$ ./demo.sh alien
|
||||||
1 Alien Ambush
|
1 Alien Ambush
|
||||||
|
@ -72,13 +74,13 @@ Ad hoc example session video output: <http://asciiexpress.net/files/gameservercl
|
||||||
|
|
||||||
### Appendix
|
### Appendix
|
||||||
|
|
||||||
#### zxing-cpp build
|
#### Zbar MacOS Build
|
||||||
```
|
```
|
||||||
git clone https://github.com/glassechidna/zxing-cpp
|
sudo port install imagemagick qrencode
|
||||||
cd xzing-cpp
|
tar zxvf zbar-0.10.tar.bz2
|
||||||
cd build
|
cd zbar-0.10
|
||||||
cmake -G "Unix Makefiles" ..
|
./configure --disable-video --without-python --without-gtk --without-qt --with-libiconv-prefix=/opt/local
|
||||||
make
|
make -j
|
||||||
sudo cp zxing /usr/local/bin/
|
sudo make install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,16 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# needs better error handling, zxing returns true on fail, test with Stellar Invaders
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
tifftopnm <$1 2>/dev/null | pnmtojpeg >decode.jpg
|
tifftopnm <$1 2>/dev/null | pnmtojpeg >decode.jpg
|
||||||
|
|
||||||
URL=$(zxing decode.jpg && rm -f decode.jpg)
|
# zxing version
|
||||||
|
# needs better error handling, zxing returns true on fail, test with Stellar Invaders
|
||||||
|
#URL=$(zxing decode.jpg && rm -f decode.jpg)
|
||||||
|
|
||||||
|
# zbar version, better
|
||||||
|
URL=$(zbarimg -q decode.jpg && rm -f decode.jpg)
|
||||||
|
URL=$(echo $URL | sed 's/QR-Code://')
|
||||||
|
|
||||||
curl -sL $URL | sox - quick.aif
|
curl -sL $URL | sox - quick.aif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue