Skip to content

Commit

Permalink
Merge pull request #1 from lowapple/develop
Browse files Browse the repository at this point in the history
v0.1.3
  • Loading branch information
lowapple authored May 3, 2023
2 parents 3300cdb + b0fb269 commit 0b1143d
Show file tree
Hide file tree
Showing 374 changed files with 145,860 additions and 176 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.so filter=lfs diff=lfs merge=lfs -text
7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
#OpenCV Cache
/download
/include

# Ignore cmake build directories
opencv/
cmake-build-debug/

# But include the other files in cmakeLibs
Expand All @@ -13,8 +8,6 @@ cmake-build-debug/
# Except for libopencv_java4.so
cmakeLibs/**/libopencv_java4.so

ios/opencv2.framework

# Miscellaneous
*.class
*.log
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.3
* [Update] Embed the OpenCV include file directly inside the plugin because it was inconvenient to install the plugin using an existing script
* [Update] Converted internal example text to English

## 0.1.2

* [Fix] Remove unused variables and update preparations for package uploads
Expand Down
19 changes: 11 additions & 8 deletions ios/Classes/src/CMakeLists.txt → android/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
cmake_minimum_required(VERSION 3.4.1)

include_directories(../../../include)
#
include_directories(
../include
../src
)

add_library(
lib_opencv
Expand All @@ -12,18 +16,17 @@ set_target_properties(
lib_opencv
PROPERTIES
IMPORTED_LOCATION
${CMAKE_CURRENT_SOURCE_DIR}/../../../android/src/main/opencv/${ANDROID_ABI}/libopencv_java4.so
${CMAKE_CURRENT_SOURCE_DIR}/src/main/jniLibs/${ANDROID_ABI}/libopencv_java4.so
)


add_library(
flutter_pixelmatching
SHARED
DebugLogger.cpp
ImageConverter.cpp
ImageProcessor.cpp
ImageCompare.cpp
PixelMatching.cpp
../src/DebugLogger.cpp
../src/ImageConverter.cpp
../src/ImageProcessor.cpp
../src/ImageCompare.cpp
../src/PixelMatching.cpp
)
set(BUILD_WRITERS ON)

Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ android {

externalNativeBuild {
cmake {
path "../ios/Classes/src/CMakeLists.txt"
path "CMakeLists.txt"
}
}

Expand Down
3 changes: 3 additions & 0 deletions android/src/main/jniLibs/arm64-v8a/libopencv_java4.so
Git LFS file not shown
3 changes: 3 additions & 0 deletions android/src/main/jniLibs/armeabi-v7a/libopencv_java4.so
Git LFS file not shown
3 changes: 3 additions & 0 deletions android/src/main/jniLibs/x86/libopencv_java4.so
Git LFS file not shown
3 changes: 3 additions & 0 deletions android/src/main/jniLibs/x86_64/libopencv_java4.so
Git LFS file not shown
2 changes: 1 addition & 1 deletion example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<application
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"
android:label="PixelMatching Sample">
android:label="PixelMatching">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
Expand Down
9 changes: 8 additions & 1 deletion example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ PODS:
- Flutter (1.0.0)
- flutter_pixelmatching (0.0.1):
- Flutter
- OpenCV (= 4.3.0)
- image_picker_ios (0.0.1):
- Flutter
- OpenCV (4.3.0)
- permission_handler_apple (9.0.4):
- Flutter

Expand All @@ -16,6 +18,10 @@ DEPENDENCIES:
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)

SPEC REPOS:
trunk:
- OpenCV

EXTERNAL SOURCES:
camera_avfoundation:
:path: ".symlinks/plugins/camera_avfoundation/ios"
Expand All @@ -31,8 +37,9 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
camera_avfoundation: 3125e8cd1a4387f6f31c6c63abb8a55892a9eeeb
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_pixelmatching: 8cb889810733d8433d30815ef8761a1eb030fea8
flutter_pixelmatching: 3a2e4f77654adbd9849a52f29dc4fe634fc87cbe
image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5
OpenCV: 681e0451c1e54c5930a8922277f817ed5d5ab459
permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce

PODFILE CHECKSUM: 6bb3788196c2922e65e91da1626903e72ec4a23f
Expand Down
93 changes: 48 additions & 45 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
objects = {

/* Begin PBXBuildFile section */
138551163A00043F5FF06C91 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 40F7AEA6C98C442F86FE97DD /* Pods_Runner.framework */; };
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
68054CCEBF26ABDBD8C379C2 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA63446C461FAE949F7B762C /* Pods_Runner.framework */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
Expand All @@ -33,9 +33,6 @@
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
40F7AEA6C98C442F86FE97DD /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5A00D6F0D14DBA0668EF3F12 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
6806D89D3056F1A22807A8A0 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
Expand All @@ -46,21 +43,32 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
B3BB012C9728B2D2C3E5E6E6 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
AA63446C461FAE949F7B762C /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
B3E6BC77647D86C2D2F5B8EB /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
BDF688BB0FA627266D51222B /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
E833A7019735355236602367 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
97C146EB1CF9000F007C117D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
138551163A00043F5FF06C91 /* Pods_Runner.framework in Frameworks */,
68054CCEBF26ABDBD8C379C2 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
594D0257FA68409FC834E3E3 /* Frameworks */ = {
isa = PBXGroup;
children = (
AA63446C461FAE949F7B762C /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
Expand All @@ -79,7 +87,7 @@
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
EAE244DB9C7AEFDC08CBCE19 /* Pods */,
D34E64F2155523C5A31400BF /* Frameworks */,
594D0257FA68409FC834E3E3 /* Frameworks */,
);
sourceTree = "<group>";
};
Expand All @@ -106,20 +114,12 @@
path = Runner;
sourceTree = "<group>";
};
D34E64F2155523C5A31400BF /* Frameworks */ = {
isa = PBXGroup;
children = (
40F7AEA6C98C442F86FE97DD /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
EAE244DB9C7AEFDC08CBCE19 /* Pods */ = {
isa = PBXGroup;
children = (
5A00D6F0D14DBA0668EF3F12 /* Pods-Runner.debug.xcconfig */,
6806D89D3056F1A22807A8A0 /* Pods-Runner.release.xcconfig */,
B3BB012C9728B2D2C3E5E6E6 /* Pods-Runner.profile.xcconfig */,
BDF688BB0FA627266D51222B /* Pods-Runner.debug.xcconfig */,
B3E6BC77647D86C2D2F5B8EB /* Pods-Runner.release.xcconfig */,
E833A7019735355236602367 /* Pods-Runner.profile.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
Expand All @@ -131,14 +131,14 @@
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
9434F7559DFC3D66340B11BA /* [CP] Check Pods Manifest.lock */,
31D505C8FBEEB394E137AE87 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
301A10EEF015FE4A57B9F4CA /* [CP] Embed Pods Frameworks */,
D456BC5C87C994A74A51E530 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -197,21 +197,26 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
301A10EEF015FE4A57B9F4CA /* [CP] Embed Pods Frameworks */ = {
31D505C8FBEEB394E137AE87 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
Expand All @@ -230,42 +235,37 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin\n";
};
9434F7559DFC3D66340B11BA /* [CP] Check Pods Manifest.lock */ = {
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
name = "Run Script";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
};
9740EEB61CF901F6004384FC /* Run Script */ = {
D456BC5C87C994A74A51E530 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "Run Script";
outputPaths = (
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

Expand Down Expand Up @@ -361,11 +361,12 @@
DEVELOPMENT_TEAM = 9QVC39BXMC;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = PixelMatching;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = io.lowapple.flutter.plugin.pixelmatching.flutterPixelmatchingExample;
PRODUCT_BUNDLE_IDENTIFIER = "io.lowapple.flutter.plugin.flutter-pixelmatching";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
Expand Down Expand Up @@ -490,11 +491,12 @@
DEVELOPMENT_TEAM = 9QVC39BXMC;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = PixelMatching;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = io.lowapple.flutter.plugin.pixelmatching.flutterPixelmatchingExample;
PRODUCT_BUNDLE_IDENTIFIER = "io.lowapple.flutter.plugin.flutter-pixelmatching";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -513,11 +515,12 @@
DEVELOPMENT_TEAM = 9QVC39BXMC;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = PixelMatching;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = io.lowapple.flutter.plugin.pixelmatching.flutterPixelmatchingExample;
PRODUCT_BUNDLE_IDENTIFIER = "io.lowapple.flutter.plugin.flutter-pixelmatching";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
Expand Down
Loading

0 comments on commit 0b1143d

Please sign in to comment.