com.github.asus4.onnxruntime 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Editor/OrtBuildHelper.cs +0 -41
- package/Editor/OrtPostProcessBuild.cs +1 -3
- package/Plugins/Android/onnxruntime-android.aar +0 -0
- package/Plugins/Android/onnxruntime-android.aar.meta +81 -0
- package/Plugins/Linux/x64/libonnxruntime.so +0 -0
- package/Plugins/Linux/x64/libonnxruntime.so.meta +81 -0
- package/Plugins/Linux/x64.meta +8 -0
- package/Plugins/Linux.meta +8 -0
- package/Plugins/Windows/x64/onnxruntime.dll +0 -0
- package/Plugins/Windows/x64/onnxruntime.dll.meta +81 -0
- package/Plugins/Windows/x64.meta +8 -0
- package/Plugins/Windows.meta +8 -0
- package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64/onnxruntime.framework/onnxruntime +0 -0
- package/Plugins/iOS~/onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.framework/onnxruntime +0 -0
- package/Runtime/AssemblyInfo.shared.cs +12 -0
- package/Runtime/Microsoft.ML.OnnxRuntime.csproj +370 -0
- package/Runtime/Microsoft.ML.OnnxRuntime.csproj.meta +7 -0
- package/Runtime/Microsoft.ML.OnnxRuntime.sln +25 -0
- package/Runtime/Microsoft.ML.OnnxRuntime.sln.meta +7 -0
- package/Runtime/NativeMethods.shared.cs +12 -0
- package/Runtime/SessionOptions.shared.cs +12 -0
- package/ThirdPartyNotices.txt +6266 -0
- package/ThirdPartyNotices.txt.meta +7 -0
- package/package.json +1 -3
- package/Editor/OrtPreProcessBuild.cs +0 -36
- package/Editor/OrtPreProcessBuild.cs.meta +0 -11
- package/Plugins/Android/onnxruntime-mobile.aar +0 -0
- package/Plugins/Android/onnxruntime-mobile.aar.meta +0 -32
package/Editor/OrtBuildHelper.cs
CHANGED
|
@@ -8,46 +8,5 @@ namespace Microsoft.ML.OnnxRuntime.Editor
|
|
|
8
8
|
public static class OrtBuildHelper
|
|
9
9
|
{
|
|
10
10
|
public const string PACKAGE_PATH = "Packages/com.github.asus4.onnxruntime";
|
|
11
|
-
|
|
12
|
-
public static void AddDefine(NamedBuildTarget target, params string[] adds)
|
|
13
|
-
{
|
|
14
|
-
PlayerSettings.GetScriptingDefineSymbols(target, out string[] defines);
|
|
15
|
-
var newDefines = defines.Concat(adds).Distinct().ToArray();
|
|
16
|
-
PlayerSettings.SetScriptingDefineSymbols(target, newDefines);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
public static void RemoveDefine(NamedBuildTarget target, params string[] removes)
|
|
20
|
-
{
|
|
21
|
-
PlayerSettings.GetScriptingDefineSymbols(target, out string[] defines);
|
|
22
|
-
var newDefines = defines.Except(removes).ToArray();
|
|
23
|
-
PlayerSettings.SetScriptingDefineSymbols(target, newDefines);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
[InitializeOnLoadMethod]
|
|
27
|
-
private static void Initialize()
|
|
28
|
-
{
|
|
29
|
-
RuntimePlatform platform = Application.platform;
|
|
30
|
-
BuildTarget buildTarget = EditorUserBuildSettings.activeBuildTarget;
|
|
31
|
-
|
|
32
|
-
// Debug.Log($"Initialize platform:{platform}, target{buildTarget}");
|
|
33
|
-
if (platform == RuntimePlatform.OSXEditor)
|
|
34
|
-
{
|
|
35
|
-
switch (buildTarget)
|
|
36
|
-
{
|
|
37
|
-
case BuildTarget.StandaloneOSX:
|
|
38
|
-
AddDefine(NamedBuildTarget.Standalone, "__ENABLE_COREML__");
|
|
39
|
-
break;
|
|
40
|
-
case BuildTarget.iOS:
|
|
41
|
-
AddDefine(NamedBuildTarget.iOS, "__ENABLE_COREML__");
|
|
42
|
-
break;
|
|
43
|
-
case BuildTarget.Android:
|
|
44
|
-
AddDefine(NamedBuildTarget.Android, "__ENABLE_COREML__");
|
|
45
|
-
break;
|
|
46
|
-
default:
|
|
47
|
-
// Nothing
|
|
48
|
-
break;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
11
|
}
|
|
53
12
|
}
|
|
@@ -24,11 +24,9 @@ namespace Microsoft.ML.OnnxRuntime.Editor
|
|
|
24
24
|
{
|
|
25
25
|
case BuildTarget.iOS:
|
|
26
26
|
PostprocessBuildIOS(report);
|
|
27
|
-
// No need to remove __ENABLE_COREML__ because is's supported on macOS as well
|
|
28
|
-
OrtBuildHelper.RemoveDefine(NamedBuildTarget.iOS, "__IOS__");
|
|
29
27
|
break;
|
|
30
28
|
case BuildTarget.Android:
|
|
31
|
-
|
|
29
|
+
// Nothing to do
|
|
32
30
|
break;
|
|
33
31
|
// TODO: Add support for other platforms
|
|
34
32
|
default:
|
|
Binary file
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 87f598eb2fd64491c9917d2255b00a1b
|
|
3
|
+
PluginImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
iconMap: {}
|
|
7
|
+
executionOrder: {}
|
|
8
|
+
defineConstraints: []
|
|
9
|
+
isPreloaded: 1
|
|
10
|
+
isOverridable: 1
|
|
11
|
+
isExplicitlyReferenced: 0
|
|
12
|
+
validateReferences: 1
|
|
13
|
+
platformData:
|
|
14
|
+
- first:
|
|
15
|
+
: Any
|
|
16
|
+
second:
|
|
17
|
+
enabled: 0
|
|
18
|
+
settings:
|
|
19
|
+
Exclude Android: 0
|
|
20
|
+
Exclude Editor: 1
|
|
21
|
+
Exclude Linux64: 1
|
|
22
|
+
Exclude OSXUniversal: 1
|
|
23
|
+
Exclude Win: 1
|
|
24
|
+
Exclude Win64: 1
|
|
25
|
+
Exclude iOS: 1
|
|
26
|
+
- first:
|
|
27
|
+
Android: Android
|
|
28
|
+
second:
|
|
29
|
+
enabled: 1
|
|
30
|
+
settings:
|
|
31
|
+
AndroidSharedLibraryType: Executable
|
|
32
|
+
CPU: ARMv7
|
|
33
|
+
- first:
|
|
34
|
+
Any:
|
|
35
|
+
second:
|
|
36
|
+
enabled: 0
|
|
37
|
+
settings: {}
|
|
38
|
+
- first:
|
|
39
|
+
Editor: Editor
|
|
40
|
+
second:
|
|
41
|
+
enabled: 0
|
|
42
|
+
settings:
|
|
43
|
+
CPU: AnyCPU
|
|
44
|
+
DefaultValueInitialized: true
|
|
45
|
+
OS: AnyOS
|
|
46
|
+
- first:
|
|
47
|
+
Standalone: Linux64
|
|
48
|
+
second:
|
|
49
|
+
enabled: 0
|
|
50
|
+
settings:
|
|
51
|
+
CPU: AnyCPU
|
|
52
|
+
- first:
|
|
53
|
+
Standalone: OSXUniversal
|
|
54
|
+
second:
|
|
55
|
+
enabled: 0
|
|
56
|
+
settings:
|
|
57
|
+
CPU: AnyCPU
|
|
58
|
+
- first:
|
|
59
|
+
Standalone: Win
|
|
60
|
+
second:
|
|
61
|
+
enabled: 0
|
|
62
|
+
settings:
|
|
63
|
+
CPU: AnyCPU
|
|
64
|
+
- first:
|
|
65
|
+
Standalone: Win64
|
|
66
|
+
second:
|
|
67
|
+
enabled: 0
|
|
68
|
+
settings:
|
|
69
|
+
CPU: AnyCPU
|
|
70
|
+
- first:
|
|
71
|
+
iPhone: iOS
|
|
72
|
+
second:
|
|
73
|
+
enabled: 0
|
|
74
|
+
settings:
|
|
75
|
+
AddToEmbeddedBinaries: false
|
|
76
|
+
CPU: AnyCPU
|
|
77
|
+
CompileFlags:
|
|
78
|
+
FrameworkDependencies:
|
|
79
|
+
userData:
|
|
80
|
+
assetBundleName:
|
|
81
|
+
assetBundleVariant:
|
|
Binary file
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: b27b30e4e87554214b41504abd9a3755
|
|
3
|
+
PluginImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
iconMap: {}
|
|
7
|
+
executionOrder: {}
|
|
8
|
+
defineConstraints: []
|
|
9
|
+
isPreloaded: 0
|
|
10
|
+
isOverridable: 1
|
|
11
|
+
isExplicitlyReferenced: 0
|
|
12
|
+
validateReferences: 1
|
|
13
|
+
platformData:
|
|
14
|
+
- first:
|
|
15
|
+
: Any
|
|
16
|
+
second:
|
|
17
|
+
enabled: 0
|
|
18
|
+
settings:
|
|
19
|
+
Exclude Android: 1
|
|
20
|
+
Exclude Editor: 0
|
|
21
|
+
Exclude Linux64: 0
|
|
22
|
+
Exclude OSXUniversal: 0
|
|
23
|
+
Exclude Win: 0
|
|
24
|
+
Exclude Win64: 0
|
|
25
|
+
Exclude iOS: 1
|
|
26
|
+
- first:
|
|
27
|
+
Android: Android
|
|
28
|
+
second:
|
|
29
|
+
enabled: 0
|
|
30
|
+
settings:
|
|
31
|
+
AndroidSharedLibraryType: Executable
|
|
32
|
+
CPU: ARMv7
|
|
33
|
+
- first:
|
|
34
|
+
Any:
|
|
35
|
+
second:
|
|
36
|
+
enabled: 0
|
|
37
|
+
settings: {}
|
|
38
|
+
- first:
|
|
39
|
+
Editor: Editor
|
|
40
|
+
second:
|
|
41
|
+
enabled: 1
|
|
42
|
+
settings:
|
|
43
|
+
CPU: x86_64
|
|
44
|
+
DefaultValueInitialized: true
|
|
45
|
+
OS: Linux
|
|
46
|
+
- first:
|
|
47
|
+
Standalone: Linux64
|
|
48
|
+
second:
|
|
49
|
+
enabled: 1
|
|
50
|
+
settings:
|
|
51
|
+
CPU: AnyCPU
|
|
52
|
+
- first:
|
|
53
|
+
Standalone: OSXUniversal
|
|
54
|
+
second:
|
|
55
|
+
enabled: 1
|
|
56
|
+
settings:
|
|
57
|
+
CPU: AnyCPU
|
|
58
|
+
- first:
|
|
59
|
+
Standalone: Win
|
|
60
|
+
second:
|
|
61
|
+
enabled: 1
|
|
62
|
+
settings:
|
|
63
|
+
CPU: AnyCPU
|
|
64
|
+
- first:
|
|
65
|
+
Standalone: Win64
|
|
66
|
+
second:
|
|
67
|
+
enabled: 1
|
|
68
|
+
settings:
|
|
69
|
+
CPU: AnyCPU
|
|
70
|
+
- first:
|
|
71
|
+
iPhone: iOS
|
|
72
|
+
second:
|
|
73
|
+
enabled: 0
|
|
74
|
+
settings:
|
|
75
|
+
AddToEmbeddedBinaries: false
|
|
76
|
+
CPU: AnyCPU
|
|
77
|
+
CompileFlags:
|
|
78
|
+
FrameworkDependencies:
|
|
79
|
+
userData:
|
|
80
|
+
assetBundleName:
|
|
81
|
+
assetBundleVariant:
|
|
Binary file
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: ed845f30a62cb48a992c3d6e00fb3b0f
|
|
3
|
+
PluginImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
iconMap: {}
|
|
7
|
+
executionOrder: {}
|
|
8
|
+
defineConstraints: []
|
|
9
|
+
isPreloaded: 0
|
|
10
|
+
isOverridable: 1
|
|
11
|
+
isExplicitlyReferenced: 0
|
|
12
|
+
validateReferences: 1
|
|
13
|
+
platformData:
|
|
14
|
+
- first:
|
|
15
|
+
: Any
|
|
16
|
+
second:
|
|
17
|
+
enabled: 0
|
|
18
|
+
settings:
|
|
19
|
+
Exclude Android: 1
|
|
20
|
+
Exclude Editor: 0
|
|
21
|
+
Exclude Linux64: 0
|
|
22
|
+
Exclude OSXUniversal: 0
|
|
23
|
+
Exclude Win: 1
|
|
24
|
+
Exclude Win64: 0
|
|
25
|
+
Exclude iOS: 1
|
|
26
|
+
- first:
|
|
27
|
+
Android: Android
|
|
28
|
+
second:
|
|
29
|
+
enabled: 0
|
|
30
|
+
settings:
|
|
31
|
+
AndroidSharedLibraryType: Executable
|
|
32
|
+
CPU: ARMv7
|
|
33
|
+
- first:
|
|
34
|
+
Any:
|
|
35
|
+
second:
|
|
36
|
+
enabled: 0
|
|
37
|
+
settings: {}
|
|
38
|
+
- first:
|
|
39
|
+
Editor: Editor
|
|
40
|
+
second:
|
|
41
|
+
enabled: 1
|
|
42
|
+
settings:
|
|
43
|
+
CPU: x86_64
|
|
44
|
+
DefaultValueInitialized: true
|
|
45
|
+
OS: Windows
|
|
46
|
+
- first:
|
|
47
|
+
Standalone: Linux64
|
|
48
|
+
second:
|
|
49
|
+
enabled: 1
|
|
50
|
+
settings:
|
|
51
|
+
CPU: AnyCPU
|
|
52
|
+
- first:
|
|
53
|
+
Standalone: OSXUniversal
|
|
54
|
+
second:
|
|
55
|
+
enabled: 1
|
|
56
|
+
settings:
|
|
57
|
+
CPU: AnyCPU
|
|
58
|
+
- first:
|
|
59
|
+
Standalone: Win
|
|
60
|
+
second:
|
|
61
|
+
enabled: 0
|
|
62
|
+
settings:
|
|
63
|
+
CPU: AnyCPU
|
|
64
|
+
- first:
|
|
65
|
+
Standalone: Win64
|
|
66
|
+
second:
|
|
67
|
+
enabled: 1
|
|
68
|
+
settings:
|
|
69
|
+
CPU: AnyCPU
|
|
70
|
+
- first:
|
|
71
|
+
iPhone: iOS
|
|
72
|
+
second:
|
|
73
|
+
enabled: 0
|
|
74
|
+
settings:
|
|
75
|
+
AddToEmbeddedBinaries: false
|
|
76
|
+
CPU: AnyCPU
|
|
77
|
+
CompileFlags:
|
|
78
|
+
FrameworkDependencies:
|
|
79
|
+
userData:
|
|
80
|
+
assetBundleName:
|
|
81
|
+
assetBundleVariant:
|
|
Binary file
|
|
Binary file
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
// Modified for Unity
|
|
2
|
+
#if UNITY_ANDROID && !UNITY_EDITOR
|
|
3
|
+
#define __ANDROID__
|
|
4
|
+
#define __MOBILE__
|
|
5
|
+
#elif UNITY_IOS && !UNITY_EDITOR
|
|
6
|
+
#define __IOS__
|
|
7
|
+
#define __ENABLE_COREML__
|
|
8
|
+
#define __MOBILE__
|
|
9
|
+
#elif UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
|
|
10
|
+
#define __ENABLE_COREML__
|
|
11
|
+
#endif
|
|
12
|
+
|
|
1
13
|
#if __XAMARIN__
|
|
2
14
|
#if __IOS__
|
|
3
15
|
[assembly: Foundation.LinkerSafe]
|