Skip to content

Update OpenCvSharp to version 4.13.0.20260602 (f07f79374fe04ba3236a69ab2f451c46a694a281) - #1960

Closed
thnhmai06 wants to merge 4 commits into
shimat:mainfrom
thnhmai06:main
Closed

thnhmai06 wants to merge 4 commits into
shimat:mainfrom
thnhmai06:main

Conversation

@thnhmai06

@thnhmai06 thnhmai06 commented Jun 27, 2026 •

Copy link
Copy Markdown

Summary by CodeRabbit

  • New Features

    • Added runtime package support for macOS Apple Silicon and Windows ARM64.
    • Updated Linux and Windows runtime packaging to use new package names and metadata.
    • Added a streamlined OpenCV runtime build configuration for the SlideGenerator-focused setup.
  • Bug Fixes

    • Simplified CI/release packaging so runtime artifacts are produced and published through the updated pipeline.
    • Updated package references and documentation to match the new runtime package set.

thnhmai06 and others added 4 commits May 31, 2026 11:48
Replace upstream multi-workflow CI with single matrix workflow
targeting win-x64/arm64, linux-x64/arm64, osx-x64/arm64.

- Static OpenCV build (BUILD_SHARED_LIBS=OFF) for self-contained
  native libs; only modules needed by YuNet FaceDetectorYN
  (core,imgproc,imgcodecs,calib3d,features2d,flann,dnn,ml,objdetect)
- Rename all PackageIds to SlideGenerator.OpenCvSharp4.runtime.<rid>
- Remove ffmpeg dll + props/targets from win.csproj (WITH_FFMPEG=OFF)
- Add missing win-arm64 and osx-arm64 csproj
- Push to GitHub Packages via GITHUB_TOKEN
App converts all input to PNG before calling OpenCV, so other
codecs are unnecessary. WITH_TIFF=OFF also fixes macOS arm64
build failure caused by Mono tiff.h typedef conflict.
… csproj rename

- Switch osx-x64/arm64 runners to macos-26-intel/macos-26
- Remove brew protobuf (conflicts with OpenCV bundled protobuf C++11 vs C++17)
- Rename osx.10.15-x64.csproj to osx-x64.csproj for consistency
- Add Protobuf_FOUND=OFF hints in cmake cache to prevent system protobuf pickup
- Fix CMAKE_OSX_ARCHITECTURES flag format (remove space after -D)
- Update README.runtime.md package name reference

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 27, 2026 11:37
@thnhmai06

Copy link
Copy Markdown
Author

Oh im sorry wrong repository lol

@thnhmai06 thnhmai06 closed this Jun 27, 2026
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d63da10d-37e9-4b12-9825-2f01165a9fdd

📥 Commits

Reviewing files that changed from the base of the PR and between f07f793 and 2e99751.

📒 Files selected for processing (15)
  • .github/workflows/linux-arm64.yml
  • .github/workflows/manylinux.yml
  • .github/workflows/publish_nuget.yml
  • .github/workflows/slidegenerator-runtimes.yml
  • .github/workflows/windows.yml
  • README.md
  • cmake/opencv_build_options_yunet.cmake
  • nuget/OpenCvSharp4.official.runtime.linux-x64.csproj
  • nuget/OpenCvSharp4.runtime.linux-arm64.csproj
  • nuget/OpenCvSharp4.runtime.osx-arm64.csproj
  • nuget/OpenCvSharp4.runtime.osx-x64.csproj
  • nuget/OpenCvSharp4.runtime.win-arm64.csproj
  • nuget/OpenCvSharp4.runtime.win.csproj
  • nuget/README.runtime.md
  • src/OpenCvSharpExtern/CMakeLists.txt

📝 Walkthrough

Walkthrough

The PR removes several legacy CI workflows, adds a new runtime workflow, introduces a YuNet-focused OpenCV build profile, updates runtime NuGet package manifests for Windows, Linux, and macOS, and rewrites the README and runtime package documentation.

Changes

SlideGenerator runtime packaging

Layer / File(s) Summary
Native build profile
cmake/opencv_build_options_yunet.cmake, src/OpenCvSharpExtern/CMakeLists.txt
Adds a YuNet-focused OpenCV cache script and disables the Apple-specific Protobuf and link directory setup in OpenCvSharpExtern.
Windows and Linux runtime package manifests
nuget/OpenCvSharp4.official.runtime.linux-x64.csproj, nuget/OpenCvSharp4.runtime.linux-arm64.csproj, nuget/OpenCvSharp4.runtime.win.csproj, nuget/OpenCvSharp4.runtime.win-arm64.csproj
Updates the Linux x64, Linux ARM64, and Windows runtime package identities, metadata, and native file inputs, and adds the Windows ARM64 pack-only project.
macOS runtime package manifests
nuget/OpenCvSharp4.runtime.osx-x64.csproj, nuget/OpenCvSharp4.runtime.osx-arm64.csproj, nuget/README.runtime.md
Updates the macOS runtime package identities, adds the macOS ARM64 pack-only project, and revises the runtime package list entry for macOS x64.
Runtime workflow
.github/workflows/slidegenerator-runtimes.yml
Adds the runtime workflow that builds OpenCV and OpenCvSharpExtern, packs RID-specific NuGet artifacts, uploads build outputs, pushes packages to GitHub Packages, and uploads release assets on release events.
Repository README
README.md
Replaces the general project README with SlideGenerator runtime packaging, installation, and CI/build documentation.

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions
  participant slidegenerator_runtimes_yml
  participant OpenCVBuild
  participant OpenCvSharpExtern
  participant GitHubPackages
  participant GitHubRelease

  GitHubActions->>slidegenerator_runtimes_yml: trigger workflow
  slidegenerator_runtimes_yml->>OpenCVBuild: restore cache and build OpenCV
  slidegenerator_runtimes_yml->>OpenCvSharpExtern: compile native library per matrix entry
  slidegenerator_runtimes_yml->>GitHubPackages: publish RID .nupkg files
  slidegenerator_runtimes_yml->>GitHubRelease: upload release assets on release events
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • shimat/opencvsharp#1836: Overlaps with the OpenCV build-option CMake file and OpenCvSharpExtern build configuration changes.
  • shimat/opencvsharp#1947: Overlaps with the macOS runtime packaging updates and Apple-specific CMake handling.
  • shimat/opencvsharp#1883: Overlaps with nuget/OpenCvSharp4.runtime.win.csproj and the Windows runtime package contents.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch main

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR repurposes the repository from upstream OpenCvSharp’s general packaging/CI to a SlideGenerator-focused fork that builds and publishes slim, YuNet-oriented OpenCvSharpExtern native runtime packages across multiple RIDs.

Changes:

  • Add a YuNet-focused OpenCV CMake cache (cmake/opencv_build_options_yunet.cmake) and a new multi-platform GitHub Actions workflow to build/pack/publish runtimes.
  • Rename runtime NuGet packages to SlideGenerator.OpenCvSharp4.runtime.* and add new runtime projects (notably Windows ARM64 and macOS ARM64).
  • Replace the root README with fork-specific installation/CI documentation, and remove several upstream workflows.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/OpenCvSharpExtern/CMakeLists.txt Disables some Apple-specific link/Protobuf handling in the extern build script.
README.md Rewrites documentation for SlideGenerator-focused runtime packages and new CI workflow.
nuget/README.runtime.md Adjusts runtime package docs (but still largely upstream-oriented).
nuget/OpenCvSharp4.runtime.win.csproj Renames Windows x64 runtime package and simplifies packed assets.
nuget/OpenCvSharp4.runtime.win-arm64.csproj Adds Windows ARM64 runtime package project.
nuget/OpenCvSharp4.runtime.osx-x64.csproj Renames macOS x64 runtime package metadata.
nuget/OpenCvSharp4.runtime.osx-arm64.csproj Adds macOS ARM64 runtime package project.
nuget/OpenCvSharp4.runtime.linux-arm64.csproj Renames Linux ARM64 runtime package metadata.
nuget/OpenCvSharp4.official.runtime.linux-x64.csproj Renames Linux x64 runtime package ID/metadata for the fork.
cmake/opencv_build_options_yunet.cmake Introduces an OpenCV build configuration targeting a small module set for YuNet.
.github/workflows/windows.yml Removes upstream Windows CI workflow.
.github/workflows/slidegenerator-runtimes.yml Adds new matrix workflow to build OpenCV + OpenCvSharpExtern, pack, and publish fork runtimes.
.github/workflows/publish_nuget.yml Removes upstream NuGet publishing workflow.
.github/workflows/manylinux.yml Removes upstream manylinux build/test/pack workflow.
.github/workflows/linux-arm64.yml Removes upstream Linux ARM64 build/test/pack workflow.
Comments suppressed due to low confidence (1)

nuget/OpenCvSharp4.runtime.osx-x64.csproj:15

  • The package description lists only core, imgproc, imgcodecs, dnn, objdetect, but the YuNet build config also includes calib3d, features2d, flann, ml (see cmake/opencv_build_options_yunet.cmake). Please update the metadata so it matches the actual module set.

Comment on lines 24 to 28
<ItemGroup>
<None Include="../src/build/OpenCvSharpExtern/Release/OpenCvSharpExtern.dll" Pack="true" PackagePath="runtimes/win-x64/native" />
<None Include="../opencv_artifacts/x64/vc17/bin/opencv_videoio_ffmpeg4130_64.dll" Pack="true" PackagePath="runtimes/win-x64/native" />
<None Include="OpenCvSharp4.runtime.win.props" Pack="true" PackagePath="build/netstandard" />
<None Include="OpenCvSharp4.runtime.win.props" Pack="true" PackagePath="build/netcoreapp" />
<None Include="OpenCvSharp4.runtime.win.props" Pack="true" PackagePath="build/net8.0" />
<None Include="OpenCvSharp4.runtime.win.targets" Pack="true" PackagePath="build/netstandard" />
<None Include="OpenCvSharp4.runtime.win.targets" Pack="true" PackagePath="build/netcoreapp" />
<None Include="OpenCvSharp4.runtime.win.targets" Pack="true" PackagePath="build/net8.0" />
<None Include="OpenCvSharpExtern.dll" Pack="true" PackagePath="runtimes/win-x64/native" />
<None Include="icon/opencvsharp.png" Pack="true" PackagePath="" />
<None Include="README.runtime.md" Pack="true" PackagePath="" />
</ItemGroup>
Comment on lines +14 to +15
<Description>Native OpenCvSharpExtern bindings for Windows x64. Slim build targeting YuNet face detection (core, imgproc, imgcodecs, dnn, objdetect).</Description>
<PackageTags>Image Processing OpenCV Wrapper opencvsharp windows x64 YuNet SlideGenerator</PackageTags>
Comment on lines +14 to +15
<Description>Native OpenCvSharpExtern bindings for Windows ARM64. Slim build targeting YuNet face detection (core, imgproc, imgcodecs, dnn, objdetect).</Description>
<PackageTags>Image Processing OpenCV Wrapper opencvsharp windows arm64 YuNet SlideGenerator</PackageTags>
Comment on lines +14 to +15
<Description>Native OpenCvSharpExtern bindings for Linux ARM64. Slim build targeting YuNet face detection (core, imgproc, imgcodecs, dnn, objdetect).</Description>
<PackageTags>Image Processing OpenCV Wrapper opencvsharp linux arm64 aarch64 YuNet SlideGenerator</PackageTags>
Comment on lines +14 to +15
<Description>Native OpenCvSharpExtern bindings for Linux x64. Slim build targeting YuNet face detection (core, imgproc, imgcodecs, dnn, objdetect).</Description>
<PackageTags>Image Processing OpenCV Wrapper opencvsharp linux x64 YuNet SlideGenerator</PackageTags>
Comment on lines +14 to +15
<Description>Native OpenCvSharpExtern bindings for macOS ARM64. Slim build targeting YuNet face detection (core, imgproc, imgcodecs, dnn, objdetect).</Description>
<PackageTags>Image Processing OpenCV Wrapper opencvsharp macos arm64 apple silicon YuNet SlideGenerator</PackageTags>
Comment on lines +2 to +4
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;netcoreapp3.1;</TargetFrameworks>
<NoBuild>true</NoBuild>
Comment thread nuget/README.runtime.md
Comment on lines 24 to +27
| `OpenCvSharp4.official.runtime.linux-x64.slim` | Linux x64 (portable, manylinux_2_28, slim) |
| `OpenCvSharp4.runtime.linux-arm64` | Linux ARM64 (AArch64) |
| `OpenCvSharp4.runtime.linux-arm` | Linux ARM64 — **deprecated**, use `linux-arm64` |
| `OpenCvSharp4.runtime.osx.10.15-x64` | macOS 10.15+ x64 |
| `OpenCvSharp4.runtime.osx-x64` | macOS x64 |
Comment thread README.md
Comment on lines +96 to +103
| Platform | Runner |
|----------|--------|
| win-x64 | `windows-2025` |
| win-arm64 | `windows-11-arm` |
| linux-x64 | `ubuntu-22.04` |
| linux-arm64 | `ubuntu-24.04-arm` |
| osx-x64 | `macos-13` |
| osx-arm64 | `macos-14` |
@shimat shimat added the out of scope Not actionable within this repository label Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

out of scope Not actionable within this repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants