From 6757f6df5ba69402d6bf12a6959b8879017d1ef2 Mon Sep 17 00:00:00 2001 From: walon Date: Fri, 30 Jun 2023 20:15:03 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20=E4=BF=AE=E5=A4=8D2020-2021=E7=BC=96?= =?UTF-8?q?=E8=AF=91libil2cpp.a=E6=9C=AA=E5=8C=85=E5=90=ABbrotli=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E4=BB=A3=E7=A0=81=E6=96=87=E4=BB=B6=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E7=BC=96=E8=AF=91=E9=94=99=E8=AF=AF=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Lil2cppSourceCodeToXcodeproj2021OrOlder.cs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/Editor/BuildProcessors/AddLil2cppSourceCodeToXcodeproj2021OrOlder.cs b/Editor/BuildProcessors/AddLil2cppSourceCodeToXcodeproj2021OrOlder.cs index 84cfaca..9c4c3db 100644 --- a/Editor/BuildProcessors/AddLil2cppSourceCodeToXcodeproj2021OrOlder.cs +++ b/Editor/BuildProcessors/AddLil2cppSourceCodeToXcodeproj2021OrOlder.cs @@ -54,7 +54,7 @@ namespace HybridCLR.Editor CopyLibil2cppToXcodeProj(srcLibil2cppDir, dstLibil2cppDir); CopyExternalToXcodeProj(srcExternalDir, dstExternalDir); var lumpFiles = CreateLumps(dstLibil2cppDir, lumpDir); - var extraSources = GetExtraSourceFiles(dstExternalDir); + var extraSources = GetExtraSourceFiles(dstExternalDir, dstLibil2cppDir); var cflags = new List() { "-DIL2CPP_MONO_DEBUGGER_DISABLED", @@ -233,11 +233,22 @@ namespace HybridCLR.Editor return lumpFiles; } - private static List GetExtraSourceFiles(string externalDir) + private static List GetExtraSourceFiles(string externalDir, string libil2cppDir) { var files = new List(); - files.AddRange(Directory.GetFiles($"{externalDir}/zlib", "*.c")); - files.Add($"{externalDir}/xxHash/xxhash.c"); + foreach (string extraDir in new string[] + { + $"{externalDir}/zlib", + $"{externalDir}/xxHash", + $"{libil2cppDir}/os/ClassLibraryPAL/brotli", + }) + { + if (!Directory.Exists(extraDir)) + { + continue; + } + files.AddRange(Directory.GetFiles(extraDir, "*.c", SearchOption.AllDirectories)); + } return files; } }