[fix] 修复tvOS目标时,未复制裁剪AOT dll,导致生成桥接函数失败的bug

main
walon 2024-04-21 13:44:54 +08:00
parent fd81edb495
commit 74bab1d935
1 changed files with 7 additions and 4 deletions

View File

@ -45,6 +45,8 @@ namespace HybridCLR.Editor.BuildProcessors
return $"{projectDir}/Library/Bee/artifacts/PS4PlayerBuildProgram/ManagedStripped"; return $"{projectDir}/Library/Bee/artifacts/PS4PlayerBuildProgram/ManagedStripped";
case BuildTarget.PS5: case BuildTarget.PS5:
return $"{projectDir}/Library/Bee/artifacts/PS5PlayerBuildProgram/ManagedStripped"; return $"{projectDir}/Library/Bee/artifacts/PS5PlayerBuildProgram/ManagedStripped";
case BuildTarget.tvOS:
return $"{projectDir}/Library/Bee/artifacts/iOS/ManagedStripped";
#if TUANJIE_2022_3_OR_NEWER #if TUANJIE_2022_3_OR_NEWER
case BuildTarget.WeixinMiniGame: case BuildTarget.WeixinMiniGame:
return $"{projectDir}/Library/Bee/artifacts/WeixinMiniGame/ManagedStripped"; return $"{projectDir}/Library/Bee/artifacts/WeixinMiniGame/ManagedStripped";
@ -66,7 +68,8 @@ namespace HybridCLR.Editor.BuildProcessors
public void OnBeforeConvertRun(BuildReport report, Il2CppBuildPipelineData data) public void OnBeforeConvertRun(BuildReport report, Il2CppBuildPipelineData data)
{ {
// 此回调只在 2020中调用 // 此回调只在 2020中调用
CopyStripDlls(GetStripAssembliesDir2020(data.target), data.target); BuildTarget target = report.summary.platform;
CopyStripDlls(GetStripAssembliesDir2020(target), target);
} }
#endif #endif
@ -94,7 +97,7 @@ namespace HybridCLR.Editor.BuildProcessors
public void OnPostprocessBuild(BuildReport report) public void OnPostprocessBuild(BuildReport report)
{ {
#if UNITY_2021_1_OR_NEWER #if UNITY_2021_1_OR_NEWER
BuildTarget target = EditorUserBuildSettings.activeBuildTarget; BuildTarget target = report.summary.platform;
string srcStripDllPath = GetStripAssembliesDir2021(target); string srcStripDllPath = GetStripAssembliesDir2021(target);
if (!string.IsNullOrEmpty(srcStripDllPath) && Directory.Exists(srcStripDllPath)) if (!string.IsNullOrEmpty(srcStripDllPath) && Directory.Exists(srcStripDllPath))
{ {
@ -105,7 +108,7 @@ namespace HybridCLR.Editor.BuildProcessors
public void OnPreprocessBuild(BuildReport report) public void OnPreprocessBuild(BuildReport report)
{ {
BuildTarget target = EditorUserBuildSettings.activeBuildTarget; BuildTarget target = report.summary.platform;
var dstPath = SettingsUtil.GetAssembliesPostIl2CppStripDir(target); var dstPath = SettingsUtil.GetAssembliesPostIl2CppStripDir(target);
BashUtil.RecreateDir(dstPath); BashUtil.RecreateDir(dstPath);
} }