rhodes 5.5.15 → 5.5.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +48 -13
- data/doc/oss/WM_CE_Installation_And_Build_Guidelines.md +1 -1
- data/lib/commonAPI/barcode/ext.yml +6 -2
- data/lib/commonAPI/barcode/ext/barcode.xml +1 -1
- data/lib/commonAPI/barcode/ext/build.bat +8 -0
- data/lib/commonAPI/barcode/ext/platform/qt/Barcode.pro +90 -0
- data/lib/commonAPI/barcode/ext/platform/qt/Rakefile +35 -0
- data/lib/commonAPI/barcode/ext/platform/qt/resources/barcode.qrc +10 -0
- data/lib/commonAPI/barcode/ext/platform/qt/resources/buttonBack.png +0 -0
- data/lib/commonAPI/barcode/ext/platform/qt/resources/buttonRetry.png +0 -0
- data/lib/commonAPI/barcode/ext/platform/qt/resources/buttonSave.png +0 -0
- data/lib/commonAPI/barcode/ext/platform/qt/resources/scanner_sound.wav +0 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/BarcodeController.cpp +40 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/BarcodeController.h +57 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/BarcodeDialogBuilder.h +52 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/BarcodeDialogView.cpp +175 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/BarcodeDialogView.h +68 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/Barcode_impl.cpp +109 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/decoderthread.cpp +39 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/decoderthread.h +29 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/CameraImageWrapper.cpp +131 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/CameraImageWrapper.h +39 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/QZXing.h +173 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/QZXing.pri +277 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/QZXing_global.h +13 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/imagehandler.cpp +45 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/imagehandler.h +23 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/qzxing.cpp +303 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/BigInteger.cc +405 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/BigInteger.hh +215 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/BigIntegerAlgorithms.cc +70 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/BigIntegerAlgorithms.hh +25 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/BigIntegerLibrary.hh +8 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/BigIntegerUtils.cc +50 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/BigIntegerUtils.hh +72 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/BigUnsigned.cc +697 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/BigUnsigned.hh +418 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/BigUnsignedInABase.cc +125 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/BigUnsignedInABase.hh +122 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/ChangeLog +146 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/NumberlikeArray.hh +177 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/README +71 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/win32/zxing/iconv.h +14 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/win32/zxing/msvc/stdint.h +247 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/win32/zxing/win_iconv.c +2035 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/BarcodeFormat.cpp +40 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/BarcodeFormat.h +60 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/Binarizer.cpp +45 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/Binarizer.h +50 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/BinaryBitmap.cpp +70 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/BinaryBitmap.h +56 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/ChecksumException.cpp +28 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/ChecksumException.h +34 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/DecodeHints.cpp +148 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/DecodeHints.h +85 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/Exception.cpp +43 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/Exception.h +51 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/FormatException.cpp +41 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/FormatException.h +37 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/IllegalStateException.h +35 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/InvertedLuminanceSource.cpp +68 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/InvertedLuminanceSource.h +48 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/LuminanceSource.cpp +86 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/LuminanceSource.h +59 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/MultiFormatReader.cpp +124 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/MultiFormatReader.h +48 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/NotFoundException.h +35 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/Reader.cpp +31 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/Reader.h +40 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/ReaderException.h +37 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/Result.cpp +66 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/Result.h +57 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/ResultIO.cpp +34 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/ResultPoint.cpp +108 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/ResultPoint.h +55 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/ResultPointCallback.cpp +26 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/ResultPointCallback.h +39 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/WriterException.h +17 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/ZXing.h +140 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/aztec/AztecDetectorResult.cpp +54 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/aztec/AztecDetectorResult.h +48 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/aztec/AztecReader.cpp +68 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/aztec/AztecReader.h +49 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/aztec/decoder/AztecDecoder.cpp +495 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/aztec/decoder/Decoder.h +69 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/aztec/detector/AztecDetector.cpp +548 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/aztec/detector/Detector.h +92 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/Array.h +173 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/BitArray.cpp +237 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/BitArray.h +97 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/BitArrayIO.cpp +31 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/BitMatrix.cpp +143 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/BitMatrix.h +91 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/BitSource.cpp +76 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/BitSource.h +74 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/CharacterSetECI.cpp +104 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/CharacterSetECI.h +53 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/Counted.h +140 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/DecoderResult.cpp +51 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/DecoderResult.h +54 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/DetectorResult.cpp +39 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/DetectorResult.h +43 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/GlobalHistogramBinarizer.cpp +212 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/GlobalHistogramBinarizer.h +48 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/GreyscaleLuminanceSource.cpp +80 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/GreyscaleLuminanceSource.h +53 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/GreyscaleRotatedLuminanceSource.cpp +81 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/GreyscaleRotatedLuminanceSource.h +46 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/GridSampler.cpp +122 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/GridSampler.h +45 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/HybridBinarizer.cpp +226 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/HybridBinarizer.h +67 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/IllegalArgumentException.cpp +27 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/IllegalArgumentException.h +36 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/PerspectiveTransform.cpp +107 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/PerspectiveTransform.h +49 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/Point.h +47 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/Str.cpp +61 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/Str.h +51 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/StringUtils.cpp +198 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/StringUtils.h +52 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/detector/JavaMath.h +43 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/detector/MathUtils.h +57 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/detector/MonochromeRectangleDetector.cpp +175 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/detector/MonochromeRectangleDetector.h +62 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/detector/WhiteRectangleDetector.cpp +330 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/detector/WhiteRectangleDetector.h +59 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/reedsolomon/GenericGF.cpp +150 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/reedsolomon/GenericGF.h +73 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/reedsolomon/GenericGFPoly.cpp +218 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/reedsolomon/GenericGFPoly.h +56 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/reedsolomon/ReedSolomonDecoder.cpp +174 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/reedsolomon/ReedSolomonDecoder.h +49 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/reedsolomon/ReedSolomonException.cpp +30 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/reedsolomon/ReedSolomonException.h +33 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/DataMatrixReader.cpp +54 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/DataMatrixReader.h +45 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/DataMatrixVersion.cpp +199 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/Version.h +87 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/decoder/BitMatrixParser.h +59 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/decoder/DataBlock.h +49 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/decoder/DataMatrixBitMatrixParser.cpp +361 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/decoder/DataMatrixDataBlock.cpp +113 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/decoder/DataMatrixDecodedBitStreamParser.cpp +416 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/decoder/DataMatrixDecoder.cpp +93 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/decoder/DecodedBitStreamParser.h +104 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/decoder/Decoder.h +49 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/detector/CornerPoint.h +43 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/detector/DataMatrixCornerPoint.cpp +46 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/detector/DataMatrixDetector.cpp +447 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/detector/DataMatrixDetectorException.cpp +23 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/detector/Detector.h +94 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/detector/DetectorException.h +23 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/multi/ByQuadrantReader.cpp +75 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/multi/ByQuadrantReader.h +42 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/multi/GenericMultipleBarcodeReader.cpp +137 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/multi/GenericMultipleBarcodeReader.h +51 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/multi/MultipleBarcodeReader.cpp +29 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/multi/MultipleBarcodeReader.h +41 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/multi/qrcode/QRCodeMultiReader.cpp +58 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/multi/qrcode/QRCodeMultiReader.h +36 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/multi/qrcode/detector/MultiDetector.cpp +47 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/multi/qrcode/detector/MultiDetector.h +37 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/multi/qrcode/detector/MultiFinderPatternFinder.cpp +236 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/multi/qrcode/detector/MultiFinderPatternFinder.h +47 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/CodaBarReader.cpp +340 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/CodaBarReader.h +57 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/Code128Reader.cpp +497 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/Code128Reader.h +48 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/Code39Reader.cpp +329 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/Code39Reader.h +63 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/Code93Reader.cpp +293 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/Code93Reader.h +58 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/EAN13Reader.cpp +85 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/EAN13Reader.h +49 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/EAN8Reader.cpp +65 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/EAN8Reader.h +47 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/ITFReader.cpp +337 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/ITFReader.h +54 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/MultiFormatOneDReader.cpp +96 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/MultiFormatOneDReader.h +38 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/MultiFormatUPCEANReader.cpp +110 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/MultiFormatUPCEANReader.h +41 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/OneDReader.cpp +228 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/OneDReader.h +81 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/OneDResultPoint.cpp +28 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/OneDResultPoint.h +35 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/UPCAReader.cpp +71 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/UPCAReader.h +50 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/UPCEANReader.cpp +309 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/UPCEANReader.h +88 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/UPCEReader.cpp +146 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/UPCEReader.h +47 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/PDF417Reader.cpp +170 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/PDF417Reader.h +49 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/decoder/BitMatrixParser.h +84 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/decoder/DecodedBitStreamParser.h +84 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/decoder/Decoder.h +62 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/decoder/PDF417BitMatrixParser.cpp +997 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/decoder/PDF417DecodedBitStreamParser.cpp +563 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/decoder/PDF417Decoder.cpp +118 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/decoder/ec/ErrorCorrection.cpp +214 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/decoder/ec/ErrorCorrection.h +71 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/decoder/ec/ModulusGF.cpp +120 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/decoder/ec/ModulusGF.h +72 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/decoder/ec/ModulusPoly.cpp +284 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/decoder/ec/ModulusPoly.h +68 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/detector/Detector.h +106 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/detector/LinesSampler.cpp +719 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/detector/LinesSampler.h +122 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/detector/PDF417Detector.cpp +664 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/ErrorCorrectionLevel.h +55 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/FormatInformation.h +54 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/QRCodeReader.cpp +52 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/QRCodeReader.h +48 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/QRErrorCorrectionLevel.cpp +70 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/QRFormatInformation.cpp +117 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/QRVersion.cpp +566 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/Version.h +86 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/decoder/BitMatrixParser.h +56 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/decoder/DataBlock.h +50 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/decoder/DataMask.h +50 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/decoder/DecodedBitStreamParser.h +72 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/decoder/Decoder.h +46 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/decoder/Mode.h +68 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/decoder/QRBitMatrixParser.cpp +183 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/decoder/QRDataBlock.cpp +118 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/decoder/QRDataMask.cpp +159 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/decoder/QRDecodedBitStreamParser.cpp +433 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/decoder/QRDecoder.cpp +107 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/decoder/QRMode.cpp +118 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/detector/AlignmentPattern.h +45 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/detector/AlignmentPatternFinder.h +68 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/detector/Detector.h +69 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/detector/FinderPattern.h +48 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/detector/FinderPatternFinder.h +80 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/detector/FinderPatternInfo.h +47 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/detector/QRAlignmentPattern.cpp +47 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/detector/QRAlignmentPatternFinder.cpp +208 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/detector/QRDetector.cpp +315 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/detector/QRFinderPattern.cpp +69 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/detector/QRFinderPatternFinder.cpp +638 -0
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/detector/QRFinderPatternInfo.cpp +41 -0
- data/lib/commonAPI/coreapi/ext.yml +1 -1
- data/lib/commonAPI/coreapi/ext/platform/android/src/com/rho/network/Network.java +21 -7
- data/lib/commonAPI/coreapi/ext/platform/qt/coreapi.pro +10 -0
- data/lib/commonAPI/coreapi/ext/platform/wm/src/Registry.cpp +57 -7
- data/lib/commonAPI/coreapi/ext/shared/SystemImplBase.cpp +11 -0
- data/lib/commonAPI/coreapi/ext/shared/SystemImplBase.h +2 -0
- data/lib/commonAPI/coreapi/ext/shared/qt/NavbarImpl.cpp +1 -1
- data/lib/commonAPI/coreapi/ext/system.xml +3 -0
- data/lib/commonAPI/coreapi/ext/webview.xml +0 -2
- data/lib/commonAPI/coreapi/public/api/rhonodejsapi.js +921 -0
- data/lib/commonAPI/mediacapture/ext.yml +1 -0
- data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraObject.java +3 -2
- data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraRhoListener.java +260 -230
- data/lib/commonAPI/mediacapture/ext/platform/qt/MediaCapture.pro +17 -5
- data/lib/commonAPI/mediacapture/ext/platform/qt/resources/buttonBack.png +0 -0
- data/lib/commonAPI/mediacapture/ext/platform/qt/resources/mediacapture.qrc +1 -0
- data/lib/commonAPI/mediacapture/ext/platform/qt/src/CCameraData.cpp +11 -4
- data/lib/commonAPI/mediacapture/ext/platform/qt/src/CCameraData.h +4 -7
- data/lib/commonAPI/mediacapture/ext/platform/qt/src/CameraDialogView.h +1 -6
- data/lib/commonAPI/mediacapture/ext/platform/qt/src/CameraRefresher.h +54 -0
- data/lib/commonAPI/mediacapture/ext/platform/qt/src/Camera_impl.cpp +15 -21
- data/lib/commonAPI/mediacapture/ext/platform/qt/src/ImageFilenameGetterResult.h +7 -2
- data/lib/commonAPI/mediacapture/ext/platform/qt/src/cameradialogview.cpp +34 -32
- data/lib/extensions/zlib/ext/zlib.pro +11 -0
- data/platform/android/Rhodes/jni/src/fileapi.cpp +36 -22
- data/platform/iphone/Classes/SimpleMainView.m +1 -1
- data/platform/shared/api_generator/MethodResult.cpp +22 -7
- data/platform/shared/api_generator/MethodResult.h +3 -1
- data/platform/shared/api_generator/iphone/CMethodResult.m +6 -2
- data/platform/shared/api_generator/js_helpers.cpp +19 -0
- data/platform/shared/api_generator/js_helpers.h +23 -0
- data/platform/shared/common/RhoConf.cpp +0 -1
- data/platform/shared/common/RhoPort.h +3 -0
- data/platform/shared/common/RhodesApp.cpp +46 -11
- data/platform/shared/common/RhodesApp.h +7 -0
- data/platform/shared/common/RhodesAppBase.cpp +5 -1
- data/platform/shared/common/RhodesAppBase.h +8 -1
- data/platform/shared/common/ThreadQueue.h +1 -1
- data/platform/shared/common/map/BaseMapEngine.cpp +2 -0
- data/platform/shared/net/HttpServer.cpp +0 -1
- data/platform/shared/qt/RhoSimulator.pro +11 -0
- data/platform/shared/qt/RhoSimulator_dev.pro +12 -2
- data/platform/shared/qt/curl/curl.pro +10 -0
- data/platform/shared/qt/rhodes/guithreadfunchelper.h +29 -0
- data/platform/shared/qt/rhodes/iexecutable.h +9 -0
- data/platform/shared/qt/rhodes/impl/MainWindowImpl.cpp +10 -21
- data/platform/shared/qt/rhodes/impl/MainWindowImpl.h +1 -1
- data/platform/shared/qt/rhodes/impl/QtSystemImpl.cpp +15 -1
- data/platform/shared/qt/rhodes/impl/RhoThreadImpl.cpp +7 -7
- data/platform/shared/qt/rhodes/mainwindowinterface.h +12 -0
- data/platform/shared/qt/rhodes/newVersion/DateTimeDialog.cpp +96 -0
- data/platform/shared/qt/rhodes/newVersion/DateTimeDialog.h +54 -0
- data/platform/shared/qt/rhodes/newVersion/ExternalWebView.cpp +45 -0
- data/platform/shared/qt/rhodes/newVersion/ExternalWebView.h +47 -0
- data/platform/shared/qt/rhodes/newVersion/QWebEngineViewSelectionSuppressor.h +103 -0
- data/platform/shared/qt/rhodes/newVersion/QtMainWindow.cpp +1181 -0
- data/platform/shared/qt/rhodes/newVersion/QtMainWindow.h +194 -0
- data/platform/shared/qt/rhodes/newVersion/QtNativeTabBar.cpp +107 -0
- data/platform/shared/qt/rhodes/newVersion/QtNativeTabBar.h +40 -0
- data/platform/shared/qt/rhodes/newVersion/RhoNativeApiCall.cpp +51 -0
- data/platform/shared/qt/rhodes/newVersion/RhoNativeApiCall.h +52 -0
- data/platform/shared/qt/rhodes/newVersion/main.cpp +280 -0
- data/platform/shared/qt/rhodes/newVersion/qtwebenginepage.cpp +19 -0
- data/platform/shared/qt/rhodes/newVersion/qtwebenginepage.h +21 -0
- data/platform/shared/qt/rhodes/newVersion/qtwebengineview.cpp +6 -0
- data/platform/shared/qt/rhodes/newVersion/qtwebengineview.h +18 -0
- data/platform/shared/qt/rhodes/{DateTimeDialog.cpp → oldVersion/DateTimeDialog.cpp} +0 -0
- data/platform/shared/qt/rhodes/{DateTimeDialog.h → oldVersion/DateTimeDialog.h} +0 -0
- data/platform/shared/qt/rhodes/{DateTimeDialog.ui → oldVersion/DateTimeDialog.ui} +0 -0
- data/platform/shared/qt/rhodes/{ExternalWebView.cpp → oldVersion/ExternalWebView.cpp} +0 -0
- data/platform/shared/qt/rhodes/{ExternalWebView.h → oldVersion/ExternalWebView.h} +0 -0
- data/platform/shared/qt/rhodes/{ExternalWebView.ui → oldVersion/ExternalWebView.ui} +0 -0
- data/platform/shared/qt/rhodes/{QtMainWindow.cpp → oldVersion/QtMainWindow.cpp} +4 -1
- data/platform/shared/qt/rhodes/{QtMainWindow.h → oldVersion/QtMainWindow.h} +8 -5
- data/platform/shared/qt/rhodes/{QtMainWindow.ui → oldVersion/QtMainWindow.ui} +0 -0
- data/platform/shared/qt/rhodes/{QtNativeTabBar.cpp → oldVersion/QtNativeTabBar.cpp} +0 -0
- data/platform/shared/qt/rhodes/{QtNativeTabBar.h → oldVersion/QtNativeTabBar.h} +0 -0
- data/platform/shared/qt/rhodes/{QtWebInspector.cpp → oldVersion/QtWebInspector.cpp} +0 -0
- data/platform/shared/qt/rhodes/{QtWebInspector.h → oldVersion/QtWebInspector.h} +0 -0
- data/platform/shared/qt/rhodes/{QtWebInspector.ui → oldVersion/QtWebInspector.ui} +0 -0
- data/platform/shared/qt/rhodes/{QtWebPage.cpp → oldVersion/QtWebPage.cpp} +0 -0
- data/platform/shared/qt/rhodes/{QtWebPage.h → oldVersion/QtWebPage.h} +0 -0
- data/platform/shared/qt/rhodes/{RhoNativeApiCall.cpp → oldVersion/RhoNativeApiCall.cpp} +0 -0
- data/platform/shared/qt/rhodes/{RhoNativeApiCall.h → oldVersion/RhoNativeApiCall.h} +0 -0
- data/platform/shared/qt/rhodes/{main.cpp → oldVersion/main.cpp} +2 -0
- data/platform/shared/qt/rhodes/{qkineticscroller.cpp → oldVersion/qkineticscroller.cpp} +0 -0
- data/platform/shared/qt/rhodes/{qkineticscroller.h → oldVersion/qkineticscroller.h} +0 -0
- data/platform/shared/qt/rhodes/{qkineticscroller_p.h → oldVersion/qkineticscroller_p.h} +0 -0
- data/platform/shared/qt/rhodes/{qtflickgesture.cpp → oldVersion/qtflickgesture.cpp} +0 -0
- data/platform/shared/qt/rhodes/{qtflickgesture_p.h → oldVersion/qtflickgesture_p.h} +0 -0
- data/platform/shared/qt/rhodes/{qtscroller.cpp → oldVersion/qtscroller.cpp} +0 -0
- data/platform/shared/qt/rhodes/{qtscroller.h → oldVersion/qtscroller.h} +0 -0
- data/platform/shared/qt/rhodes/{qtscroller_p.h → oldVersion/qtscroller_p.h} +0 -0
- data/platform/shared/qt/rhodes/{qtscrollerfilter.cpp → oldVersion/qtscrollerfilter.cpp} +0 -0
- data/platform/shared/qt/rhodes/{qtscrollerfilter_p.h → oldVersion/qtscrollerfilter_p.h} +0 -0
- data/platform/shared/qt/rhodes/{qtscrollerproperties.cpp → oldVersion/qtscrollerproperties.cpp} +0 -0
- data/platform/shared/qt/rhodes/{qtscrollerproperties.h → oldVersion/qtscrollerproperties.h} +0 -0
- data/platform/shared/qt/rhodes/{qtscrollerproperties_p.h → oldVersion/qtscrollerproperties_p.h} +0 -0
- data/platform/shared/qt/rhodes/{qtscrollevent.cpp → oldVersion/qtscrollevent.cpp} +0 -0
- data/platform/shared/qt/rhodes/{qtscrollevent.h → oldVersion/qtscrollevent.h} +0 -0
- data/platform/shared/qt/rhodes/{qtscrollevent_p.h → oldVersion/qtscrollevent_p.h} +0 -0
- data/platform/shared/qt/rhodes/{qwebviewkineticscroller.cpp → oldVersion/qwebviewkineticscroller.cpp} +0 -0
- data/platform/shared/qt/rhodes/{qwebviewkineticscroller.h → oldVersion/qwebviewkineticscroller.h} +0 -0
- data/platform/shared/qt/rhodes/{qwebviewselectionsuppressor.h → oldVersion/qwebviewselectionsuppressor.h} +0 -0
- data/platform/shared/qt/rhodes/rhodes.pro +92 -47
- data/platform/shared/qt/rholib/rholib.pro +32 -19
- data/platform/shared/qt/rubylib/rubylib.pro +12 -0
- data/platform/shared/qt/sqlite3/sqlite3.pro +11 -1
- data/platform/shared/qt/syncengine/syncengine.pro +10 -0
- data/platform/shared/ruby/eval.c +2 -4
- data/platform/shared/ruby/eval_intern.h +12 -0
- data/platform/shared/ruby/ext/rho/extensions.c +6 -2
- data/platform/shared/ruby/include/ruby/missing.h +6 -4
- data/platform/shared/ruby/io.c +27 -0
- data/platform/shared/ruby/numeric.c +5 -2
- data/platform/shared/ruby/time.c +4 -0
- data/platform/shared/ruby/win32/win32 backup.c +5808 -0
- data/platform/shared/ruby/win32/win32.c +2254 -2131
- data/platform/shared/unzip/deflate.cpp +6 -1
- data/platform/shared/unzip/gunzip.cpp +1 -1
- data/platform/shared/unzip/unzip.cpp +3 -6
- data/platform/shared/unzip/zip.cpp +1 -25
- data/platform/shared/unzip/zutil.cpp +1 -1
- data/platform/shared/unzip/zutil.h +1 -1
- data/platform/win32/RhoSimulator/rho/Databases/Databases.db +0 -0
- data/platform/win32/RhoSimulator/rho/WebpageIcons.db +0 -0
- data/platform/win32/RhoSimulator/rho/rholog.txt_pos +0 -0
- data/platform/win32/RhoSimulator/rhosimulator/Databases/Databases.db +0 -0
- data/platform/win32/RhoSimulator/rhosimulator/WebpageIcons.db +0 -0
- data/platform/win32/RhoSimulator/rhosimulator/rholog.txt_pos +0 -0
- data/platform/wm/build/build_inf.js +7 -3
- data/platform/wm/build/wm.rake +96 -30
- data/platform/wm/rhodes/rho/rubyext/SystemImpl.cpp +3 -1
- data/rakefile.rb +48 -13
- data/res/generators/rhogen.rb +87 -8
- data/res/generators/templates/api/cpp/montana_js_wrap.cpp +1 -1
- data/res/generators/templates/application/nodejs/main.js +501 -0
- data/res/generators/templates/application/nodejs/rhoapp.js +71 -0
- data/res/generators/templates/application/nodejs/server/app.js +19 -0
- data/res/generators/templates/application/nodejs/server/package.json +16 -0
- data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/css/bootstrap-theme.css +587 -0
- data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/css/bootstrap-theme.css.map +1 -0
- data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/css/bootstrap-theme.min.css +6 -0
- data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/css/bootstrap-theme.min.css.map +1 -0
- data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/css/bootstrap.css +6757 -0
- data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/css/bootstrap.css.map +1 -0
- data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/css/bootstrap.min.css +6 -0
- data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/css/bootstrap.min.css.map +1 -0
- data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.eot +0 -0
- data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.svg +288 -0
- data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.woff +0 -0
- data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/js/bootstrap.js +2377 -0
- data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/js/bootstrap.min.js +7 -0
- data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/js/npm.js +13 -0
- data/res/generators/templates/application/nodejs/server/public/images/bar/back_btn.png +0 -0
- data/res/generators/templates/application/nodejs/server/public/images/bar/back_btn@2x.png +0 -0
- data/res/generators/templates/application/nodejs/server/public/images/bar/back_btn@3x.png +0 -0
- data/res/generators/templates/application/nodejs/server/public/images/bar/forward_btn.png +0 -0
- data/res/generators/templates/application/nodejs/server/public/images/bar/forward_btn@2x.png +0 -0
- data/res/generators/templates/application/nodejs/server/public/images/bar/forward_btn@3x.png +0 -0
- data/res/generators/templates/application/nodejs/server/public/images/bar/gears.png +0 -0
- data/res/generators/templates/application/nodejs/server/public/images/bar/gears@2x.png +0 -0
- data/res/generators/templates/application/nodejs/server/public/images/bar/gears@3x.png +0 -0
- data/res/generators/templates/application/nodejs/server/public/images/bar/home_btn.png +0 -0
- data/res/generators/templates/application/nodejs/server/public/images/bar/home_btn@2x.png +0 -0
- data/res/generators/templates/application/nodejs/server/public/images/bar/home_btn@3x.png +0 -0
- data/res/generators/templates/application/nodejs/server/public/images/bar/sync_btn.png +0 -0
- data/res/generators/templates/application/nodejs/server/public/images/bar/sync_btn@2x.png +0 -0
- data/res/generators/templates/application/nodejs/server/public/images/bar/sync_btn@3x.png +0 -0
- data/res/generators/templates/application/nodejs/server/public/jquery/jquery-3.1.1.min.js +4 -0
- data/res/generators/templates/application/nodejs/server/public/jquery/jquery-3.1.1.min.map +1 -0
- data/res/generators/templates/application/nodejs_build.yml +76 -0
- data/res/generators/templates/application/nodejs_rhoconfig.txt +137 -0
- data/version +1 -1
- metadata +345 -77
- data/platform/win32/RhoSimulator/D3Dcompiler_46.dll +0 -0
- data/platform/win32/RhoSimulator/Qt5Core.dll +0 -0
- data/platform/win32/RhoSimulator/Qt5Gui.dll +0 -0
- data/platform/win32/RhoSimulator/Qt5Multimedia.dll +0 -0
- data/platform/win32/RhoSimulator/Qt5MultimediaWidgets.dll +0 -0
- data/platform/win32/RhoSimulator/Qt5Network.dll +0 -0
- data/platform/win32/RhoSimulator/Qt5OpenGL.dll +0 -0
- data/platform/win32/RhoSimulator/Qt5PrintSupport.dll +0 -0
- data/platform/win32/RhoSimulator/Qt5Qml.dll +0 -0
- data/platform/win32/RhoSimulator/Qt5Quick.dll +0 -0
- data/platform/win32/RhoSimulator/Qt5Sensors.dll +0 -0
- data/platform/win32/RhoSimulator/Qt5Sql.dll +0 -0
- data/platform/win32/RhoSimulator/Qt5V8.dll +0 -0
- data/platform/win32/RhoSimulator/Qt5WebKit.dll +0 -0
- data/platform/win32/RhoSimulator/Qt5WebKitWidgets.dll +0 -0
- data/platform/win32/RhoSimulator/Qt5Widgets.dll +0 -0
- data/platform/win32/RhoSimulator/RhoSimulator.exe +0 -0
- data/platform/win32/RhoSimulator/icudt52.dll +0 -0
- data/platform/win32/RhoSimulator/icuin52.dll +0 -0
- data/platform/win32/RhoSimulator/icuuc52.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qgif.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qico.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qjpeg.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qmng.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qsvg.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qtga.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qtiff.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qwbmp.dll +0 -0
- data/platform/win32/RhoSimulator/libEGL.dll +0 -0
- data/platform/win32/RhoSimulator/libGLESv2.dll +0 -0
- data/platform/win32/RhoSimulator/libeay32.dll +0 -0
- data/platform/win32/RhoSimulator/msvcp110.dll +0 -0
- data/platform/win32/RhoSimulator/msvcr110.dll +0 -0
- data/platform/win32/RhoSimulator/platforms/qwindows.dll +0 -0
- data/platform/win32/RhoSimulator/ssleay32.dll +0 -0
- data/platform/win32/RhoSimulator/vccorlib110.dll +0 -0
- data/platform/win32/RhoSimulator/vcomp110.dll +0 -0
data/res/generators/rhogen.rb
CHANGED
@@ -192,7 +192,7 @@ module Rhogen
|
|
192
192
|
template.source = 'app/Settings/wait.erb'
|
193
193
|
template.destination = "#{name}/app/Settings/wait.erb"
|
194
194
|
end
|
195
|
-
|
195
|
+
|
196
196
|
file :androidmanifesterb do |file|
|
197
197
|
file.source = 'AndroidManifest.erb'
|
198
198
|
file.destination = "#{name}/AndroidManifest.erb"
|
@@ -337,6 +337,84 @@ module Rhogen
|
|
337
337
|
end
|
338
338
|
end
|
339
339
|
|
340
|
+
|
341
|
+
class NodeJSAppGenerator < BaseGenerator
|
342
|
+
|
343
|
+
def self.source_root
|
344
|
+
File.join(File.dirname(__FILE__), 'templates', 'application')
|
345
|
+
end
|
346
|
+
|
347
|
+
desc <<-DESC
|
348
|
+
Generates a new Node.js-based rhodes application.
|
349
|
+
|
350
|
+
Options:
|
351
|
+
--rhoconnect - include rhoconnect-client in application
|
352
|
+
|
353
|
+
Required:
|
354
|
+
name - application name
|
355
|
+
|
356
|
+
Optional:
|
357
|
+
syncserver - url to the rhosync application (i.e. "http://localhost:9292")
|
358
|
+
zip_url - optional url to zipfile download of bundle (this can be your RhoHub Bundle URL)
|
359
|
+
DESC
|
360
|
+
|
361
|
+
#option :testing_framework, :desc => 'Specify which testing framework to use (spec, test_unit)'
|
362
|
+
|
363
|
+
option :rhoconnect, :desc => '', :as => :boolean, :default => false
|
364
|
+
|
365
|
+
first_argument :name, :required => true, :desc => 'application name'
|
366
|
+
second_argument :syncserver, :required => false, :desc => 'url to the source adapter (i.e. "" or "http://rhosync.rhohub.com/apps/myapp/sources/")'
|
367
|
+
third_argument :zip_url, :required => false, :desc => 'optional url to zipfile download of bundle'
|
368
|
+
|
369
|
+
invoke :appResources
|
370
|
+
|
371
|
+
template :config do |template|
|
372
|
+
zip_url ||= ''
|
373
|
+
syncserver ||= ''
|
374
|
+
template.source = 'nodejs_rhoconfig.txt'
|
375
|
+
template.destination = "#{name}/rhoconfig.txt"
|
376
|
+
end
|
377
|
+
|
378
|
+
template :buildyml do |template|
|
379
|
+
@sdk_path = File.expand_path(File.join(File.dirname(__FILE__), '..', '..'))
|
380
|
+
@sdk_path.gsub!('\\', '/')
|
381
|
+
@app_name = name
|
382
|
+
@app_name_cleared = name.downcase.split(/[^a-zA-Z0-9\.\-]/).map { |w| w.downcase }.join("")
|
383
|
+
puuid = UUID.new
|
384
|
+
generated_uuid = puuid.generate
|
385
|
+
@productid = generated_uuid
|
386
|
+
@uid = '0x'+(0xE0000000 + rand(0xFFFFFFF)).to_s(16)
|
387
|
+
@rhoconnectclient_ext = '"rhoconnect-client"' if rhoconnect
|
388
|
+
template.source = 'nodejs_build.yml'
|
389
|
+
template.destination = "#{name}/build.yml"
|
390
|
+
end
|
391
|
+
|
392
|
+
template :gitignore do |template|
|
393
|
+
template.source = 'gitignore'
|
394
|
+
template.destination = "#{name}/.gitignore"
|
395
|
+
end
|
396
|
+
|
397
|
+
directory :resources do |directory|
|
398
|
+
directory.source = 'resources'
|
399
|
+
directory.destination = "#{name}/resources"
|
400
|
+
end
|
401
|
+
|
402
|
+
file :androidmanifesterb do |file|
|
403
|
+
file.source = 'AndroidManifest.erb'
|
404
|
+
file.destination = "#{name}/AndroidManifest.erb"
|
405
|
+
end
|
406
|
+
|
407
|
+
directory :public do |directory|
|
408
|
+
directory.source = 'nodejs'
|
409
|
+
directory.destination = "#{name}/nodejs/"
|
410
|
+
end
|
411
|
+
|
412
|
+
template :rakefile do |template|
|
413
|
+
template.source = 'Rakefile'
|
414
|
+
template.destination = "#{name}/Rakefile"
|
415
|
+
end
|
416
|
+
end
|
417
|
+
|
340
418
|
class RubyModelGenerator < BaseGenerator
|
341
419
|
def self.source_root
|
342
420
|
File.join(File.dirname(__FILE__), 'templates', 'model')
|
@@ -596,14 +674,14 @@ module Rhogen
|
|
596
674
|
def rhodes_root_path
|
597
675
|
return rhodes_root
|
598
676
|
end
|
599
|
-
|
677
|
+
|
600
678
|
def load_plist(fname)
|
601
679
|
require 'cfpropertylist'
|
602
680
|
plist = CFPropertyList::List.new(:file => fname)
|
603
681
|
data = CFPropertyList.native_types(plist.value)
|
604
682
|
data
|
605
|
-
end
|
606
|
-
|
683
|
+
end
|
684
|
+
|
607
685
|
def get_xcode_version
|
608
686
|
info_path = '/Applications/XCode.app/Contents/version.plist'
|
609
687
|
ret_value = '0.0'
|
@@ -615,9 +693,9 @@ module Rhogen
|
|
615
693
|
end
|
616
694
|
puts '$$$ XCode version is '+ret_value
|
617
695
|
return ret_value
|
618
|
-
end
|
619
|
-
|
620
|
-
|
696
|
+
end
|
697
|
+
|
698
|
+
|
621
699
|
|
622
700
|
directory :root do |directory|
|
623
701
|
@options[:force] = true
|
@@ -1177,7 +1255,7 @@ module Rhogen
|
|
1177
1255
|
fname = File.join('/Users/snowyowl/work/rhomobile/rhodes/rendered/',comosite_name)
|
1178
1256
|
File.open(fname,'w') { |io| io << action.render.to_lines.join() }
|
1179
1257
|
end
|
1180
|
-
rescue
|
1258
|
+
rescue
|
1181
1259
|
puts "Error processing: #{action.source.inspect}".bold.red
|
1182
1260
|
raise
|
1183
1261
|
end
|
@@ -1499,6 +1577,7 @@ module Rhogen
|
|
1499
1577
|
|
1500
1578
|
add :app, RubyAppGenerator
|
1501
1579
|
add :jsapp, JavascriptAppGenerator
|
1580
|
+
add :nodejsapp, NodeJSAppGenerator
|
1502
1581
|
add :model, RubyModelGenerator
|
1503
1582
|
add :jsmodel, JavascriptModelGenerator
|
1504
1583
|
add :spec, SpecGenerator
|
@@ -211,7 +211,7 @@ end
|
|
211
211
|
|
212
212
|
if module_method.has_callback != ModuleMethod::CALLBACK_NONE %>
|
213
213
|
oRes.setCallInUIThread(<%= (module_method.run_in_thread == ModuleMethod::RUN_IN_THREAD_UI) ? "true" : "false" %>);
|
214
|
-
oRes.setJSCallback( strCallbackID );
|
214
|
+
oRes.setJSCallback( strCallbackID, strJsVmID);
|
215
215
|
oRes.setCallbackParam( strCallbackParam );
|
216
216
|
<%
|
217
217
|
end
|
@@ -0,0 +1,501 @@
|
|
1
|
+
|
2
|
+
var path = require('path');
|
3
|
+
var util = require('util');
|
4
|
+
|
5
|
+
function JXmobile(x) {
|
6
|
+
if (!(this instanceof JXmobile)) return new JXmobile(x);
|
7
|
+
|
8
|
+
this.name = x;
|
9
|
+
}
|
10
|
+
|
11
|
+
function callJXcoreNative(name, args) {
|
12
|
+
var params = Array.prototype.slice.call(args, 0);
|
13
|
+
var fnc = [name];
|
14
|
+
var arr = fnc.concat(params);
|
15
|
+
arr.push(cb);
|
16
|
+
process.natives.callJXcoreNative.apply(null, arr);
|
17
|
+
}
|
18
|
+
|
19
|
+
JXmobile.prototype.call = function () {
|
20
|
+
callJXcoreNative(this.name, arguments);
|
21
|
+
return this;
|
22
|
+
};
|
23
|
+
|
24
|
+
var isAndroid = false; //process.platform == "android";
|
25
|
+
|
26
|
+
global.Mobile = JXmobile;
|
27
|
+
|
28
|
+
|
29
|
+
// see jxcore.java - jxcore.m
|
30
|
+
process.setPaths();
|
31
|
+
|
32
|
+
if (isAndroid) {
|
33
|
+
// bring APK support into 'fs'
|
34
|
+
process.registerAssets = function (from) {
|
35
|
+
var fs = from;
|
36
|
+
if (!fs || !fs.existsSync)
|
37
|
+
fs = require('fs');
|
38
|
+
|
39
|
+
var path = require('path');
|
40
|
+
var folders = process.natives.assetReadDirSync();
|
41
|
+
console.log('folders are: '+JSON.stringify(folders));
|
42
|
+
var root = process.cwd();
|
43
|
+
|
44
|
+
// patch execPath to APK folder
|
45
|
+
process.execPath = root;
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
function createRealPath(pd) {
|
51
|
+
var arr = [ pd, pd + "", pd + "/jxcore" ];
|
52
|
+
|
53
|
+
for ( var i = 0; i < 3; ++ i ) {
|
54
|
+
try {
|
55
|
+
console.log( ">>>>>>>>>>>> WILL TRY PATH: " + arr[i]);
|
56
|
+
|
57
|
+
|
58
|
+
if (!fs.existsSync(arr[i])) {
|
59
|
+
fs.mkdirSync(arr[i]);
|
60
|
+
}
|
61
|
+
|
62
|
+
} catch (e) {
|
63
|
+
console.error(">>>>>>>>>>>> Permission issues ? ", arr[i], e)
|
64
|
+
}
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
createRealPath(process.userPath);
|
69
|
+
|
70
|
+
var sroot = root;
|
71
|
+
|
72
|
+
console.log( ">>>>>>>>>>>>>>>>> SROOT: " + sroot );
|
73
|
+
|
74
|
+
var hasRootLink = false;
|
75
|
+
if ( root.indexOf('/data/user/') === 0 ) {
|
76
|
+
var pd = process.userPath.replace(/\/data\/user\/[0-9]+\//, "/data/data/");
|
77
|
+
createRealPath(pd);
|
78
|
+
sroot = root.replace(/\/data\/user\/[0-9]+\//,"/data/data/");
|
79
|
+
hasRootLink = true;
|
80
|
+
}
|
81
|
+
|
82
|
+
console.log( ">>>>>>>>>>>>>>>>> SROOT AFTER CHANGE: " + sroot );
|
83
|
+
|
84
|
+
var jxcore_root;
|
85
|
+
|
86
|
+
var prepVirtualDirs = function() {
|
87
|
+
var _ = {};
|
88
|
+
for ( var o in folders ) {
|
89
|
+
console.log( ">>>>>>>>> prepVirtualDirs, folder: " + o );
|
90
|
+
var sub = o.split('/');
|
91
|
+
|
92
|
+
var last = _;
|
93
|
+
|
94
|
+
for ( var i in sub ) {
|
95
|
+
var loc = sub[i];
|
96
|
+
if (!last.hasOwnProperty(loc)) {
|
97
|
+
last[loc] = {};
|
98
|
+
}
|
99
|
+
last = last[loc];
|
100
|
+
}
|
101
|
+
|
102
|
+
last['!s'] = folders[o];
|
103
|
+
}
|
104
|
+
|
105
|
+
console.log( ">>>>>>>>>>>>> INSPECT:" + util.inspect( _ ) );
|
106
|
+
|
107
|
+
folders = {};
|
108
|
+
|
109
|
+
var sp = sroot.split('/');
|
110
|
+
if ( sp[0] === '' ) {
|
111
|
+
sp.shift();
|
112
|
+
}
|
113
|
+
|
114
|
+
jxcore_root = folders;
|
115
|
+
|
116
|
+
for ( var o in sp ) {
|
117
|
+
if (sp[o] === 'jxcore') {
|
118
|
+
continue;
|
119
|
+
}
|
120
|
+
|
121
|
+
jxcore_root[sp[o]] = {};
|
122
|
+
jxcore_root = jxcore_root[sp[o]];
|
123
|
+
}
|
124
|
+
|
125
|
+
jxcore_root['jxcore'] = _;
|
126
|
+
jxcore_root = _;
|
127
|
+
|
128
|
+
console.log( ">>>>>>>>>>>>> INSPECT JXCORE_ROOT:" + util.inspect( jxcore_root ) );
|
129
|
+
|
130
|
+
};
|
131
|
+
|
132
|
+
prepVirtualDirs();
|
133
|
+
|
134
|
+
var findIn = function( what, where ) {
|
135
|
+
console.log( ">>>>>>>>>>>>>> findIn: " + what + " in: " );
|
136
|
+
|
137
|
+
for ( var o in where ) {
|
138
|
+
console.log( ">>>>>>>>>>>>>> findIn: " + o );
|
139
|
+
}
|
140
|
+
|
141
|
+
console.log( (new Error()).stack );
|
142
|
+
|
143
|
+
var last = where;
|
144
|
+
for ( var o in what ) {
|
145
|
+
var subject = what[o];
|
146
|
+
if ( !last[subject]) {
|
147
|
+
return;
|
148
|
+
}
|
149
|
+
|
150
|
+
last = last[subject];
|
151
|
+
}
|
152
|
+
console.log( ">>>>>>>>>>>>>>>>>>>> findIn res: " + last );
|
153
|
+
return last;
|
154
|
+
}
|
155
|
+
|
156
|
+
var getLast = function (pathname) {
|
157
|
+
console.log(">>>>>>>>>>>>>>> getLast: " + pathname );
|
158
|
+
|
159
|
+
//trim leading and trailing slashes
|
160
|
+
while (pathname[0] == '/')
|
161
|
+
pathname = pathname.substr(1);
|
162
|
+
|
163
|
+
while (pathname[pathname.length - 1] == '/')
|
164
|
+
pathname = pathname.substr(0, pathname.length - 1);
|
165
|
+
|
166
|
+
var dirs = pathname.split('/');
|
167
|
+
|
168
|
+
var res = findIn(dirs, jxcore_root);
|
169
|
+
if (!res)
|
170
|
+
res = findIn(dirs, folders);
|
171
|
+
|
172
|
+
console.log(">>>>>>>>>>>>>>> getLast result: " + res );
|
173
|
+
|
174
|
+
|
175
|
+
return res;
|
176
|
+
};
|
177
|
+
|
178
|
+
var stat_archive = {};
|
179
|
+
var existssync = function (pathname) {
|
180
|
+
|
181
|
+
console.log( ">>>>>>>>>>>>>>> EXISTSYNC: " + pathname );
|
182
|
+
|
183
|
+
|
184
|
+
var n = pathname.indexOf(root);
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
if (hasRootLink && n == -1)
|
190
|
+
n = pathname.indexOf(sroot);
|
191
|
+
|
192
|
+
|
193
|
+
console.log( ">>>>>>>>>>>>>>> EXISTSYNC index of (s)root:" + n + " root: " + root + " sroot: " + sroot );
|
194
|
+
|
195
|
+
|
196
|
+
if (n === 0 || n === -1) {
|
197
|
+
if (n === 0) {
|
198
|
+
pathname = pathname.replace(root, '');
|
199
|
+
if (hasRootLink)
|
200
|
+
pathname = pathname.replace(sroot, '');
|
201
|
+
}
|
202
|
+
|
203
|
+
console.log( ">>>>>>>>>>>>>>> EXISTSYNC fixed pathname: " + pathname );
|
204
|
+
|
205
|
+
var last;
|
206
|
+
if (pathname !== '') {
|
207
|
+
last = getLast(pathname);
|
208
|
+
if (!last)
|
209
|
+
return false;
|
210
|
+
} else {
|
211
|
+
last = jxcore_root;
|
212
|
+
}
|
213
|
+
|
214
|
+
var result;
|
215
|
+
// cache result and send the same again
|
216
|
+
// to keep same ino number for each file
|
217
|
+
// a node module may use caching for dev:ino
|
218
|
+
// combinations
|
219
|
+
if (stat_archive.hasOwnProperty(pathname))
|
220
|
+
return stat_archive[pathname];
|
221
|
+
|
222
|
+
if (typeof last['!s'] === 'undefined') {
|
223
|
+
result = { // mark as a folder
|
224
|
+
size : 340,
|
225
|
+
mode : 16877,
|
226
|
+
ino : fs.virtualFiles.getNewIno()
|
227
|
+
};
|
228
|
+
} else {
|
229
|
+
result = {
|
230
|
+
size : last['!s'],
|
231
|
+
mode : 33188,
|
232
|
+
ino : fs.virtualFiles.getNewIno()
|
233
|
+
};
|
234
|
+
}
|
235
|
+
|
236
|
+
stat_archive[pathname] = result;
|
237
|
+
return result;
|
238
|
+
}
|
239
|
+
};
|
240
|
+
|
241
|
+
var readfilesync = function (pathname) {
|
242
|
+
if (!existssync(pathname))
|
243
|
+
throw new Error(pathname + " does not exist");
|
244
|
+
|
245
|
+
var rt = root;
|
246
|
+
var n = pathname.indexOf(rt);
|
247
|
+
|
248
|
+
if (n != 0 && hasRootLink) {
|
249
|
+
n = pathname.indexOf(sroot);
|
250
|
+
rt = sroot;
|
251
|
+
}
|
252
|
+
|
253
|
+
if (n === 0) {
|
254
|
+
pathname = pathname.replace(rt, "");
|
255
|
+
//pathname = path.join('jxcore/', pathname);
|
256
|
+
return process.natives.assetReadSync(pathname);
|
257
|
+
}
|
258
|
+
};
|
259
|
+
|
260
|
+
var readdirsync = function (pathname) {
|
261
|
+
var rt = pathname.indexOf('/data/') === 0 ? (hasRootLink ? sroot : root)
|
262
|
+
: root;
|
263
|
+
var n = pathname.indexOf(rt);
|
264
|
+
if (n === 0 || n === -1) {
|
265
|
+
var last = getLast(pathname);
|
266
|
+
if (!last || typeof last['!s'] !== 'undefined')
|
267
|
+
return null;
|
268
|
+
|
269
|
+
var arr = [];
|
270
|
+
for ( var o in last) {
|
271
|
+
var item = last[o];
|
272
|
+
if (item && o != '!s')
|
273
|
+
arr.push(o);
|
274
|
+
}
|
275
|
+
return arr;
|
276
|
+
}
|
277
|
+
|
278
|
+
return null;
|
279
|
+
};
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
/*
|
285
|
+
try {
|
286
|
+
// force create www/jxcore sub folder so we can write into cwd
|
287
|
+
if (!fs.existsSync(process.userPath)) {
|
288
|
+
fs.mkdir(process.userPath);
|
289
|
+
if (!fs.existsSync(root)) {
|
290
|
+
fs.mkdir(root);
|
291
|
+
}
|
292
|
+
}
|
293
|
+
} catch (e) {
|
294
|
+
console.error("Problem creating assets root at ", root);
|
295
|
+
console.error("You may have a problem with writing files");
|
296
|
+
console.error("Original error was", e);
|
297
|
+
}
|
298
|
+
|
299
|
+
var jxcore_root;
|
300
|
+
|
301
|
+
var prepVirtualDirs = function () {
|
302
|
+
var _ = {};
|
303
|
+
for (var o in folders) {
|
304
|
+
var sub = o.split('/');
|
305
|
+
var last = _;
|
306
|
+
for (var i in sub) {
|
307
|
+
var loc = sub[i];
|
308
|
+
if (!last.hasOwnProperty(loc)) last[loc] = {};
|
309
|
+
last = last[loc];
|
310
|
+
}
|
311
|
+
last['!s'] = folders[o];
|
312
|
+
}
|
313
|
+
|
314
|
+
folders = {};
|
315
|
+
var sp = root.split('/');
|
316
|
+
if (sp[0] === '') sp.shift();
|
317
|
+
jxcore_root = folders;
|
318
|
+
for (var o in sp) {
|
319
|
+
if (sp[o] === 'jxcore')
|
320
|
+
continue;
|
321
|
+
|
322
|
+
jxcore_root[sp[o]] = {};
|
323
|
+
jxcore_root = jxcore_root[sp[o]];
|
324
|
+
}
|
325
|
+
|
326
|
+
jxcore_root['jxcore'] = _; // assets/www/jxcore -> /
|
327
|
+
jxcore_root = _;
|
328
|
+
};
|
329
|
+
|
330
|
+
prepVirtualDirs();
|
331
|
+
|
332
|
+
var findIn = function (what, where) {
|
333
|
+
var last = where;
|
334
|
+
for (var o in what) {
|
335
|
+
var subject = what[o];
|
336
|
+
if (!last[subject]) return;
|
337
|
+
|
338
|
+
last = last[subject];
|
339
|
+
}
|
340
|
+
|
341
|
+
return last;
|
342
|
+
};
|
343
|
+
|
344
|
+
var getLast = function (pathname) {
|
345
|
+
while (pathname[0] == '/')
|
346
|
+
pathname = pathname.substr(1);
|
347
|
+
|
348
|
+
while (pathname[pathname.length - 1] == '/')
|
349
|
+
pathname = pathname.substr(0, pathname.length - 1);
|
350
|
+
|
351
|
+
var dirs = pathname.split('/');
|
352
|
+
|
353
|
+
var res = findIn(dirs, jxcore_root);
|
354
|
+
if (!res) res = findIn(dirs, folders);
|
355
|
+
return res;
|
356
|
+
};
|
357
|
+
|
358
|
+
var stat_archive = {};
|
359
|
+
var existssync = function (pathname) {
|
360
|
+
var n = pathname.indexOf(root);
|
361
|
+
if (n === 0 || n === -1) {
|
362
|
+
if (n === 0) {
|
363
|
+
pathname = pathname.replace(root, '');
|
364
|
+
}
|
365
|
+
|
366
|
+
var last;
|
367
|
+
if (pathname !== '') {
|
368
|
+
last = getLast(pathname);
|
369
|
+
if (!last) return false;
|
370
|
+
} else {
|
371
|
+
last = jxcore_root;
|
372
|
+
}
|
373
|
+
|
374
|
+
var result;
|
375
|
+
// cache result and send the same again
|
376
|
+
// to keep same ino number for each file
|
377
|
+
// a node module may use caching for dev:ino
|
378
|
+
// combinations
|
379
|
+
if (stat_archive.hasOwnProperty(pathname))
|
380
|
+
return stat_archive[pathname];
|
381
|
+
|
382
|
+
if (typeof last['!s'] === 'undefined') {
|
383
|
+
result = { // mark as a folder
|
384
|
+
size: 340,
|
385
|
+
mode: 16877,
|
386
|
+
ino: fs.virtualFiles.getNewIno()
|
387
|
+
};
|
388
|
+
} else {
|
389
|
+
result = {
|
390
|
+
size: last['!s'],
|
391
|
+
mode: 33188,
|
392
|
+
ino: fs.virtualFiles.getNewIno()
|
393
|
+
};
|
394
|
+
}
|
395
|
+
|
396
|
+
stat_archive[pathname] = result;
|
397
|
+
return result;
|
398
|
+
}
|
399
|
+
};
|
400
|
+
|
401
|
+
var readfilesync = function (pathname) {
|
402
|
+
if (!existssync(pathname)) throw new Error(pathname + " does not exist");
|
403
|
+
|
404
|
+
var n = pathname.indexOf(root);
|
405
|
+
if (n === 0) {
|
406
|
+
pathname = pathname.replace(root, "");
|
407
|
+
//pathname = path.join('www/jxcore/', pathname);
|
408
|
+
return process.natives.assetReadSync(pathname);
|
409
|
+
}
|
410
|
+
};
|
411
|
+
|
412
|
+
var readdirsync = function (pathname) {
|
413
|
+
var n = pathname.indexOf(root);
|
414
|
+
if (n === 0 || n === -1) {
|
415
|
+
var last = getLast(pathname);
|
416
|
+
if (!last || typeof last['!s'] !== 'undefined') return null;
|
417
|
+
|
418
|
+
var arr = [];
|
419
|
+
for (var o in last) {
|
420
|
+
var item = last[o];
|
421
|
+
if (item && o != '!s') arr.push(o);
|
422
|
+
}
|
423
|
+
return arr;
|
424
|
+
}
|
425
|
+
|
426
|
+
return null;
|
427
|
+
};
|
428
|
+
*/
|
429
|
+
var extension = {
|
430
|
+
readFileSync: readfilesync,
|
431
|
+
readDirSync: readdirsync,
|
432
|
+
existsSync: existssync
|
433
|
+
};
|
434
|
+
|
435
|
+
fs.setExtension("jxcore-java", extension);
|
436
|
+
var node_module = require('module');
|
437
|
+
|
438
|
+
node_module.addGlobalPath(process.execPath);
|
439
|
+
node_module.addGlobalPath(process.userPath);
|
440
|
+
|
441
|
+
};
|
442
|
+
|
443
|
+
process.registerAssets();
|
444
|
+
|
445
|
+
// if a submodule monkey patches 'fs' module, make sure APK support comes with it
|
446
|
+
var extendFS = function() {
|
447
|
+
process.binding('natives').fs += "(" + process.registerAssets + ")(exports);";
|
448
|
+
};
|
449
|
+
|
450
|
+
extendFS();
|
451
|
+
|
452
|
+
// register below definitions for possible future sub threads
|
453
|
+
jxcore.tasks.register(process.setPaths);
|
454
|
+
jxcore.tasks.register(process.registerAssets);
|
455
|
+
jxcore.tasks.register(extendFS);
|
456
|
+
} else {
|
457
|
+
jxcore.tasks.register(process.setPaths);
|
458
|
+
}
|
459
|
+
|
460
|
+
global.Mobile.onError = function(message, stack) {
|
461
|
+
//TODO
|
462
|
+
};
|
463
|
+
|
464
|
+
// define feunction for inform RHomobile about http server started
|
465
|
+
global.Mobile.httpServerStarted = function() {
|
466
|
+
process.natives.httpServerStarted();
|
467
|
+
}
|
468
|
+
|
469
|
+
// load Rhomobile API
|
470
|
+
var fs = require('fs');
|
471
|
+
var jsp = path.join(process.cwd(), '../rhoapi/rhoapi.js' );
|
472
|
+
var jsf = fs.readFileSync(jsp, 'utf8');
|
473
|
+
eval(jsf);
|
474
|
+
|
475
|
+
Rho.Log.info("Platform = " + process.platform, 'Node.js JS');
|
476
|
+
Rho.Log.info("Process ARCH = " + process.arch, 'Node.js JS');
|
477
|
+
|
478
|
+
|
479
|
+
global.Mobile.loadMainFile = function (filePath) {
|
480
|
+
try {
|
481
|
+
require(path.join(process.cwd(), filePath));
|
482
|
+
} catch (e) {
|
483
|
+
Error.captureStackTrace(e);
|
484
|
+
Rho.Log.error('ERROR with loading app.js!', 'Node.js JS');
|
485
|
+
Rho.Log.error(e.toString(), 'Node.js JS');
|
486
|
+
}
|
487
|
+
};
|
488
|
+
|
489
|
+
process.on('uncaughtException', function (e) {
|
490
|
+
Error.captureStackTrace(e);
|
491
|
+
Rho.Log.error('ERROR:Exception !', 'Node.js JS');
|
492
|
+
Rho.Log.error(e.message.toString(), 'Node.js JS');
|
493
|
+
Rho.Log.error(JSON.stringify(e.stack).toString(), 'Node.js JS');
|
494
|
+
Mobile.onError(e.message, JSON.stringify(e.stack));
|
495
|
+
});
|
496
|
+
|
497
|
+
|
498
|
+
// load Rhodes application code
|
499
|
+
jsp = path.join(process.cwd(), '../rhoapp.js' );
|
500
|
+
jsf = fs.readFileSync(jsp, 'utf8');
|
501
|
+
eval(jsf);
|