From b47a8ea403ec187584345cb176eab25b76756ed9 Mon Sep 17 00:00:00 2001 From: sdcb Date: Mon, 23 Sep 2024 13:08:07 +0800 Subject: [PATCH] 2024.4.0 --- build/00-common.linq | 6 +++--- build/02-publish-proget-nuget.linq | 2 +- .../Headers/Generators/StructsGenerator.cs | 2 +- generator/Sdcb.OpenVINO.AutoGen/Program.cs | 2 +- generator/Sdcb.OpenVINO.NuGetBuilder/Program.cs | 4 ++-- .../Sdcb.OpenVINO.PaddleOCR.csproj | 4 ++-- .../Sdcb.OpenVINO.Extensions.OpenCvSharp4.csproj | 2 +- src/Sdcb.OpenVINO/Natives/NativeMethods.g.cs | 6 +++--- src/Sdcb.OpenVINO/Natives/Structs.g.cs | 9 +++++++++ 9 files changed, 23 insertions(+), 14 deletions(-) diff --git a/build/00-common.linq b/build/00-common.linq index bcb764b..6321fee 100644 --- a/build/00-common.linq +++ b/build/00-common.linq @@ -21,9 +21,9 @@ static void DotNetRun(string args) => Run("dotnet", args.Dump(), Encoding.GetEnc static void Run(string exe, string args, Encoding encoding) => Util.Cmd(exe, args, encoding); static ProjectVersion[] Projects = new[] { - new ProjectVersion("Sdcb.OpenVINO", "0.6.7"), - new ProjectVersion("Sdcb.OpenVINO.Extensions.OpenCvSharp4", "0.6.7"), - new ProjectVersion("Sdcb.OpenVINO.PaddleOCR", "0.6.3"), + new ProjectVersion("Sdcb.OpenVINO", "0.6.8"), + new ProjectVersion("Sdcb.OpenVINO.Extensions.OpenCvSharp4", "0.6.8"), + new ProjectVersion("Sdcb.OpenVINO.PaddleOCR", "0.6.8"), new ProjectVersion("Sdcb.OpenVINO.PaddleOCR.Models.Online", "0.6.2"), }; diff --git a/build/02-publish-proget-nuget.linq b/build/02-publish-proget-nuget.linq index 3bb54b9..c9f965f 100644 --- a/build/02-publish-proget-nuget.linq +++ b/build/02-publish-proget-nuget.linq @@ -37,7 +37,7 @@ void Refresh() { string dir = Path.Combine(Path.GetDirectoryName(Util.CurrentQueryPath)!, "nupkgs"); IEnumerable pkgs = Directory.EnumerateFiles(dir, "*.nupkg") - .Where(x => !x.Contains("-preview.1")) + .Where(x => !x.Contains("2024.3.0")) ; dc.Content = new { diff --git a/generator/Sdcb.OpenVINO.AutoGen/Headers/Generators/StructsGenerator.cs b/generator/Sdcb.OpenVINO.AutoGen/Headers/Generators/StructsGenerator.cs index d050a90..6dae543 100644 --- a/generator/Sdcb.OpenVINO.AutoGen/Headers/Generators/StructsGenerator.cs +++ b/generator/Sdcb.OpenVINO.AutoGen/Headers/Generators/StructsGenerator.cs @@ -39,7 +39,7 @@ private static GeneratedUnit TransformOne(Class @class, Dictionary().DownloadAsync()); AppSettings appSettings = services.GetRequiredService(); -string url = "https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.3/windows/w_openvino_toolkit_windows_2024.3.0.16041.1e3b88e4e3f_x86_64.zip"; +string url = "https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.4/windows/w_openvino_toolkit_windows_2024.4.0.16579.c3152d32c9c_x86_64.zip"; ExtractedInfo info = await HeadersDownloader.DirectDownloadAsync(url, services.GetRequiredService(), appSettings.DownloadFolder); ParsedInfo parsed = HeadersParser.Parse(info); GeneratedAll all = GeneratedAll.Generate(parsed); diff --git a/generator/Sdcb.OpenVINO.NuGetBuilder/Program.cs b/generator/Sdcb.OpenVINO.NuGetBuilder/Program.cs index 6f3ed2f..372aaf6 100644 --- a/generator/Sdcb.OpenVINO.NuGetBuilder/Program.cs +++ b/generator/Sdcb.OpenVINO.NuGetBuilder/Program.cs @@ -16,11 +16,11 @@ static async Task Main(string[] args) IServiceProvider sp = ConfigureServices(); ArtifactDownloader w = sp.GetRequiredService(); StorageNodeRoot root = sp.GetRequiredService(); - string purpose = args.Length > 0 ? args[0] : "win64"; + string purpose = args.Length > 0 ? args[0] : "windows"; string? versionSuffix = null; // null or "preview.1", can't be "" string dir = Path.Combine(DirectoryUtils.SearchFileInCurrentAndParentDirectories(new DirectoryInfo("."), "OpenVINO.NET.sln").DirectoryName!, "build", "nupkgs"); - VersionFolder vf = root.For(SemanticVersion.Parse("2024.3.0")); + VersionFolder vf = root.LatestStableVersion; switch (purpose) { diff --git a/projects/PaddleOCR/Sdcb.OpenVINO.PaddleOCR/Sdcb.OpenVINO.PaddleOCR.csproj b/projects/PaddleOCR/Sdcb.OpenVINO.PaddleOCR/Sdcb.OpenVINO.PaddleOCR.csproj index 0d0089a..74f3826 100644 --- a/projects/PaddleOCR/Sdcb.OpenVINO.PaddleOCR/Sdcb.OpenVINO.PaddleOCR.csproj +++ b/projects/PaddleOCR/Sdcb.OpenVINO.PaddleOCR/Sdcb.OpenVINO.PaddleOCR.csproj @@ -36,8 +36,8 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/src/Sdcb.OpenVINO.Extensions.OpenCvSharp4/Sdcb.OpenVINO.Extensions.OpenCvSharp4.csproj b/src/Sdcb.OpenVINO.Extensions.OpenCvSharp4/Sdcb.OpenVINO.Extensions.OpenCvSharp4.csproj index 132ec0a..81e1da6 100644 --- a/src/Sdcb.OpenVINO.Extensions.OpenCvSharp4/Sdcb.OpenVINO.Extensions.OpenCvSharp4.csproj +++ b/src/Sdcb.OpenVINO.Extensions.OpenCvSharp4/Sdcb.OpenVINO.Extensions.OpenCvSharp4.csproj @@ -34,7 +34,7 @@ - + diff --git a/src/Sdcb.OpenVINO/Natives/NativeMethods.g.cs b/src/Sdcb.OpenVINO/Natives/NativeMethods.g.cs index 3c80e2b..f0fa978 100644 --- a/src/Sdcb.OpenVINO/Natives/NativeMethods.g.cs +++ b/src/Sdcb.OpenVINO/Natives/NativeMethods.g.cs @@ -11,18 +11,18 @@ public static unsafe partial class NativeMethods /// Print the error info. /// a status code. - [DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_common.h", 206, 207, "ov_base_c_api")] + [DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_common.h", 225, 226, "ov_base_c_api")] public static extern byte* ov_get_error_info(ov_status_e status); /// free char /// The pointer to the char to free. - [DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_common.h", 214, 215, "ov_base_c_api")] + [DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_common.h", 233, 234, "ov_base_c_api")] public static extern void ov_free(byte* content); /// Get the last error msg. - [DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_common.h", 221, 222, "ov_base_c_api")] + [DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_common.h", 240, 241, "ov_base_c_api")] public static extern byte* ov_get_last_err_msg(); diff --git a/src/Sdcb.OpenVINO/Natives/Structs.g.cs b/src/Sdcb.OpenVINO/Natives/Structs.g.cs index 59683fa..c597d26 100644 --- a/src/Sdcb.OpenVINO/Natives/Structs.g.cs +++ b/src/Sdcb.OpenVINO/Natives/Structs.g.cs @@ -5,6 +5,15 @@ namespace Sdcb.OpenVINO.Natives; +[StructLayout(LayoutKind.Sequential), CSourceInfo("ov_common.h", 215, 218, "")] +public unsafe struct ov_encryption_callbacks +{ + public delegate** encrypt_func; + + public delegate** decrypt_func; +} + + /// type define ov_compiled_model_t from ov_compiled_model [StructLayout(LayoutKind.Sequential), CSourceInfo("ov_compiled_model.h", 26, 26, "ov_compiled_model_c_api")] public struct ov_compiled_model