From 8ecbceacc6235b2e042f3c0610c7209139c9735f Mon Sep 17 00:00:00 2001 From: Luca Maccarini Date: Fri, 15 Aug 2025 03:46:25 +0200 Subject: [PATCH 1/4] fix runtimes copy, preserving runtimes folder structure --- .gitignore | 3 ++- LLama/runtimes/build/LLamaSharpBackend.props | 18 ++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 206b0dac1..e692a8b99 100644 --- a/.gitignore +++ b/.gitignore @@ -351,4 +351,5 @@ site/ **/appsettings.Local.json /LLama/runtimes/deps /LLama/runtimes/deps.zip -/LLama/runtimes/release_id.txt \ No newline at end of file +/LLama/runtimes/release_id.txt +/Llama.Mobile/Resources/Raw diff --git a/LLama/runtimes/build/LLamaSharpBackend.props b/LLama/runtimes/build/LLamaSharpBackend.props index 49c95682b..9569a24be 100644 --- a/LLama/runtimes/build/LLamaSharpBackend.props +++ b/LLama/runtimes/build/LLamaSharpBackend.props @@ -1,18 +1,16 @@ - - - - PreserveNewest - false - %(RecursiveDir)%(Filename)%(Extension) - - + + + PreserveNewest + false + runtimes\%(RecursiveDir)%(Filename)%(Extension) + + Date: Fri, 15 Aug 2025 03:47:30 +0200 Subject: [PATCH 2/4] removed android runtimes manual copy --- LLama/runtimes/build/LLamaSharpBackend.props | 29 -------------------- 1 file changed, 29 deletions(-) diff --git a/LLama/runtimes/build/LLamaSharpBackend.props b/LLama/runtimes/build/LLamaSharpBackend.props index 9569a24be..f3b0cf39c 100644 --- a/LLama/runtimes/build/LLamaSharpBackend.props +++ b/LLama/runtimes/build/LLamaSharpBackend.props @@ -13,35 +13,6 @@ - - - runtimes\android-x86\native\libllama.so - x86 - - - runtimes\android-x86\native\libggml.so - x86 - - - runtimes\android-x86\native\libggml-base.so - x86 - - - runtimes\android-x86\native\libggml-cpu.so - x86 - - - runtimes\android-x86\native\libmtmd.so - x86 - - - Date: Fri, 15 Aug 2025 05:39:23 +0200 Subject: [PATCH 3/4] commented android dll not present in 0.24.0 --- LLama/runtimes/build/LLamaSharpBackend.props | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/LLama/runtimes/build/LLamaSharpBackend.props b/LLama/runtimes/build/LLamaSharpBackend.props index f3b0cf39c..82b12fdd7 100644 --- a/LLama/runtimes/build/LLamaSharpBackend.props +++ b/LLama/runtimes/build/LLamaSharpBackend.props @@ -35,11 +35,11 @@ lib\x86_64\libggml-cpu.so x86_64 - lib\x86_64\libmtmd.so x86_64 - + --> lib\arm64-v8a\libggml-cpu.so arm64-v8a - lib\arm64-v8a\libmtmd.so arm64-v8a - + --> From 44a6085c66d411db7a203c2370bb20d1bb4d3644 Mon Sep 17 00:00:00 2001 From: Luca Maccarini Date: Sun, 17 Aug 2025 16:20:37 +0200 Subject: [PATCH 4/4] improved issue solution in order to avoid extra installation step --- .../LLamaSharp.Backend.Cpu.Android.nuspec | 20 +- .../build/LLamaSharp.Backend.Cpu.nuspec | 200 +++++++++--------- .../LLamaSharp.Backend.Cuda12.Linux.nuspec | 10 +- .../LLamaSharp.Backend.Cuda12.Windows.nuspec | 10 +- .../LLamaSharp.Backend.Vulkan.Linux.nuspec | 10 +- .../LLamaSharp.Backend.Vulkan.Windows.nuspec | 10 +- LLama/runtimes/build/LLamaSharpBackend.props | 30 +-- 7 files changed, 145 insertions(+), 145 deletions(-) diff --git a/LLama/runtimes/build/LLamaSharp.Backend.Cpu.Android.nuspec b/LLama/runtimes/build/LLamaSharp.Backend.Cpu.Android.nuspec index 2c538b3e3..1bea6a4d5 100644 --- a/LLama/runtimes/build/LLamaSharp.Backend.Cpu.Android.nuspec +++ b/LLama/runtimes/build/LLamaSharp.Backend.Cpu.Android.nuspec @@ -18,17 +18,17 @@ - - - - - + + + + + - - - - - + + + + + diff --git a/LLama/runtimes/build/LLamaSharp.Backend.Cpu.nuspec b/LLama/runtimes/build/LLamaSharp.Backend.Cpu.nuspec index 8a9b19ed0..73fbdff84 100644 --- a/LLama/runtimes/build/LLamaSharp.Backend.Cpu.nuspec +++ b/LLama/runtimes/build/LLamaSharp.Backend.Cpu.nuspec @@ -18,106 +18,106 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LLama/runtimes/build/LLamaSharp.Backend.Cuda12.Linux.nuspec b/LLama/runtimes/build/LLamaSharp.Backend.Cuda12.Linux.nuspec index 409327d96..34111357c 100644 --- a/LLama/runtimes/build/LLamaSharp.Backend.Cuda12.Linux.nuspec +++ b/LLama/runtimes/build/LLamaSharp.Backend.Cuda12.Linux.nuspec @@ -22,12 +22,12 @@ - - - + + + - - + + diff --git a/LLama/runtimes/build/LLamaSharp.Backend.Cuda12.Windows.nuspec b/LLama/runtimes/build/LLamaSharp.Backend.Cuda12.Windows.nuspec index 84c7773ca..db15e711a 100644 --- a/LLama/runtimes/build/LLamaSharp.Backend.Cuda12.Windows.nuspec +++ b/LLama/runtimes/build/LLamaSharp.Backend.Cuda12.Windows.nuspec @@ -22,12 +22,12 @@ - - - + + + - - + + diff --git a/LLama/runtimes/build/LLamaSharp.Backend.Vulkan.Linux.nuspec b/LLama/runtimes/build/LLamaSharp.Backend.Vulkan.Linux.nuspec index 5204fe7cc..0e5065709 100644 --- a/LLama/runtimes/build/LLamaSharp.Backend.Vulkan.Linux.nuspec +++ b/LLama/runtimes/build/LLamaSharp.Backend.Vulkan.Linux.nuspec @@ -22,12 +22,12 @@ - - - + + + - - + + diff --git a/LLama/runtimes/build/LLamaSharp.Backend.Vulkan.Windows.nuspec b/LLama/runtimes/build/LLamaSharp.Backend.Vulkan.Windows.nuspec index 7d86e2a0c..59b753809 100644 --- a/LLama/runtimes/build/LLamaSharp.Backend.Vulkan.Windows.nuspec +++ b/LLama/runtimes/build/LLamaSharp.Backend.Vulkan.Windows.nuspec @@ -22,12 +22,12 @@ - - - + + + - - + + diff --git a/LLama/runtimes/build/LLamaSharpBackend.props b/LLama/runtimes/build/LLamaSharpBackend.props index 82b12fdd7..cd5dc8023 100644 --- a/LLama/runtimes/build/LLamaSharpBackend.props +++ b/LLama/runtimes/build/LLamaSharpBackend.props @@ -5,7 +5,7 @@ so copy the native assemblies to the output directory. --> - + PreserveNewest false runtimes\%(RecursiveDir)%(Filename)%(Extension) @@ -16,59 +16,59 @@ + Include="$(MSBuildThisFileDirectory)..\..\LLamaSharpRuntimes\android-x86_64\native\libllama.so"> lib\x86_64\libllama.so x86_64 + Include="$(MSBuildThisFileDirectory)..\..\LLamaSharpRuntimes\android-x86_64\native\libggml.so"> lib\x86_64\libggml.so x86_64 + Include="$(MSBuildThisFileDirectory)..\..\LLamaSharpRuntimes\android-x86_64\native\libggml-base.so"> lib\x86_64\libggml-base.so x86_64 + Include="$(MSBuildThisFileDirectory)..\..\LLamaSharpRuntimes\android-x86_64\native\libggml-cpu.so"> lib\x86_64\libggml-cpu.so x86_64 - + + Include="$(MSBuildThisFileDirectory)..\..\LLamaSharpRuntimes\android-arm64-v8a\native\libllama.so"> lib\arm64-v8a\libllama.so arm64-v8a + Include="$(MSBuildThisFileDirectory)..\..\LLamaSharpRuntimes\android-arm64-v8a\native\libggml.so"> lib\arm64-v8a\libggml.so arm64-v8a + Include="$(MSBuildThisFileDirectory)..\..\LLamaSharpRuntimes\android-arm64-v8a\native\libggml-base.so"> lib\arm64-v8a\libggml-base.so arm64-v8a + Include="$(MSBuildThisFileDirectory)..\..\LLamaSharpRuntimes\android-arm64-v8a\native\libggml-cpu.so"> lib\arm64-v8a\libggml-cpu.so arm64-v8a - +