Skip to content

Commit 5cc42a1

Browse files
Merge branch 'homuler:master' into master
2 parents ae463a9 + dbc617c commit 5cc42a1

File tree

23 files changed

+375
-161
lines changed

23 files changed

+375
-161
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ body:
1616
id: plugin_version
1717
attributes:
1818
label: Plugin Version or Commit ID
19-
placeholder: v0.16.1
19+
placeholder: v0.16.2
2020
validations:
2121
required: true
2222

2323
- type: input
2424
id: unity_version
2525
attributes:
2626
label: Unity Version
27-
placeholder: 6000.0.33f1
27+
placeholder: 6000.0.58f2
2828
validations:
2929
required: true
3030

@@ -88,8 +88,8 @@ body:
8888
label: "[Android Only] Android Build Tools and NDK Version"
8989
description: Required if the Target Platform is Android
9090
placeholder: |
91-
Build Tools: 30.0.2
92-
NDK: 21.4.7075529
91+
Build Tools: 35.0.0
92+
NDK: 28.2.13676358
9393
9494
- type: input
9595
id: ios_build_env

.github/ISSUE_TEMPLATE/build-install-issue.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ body:
1616
id: plugin_version
1717
attributes:
1818
label: Plugin Version or Commit ID
19-
placeholder: v0.16.1
19+
placeholder: v0.16.2
2020
validations:
2121
required: true
2222

2323
- type: input
2424
id: unity_version
2525
attributes:
2626
label: Unity Version
27-
placeholder: 6000.0.33f1
27+
placeholder: 6000.0.58f2
2828
validations:
2929
required: true
3030

@@ -81,8 +81,8 @@ body:
8181
label: "[Android Only] Android Build Tools and NDK Version"
8282
description: Required if the Target Platform is Android
8383
placeholder: |
84-
Build Tools: 30.0.2
85-
NDK: 21.4.7075529
84+
Build Tools: 35.0.0
85+
NDK: 28.2.13676358
8686
8787
- type: input
8888
id: ios_build_env

.github/ISSUE_TEMPLATE/support.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ body:
1717
id: plugin_version
1818
attributes:
1919
label: Plugin Version or Commit ID
20-
placeholder: v0.16.1
20+
placeholder: v0.16.2
2121
validations:
2222
required: true
2323

2424
- type: input
2525
id: unity_version
2626
attributes:
2727
label: Unity Version
28-
placeholder: 6000.0.33f1
28+
placeholder: 6000.0.58f2
2929
validations:
3030
required: true
3131

.github/workflows/build-package.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,27 @@ on:
99
linuxBuildArgs:
1010
type: string
1111
required: false
12+
default: '--desktop gpu --opencv cmake'
1213
description: Build options for Linux Build (skip if empty)
1314
androidBuildArgs:
1415
type: string
1516
required: false
17+
default: '--android arm64 --android_ndk_api_level 21'
1618
description: Build options for Android Build (skip if empty)
1719
macosBuildArgs:
1820
type: string
1921
required: false
22+
default: '--desktop cpu --opencv cmake --macos_universal'
2023
description: Build options for macOS Build (skip if empty)
2124
iosBuildArgs:
2225
type: string
2326
required: false
27+
default: '--ios arm64 --opencv cmake'
2428
description: Build options for iOS Build (skip if empty)
2529
windowsBuildArgs:
2630
type: string
2731
required: false
32+
default: '--desktop cpu --opencv cmake'
2833
description: Build options for Windows Build (skip if empty)
2934
schedule:
3035
- cron: 0 12 * * 0,3

.github/workflows/linux-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ jobs:
106106
os:
107107
- ubuntu-24.04
108108
unityVersion:
109-
- 6000.0.33f1
110-
- 2022.3.55f1
109+
- 6000.0.33f1 # FIXME: use >= 6000.0.58f2
110+
- 2022.3.55f1 # FIXME: use >= 2022.3.62f2
111111
steps:
112112
- name: Install UnityEditor
113113
run: |

.github/workflows/macos-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ jobs:
9898
os:
9999
- macos-13
100100
unity:
101-
- { version: "6000.0.33f1", changeset: "433b0a79340b" }
102-
- { version: "2022.3.55f1", changeset: "9f374180d209" }
101+
- { version: "6000.0.33f1", changeset: "433b0a79340b" } # FIXME: use >= 6000.0.58f2
102+
- { version: "2022.3.55f1", changeset: "9f374180d209" } # FIXME: use >= 2022.3.62f2
103103
steps:
104104
- name: Install UnityEditor
105105
run: |

.github/workflows/package.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ jobs:
164164
path: Packages/com.github.homuler.mediapipe/Runtime/Plugins/iOS
165165

166166
windows-build:
167-
runs-on: windows-2019
167+
runs-on: windows-2022
168168
steps:
169169
- uses: actions/checkout@v4
170170
with:
@@ -218,6 +218,7 @@ jobs:
218218
- name: Install UnityEditor
219219
if: ${{ env.BUILD_UNITYPACKAGE == '1' }}
220220
run: |
221+
# FIXME: use >= 6000.0.58f2
221222
sudo docker cp $(docker create --rm unityci/editor:6000.0.33f1-base-3):/opt/unity /opt/unity
222223
sudo chown -R $(id -u):$(id -g) /opt/unity
223224
@@ -291,6 +292,17 @@ jobs:
291292
run: |
292293
rm MediaPipeUnityPlugin-all.zip
293294
295+
# NOTE: a workaround to keep using Unity 6000.0.33f1
296+
- name: Patch dependencies
297+
run: |
298+
echo "$(jq '.dependencies["com.unity.test-framework"] = "1.4.5"' Packages/manifest.json)" > Packages/manifest.json
299+
echo "$(jq '
300+
.dependencies["com.unity.test-framework"].version = "1.4.5" |
301+
.dependencies["com.unity.test-framework"].source = "registry" |
302+
.dependencies["com.unity.test-framework"].url = "https://packages.unity.com"
303+
' Packages/packages-lock.json)" > Packages/packages-lock.json
304+
305+
294306
# NOTE: this step will overwrite AppSettings.asset
295307
- name: Export unitypackage
296308
if: ${{ env.BUILD_UNITYPACKAGE == '1' }}

.github/workflows/windows-test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
Packages/com.github.homuler.mediapipe/Runtime/Scripts/Protobuf/**/*.cs
3636
Packages/com.github.homuler.mediapipe/PackageResources/MediaPipe/*.bytes
3737
Packages/com.github.homuler.mediapipe/PackageResources/MediaPipe/*.txt
38-
key: libs-windows-2019-v1-${{ hashFiles('cache_key.txt') }}
38+
key: libs-windows-2022-v1-${{ hashFiles('cache_key.txt') }}
3939

4040
- name: Remove cache_key.txt
4141
run: |
@@ -90,10 +90,10 @@ jobs:
9090
fail-fast: false
9191
matrix:
9292
os:
93-
- windows-2019
93+
- windows-2022
9494
unity:
95-
- { version: "6000.0.33f1", changeset: "433b0a79340b" }
96-
- { version: "2022.3.55f1", changeset: "9f374180d209" }
95+
- { version: "6000.0.33f1", changeset: "433b0a79340b" } # FIXME: use >= 6000.0.58f2
96+
- { version: "2022.3.55f1", changeset: "9f374180d209" } # FIXME: use >= 2022.3.62f2
9797
steps:
9898
- name: Install UnityHub
9999
uses: crazy-max/ghaction-chocolatey@v3

Assets/Plugins/Android/mainTemplate.gradle

Lines changed: 77 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,83 @@ android {
4242
}**PACKAGING**
4343

4444
// Include libc++_shared.so
45-
task copyLibcppShared(type: Copy) {
46-
def ndkDir = android.ndkDirectory
47-
from("$ndkDir/sources/cxx-stl/llvm-libc++/libs") { include '**/libc++_shared.so' }
48-
into("$projectDir/src/main/jniLibs")
45+
task copyLibcppShared {
46+
doLast {
47+
def ndkDir = android.ndkDirectory
48+
def abiFilters = android.defaultConfig.ndk.abiFilters
49+
def destDir = file("$projectDir/src/main/jniLibs")
50+
51+
// Mapping from ABI to architecture triple (for NDK 23+)
52+
def abiToTriple = [
53+
'arm64-v8a': 'aarch64-linux-android',
54+
'armeabi-v7a': 'arm-linux-androideabi',
55+
'x86': 'i686-linux-android',
56+
'x86_64': 'x86_64-linux-android',
57+
'riscv64': 'riscv64-linux-android'
58+
]
59+
60+
// Find the prebuilt directory (usually there's only one)
61+
def prebuiltDir = null
62+
def prebuiltBase = file("$ndkDir/toolchains/llvm/prebuilt")
63+
if (prebuiltBase.exists()) {
64+
def prebuiltDirs = prebuiltBase.listFiles()?.findAll { it.isDirectory() }
65+
if (prebuiltDirs && prebuiltDirs.size() > 0) {
66+
prebuiltDir = prebuiltDirs[0]
67+
}
68+
}
69+
70+
abiFilters.each { abi ->
71+
def copied = false
72+
73+
// Try NDK 23+ path first
74+
if (prebuiltDir != null) {
75+
def triple = abiToTriple[abi]
76+
if (triple != null) {
77+
def libcppPath = file("$prebuiltDir/sysroot/usr/lib/$triple/libc++_shared.so")
78+
if (libcppPath.exists()) {
79+
def destAbiDir = file("$destDir/$abi")
80+
copy {
81+
from libcppPath
82+
into destAbiDir
83+
}
84+
copied = true
85+
}
86+
}
87+
}
88+
89+
// Fallback to old NDK path (NDK 22 and earlier)
90+
if (!copied) {
91+
def libcppPath = file("$ndkDir/sources/cxx-stl/llvm-libc++/libs/$abi/libc++_shared.so")
92+
if (libcppPath.exists()) {
93+
def destAbiDir = file("$destDir/$abi")
94+
copy {
95+
from libcppPath
96+
into destAbiDir
97+
}
98+
copied = true
99+
}
100+
}
101+
102+
if (!copied) {
103+
logger.warn("Could not find libc++_shared.so for $abi in NDK")
104+
}
105+
}
106+
}
107+
}
108+
109+
task cleanCopyLibcppShared {
110+
doLast {
111+
def destDir = file("$projectDir/src/main/jniLibs")
112+
def abiFilters = android.defaultConfig.ndk.abiFilters
113+
114+
abiFilters.each { abi ->
115+
def libcppFile = file("$destDir/$abi/libc++_shared.so")
116+
if (libcppFile.exists()) {
117+
libcppFile.delete()
118+
println "Deleted libc++_shared.so for $abi"
119+
}
120+
}
121+
}
49122
}
50123
clean.dependsOn 'cleanCopyLibcppShared'
51124

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
### [0.16.2](https://github.com/homuler/MediaPipeUnityPlugin/compare/v0.16.1...v0.16.2) (2025-10-12)
6+
7+
8+
### Bug Fixes
9+
10+
* workaround for compilation errors on macOS ([#1404](https://github.com/homuler/MediaPipeUnityPlugin/issues/1404)) ([4504bd8](https://github.com/homuler/MediaPipeUnityPlugin/commit/4504bd808286bb48fe3687bb6611052ee87423db))
11+
12+
13+
### Build System
14+
15+
* MediaPipe v0.10.22 ([#1357](https://github.com/homuler/MediaPipeUnityPlugin/issues/1357)) ([4fbe60f](https://github.com/homuler/MediaPipeUnityPlugin/commit/4fbe60fcba377ca4254e58eae5f27e07656f6307))
16+
* stop supporting Ubuntu 20.04 ([#1408](https://github.com/homuler/MediaPipeUnityPlugin/issues/1408)) ([f81cc1d](https://github.com/homuler/MediaPipeUnityPlugin/commit/f81cc1d95a7c0d0eac588d6dedbfd6a76b988273))
17+
* upgrade the Android NDK version to support 16KB page size ([#1407](https://github.com/homuler/MediaPipeUnityPlugin/issues/1407)) ([f7d125f](https://github.com/homuler/MediaPipeUnityPlugin/commit/f7d125fb37836ee83f6e80766720d04bd06f7a4f))
18+
* upgrade Unity to support Android 16KB page sizes ([#1409](https://github.com/homuler/MediaPipeUnityPlugin/issues/1409)) ([1c0aee7](https://github.com/homuler/MediaPipeUnityPlugin/commit/1c0aee7f9fa349b51e947f6da65bf53a7f0127d3))
19+
520
### [0.16.1](https://github.com/homuler/MediaPipeUnityPlugin/compare/v0.16.0...v0.16.1) (2025-03-23)
621

722

0 commit comments

Comments
 (0)