Skip to content

Commit

Permalink
Merge pull request #681 from nuttyknot/master
Browse files Browse the repository at this point in the history
update iOS barcodescanner to support PhoneGap 2.0
  • Loading branch information
purplecabbage committed Aug 2, 2012
2 parents 8d1ea68 + 9f68ff9 commit 74cbbb2
Showing 5 changed files with 10,785 additions and 8,146 deletions.
15 changes: 6 additions & 9 deletions iOS/BarcodeScanner/barcodescanner.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -65,15 +65,12 @@ BarcodeScanner.prototype.encode = function(type, data, success, fail, options) {
}

//-------------------------------------------------------------------
Cordova.addConstructor(function() {
if (!window.plugins) window.plugins = {}

if (!window.plugins.barcodeScanner) {
window.plugins.barcodeScanner = new BarcodeScanner()
}
else {
console.log("Not installing barcodeScanner: window.plugins.barcodeScanner already exists")
}
})
// remove Cordova.addConstructor since it was not supported on PhoneGap 2.0
if (!window.plugins) window.plugins = {}

if (!window.plugins.barcodeScanner) {
window.plugins.barcodeScanner = new BarcodeScanner()
}

})();
4 changes: 2 additions & 2 deletions iOS/BarcodeScanner/build/Makefile
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
ZXING_VERS = 1.7
ZXING_VERS = 2.0
ZXING_URL = http://zxing.googlecode.com/files/ZXing-$(ZXING_VERS).zip

#-------------------------------------------------------------------------------
@@ -9,7 +9,7 @@ all: help
build: tmp/zxing.zip
-@rm -rf zxing
mkdir zxing
cp -R tmp/zip/zxing/cpp/core/src/zxing/* zxing
cp -R tmp/zip/zxing-$(ZXING_VERS)/cpp/core/src/zxing/* zxing
python onefile-zxing.py zxing ..
# rm -rf zxing

16 changes: 15 additions & 1 deletion iOS/BarcodeScanner/build/onefile-zxing.py
Original file line number Diff line number Diff line change
@@ -275,14 +275,28 @@ def getIncludeOrder(foundIncludes):
zxing/qrcode/decoder/DataBlock.h
zxing/qrcode/decoder/DataMask.h
zxing/qrcode/decoder/Mode.h
zxing/common/ECI.h
zxing/common/CharacterSetECI.h
zxing/qrcode/decoder/DecodedBitStreamParser.h
zxing/qrcode/detector/AlignmentPattern.h
zxing/qrcode/detector/AlignmentPatternFinder.h
zxing/qrcode/detector/Detector.h
zxing/qrcode/detector/FinderPattern.h
zxing/qrcode/detector/FinderPatternInfo.h
zxing/qrcode/detector/Detector.h
zxing/qrcode/detector/FinderPatternFinder.h
zxing/qrcode/detector/QREdgeDetector.h
zxing/FormatException.h
zxing/NotFoundException.h
zxing/common/StringUtils.h
zxing/common/detector/MonochromeRectangleDetector.h
zxing/common/detector/WhiteRectangleDetector.h
zxing/datamatrix/detector/DetectorException.h
zxing/multi/ByQuadrantReader.h
zxing/multi/MultipleBarcodeReader.h
zxing/multi/GenericMultipleBarcodeReader.h
zxing/multi/qrcode/QRCodeMultiReader.h
zxing/multi/qrcode/detector/MultiDetector.h
zxing/multi/qrcode/detector/MultiFinderPatternFinder.h
""".split()

foundError = False
Loading

0 comments on commit 74cbbb2

Please sign in to comment.