NewLife/LuckyClover

[fix] 改进net.sh脚本对OpenWRT的musl识别支持
大石头 authored at 2025-08-02 16:10:31
47b7112
Tree
1 Parent(s) 0d8259e
Summary: 8 changed files with 40 additions and 31 deletions.
Modified +2 -2
Modified +1 -1
Modified +2 -2
Modified +1 -1
Modified +1 -1
Modified +11 -8
Modified +11 -8
Modified +11 -8
Modified +2 -2
diff --git a/Clover/Clover.vcxproj b/Clover/Clover.vcxproj
index b510143..339ade5 100644
--- a/Clover/Clover.vcxproj
+++ b/Clover/Clover.vcxproj
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="..\packages\VC-LTL.5.2.2\build\native\VC-LTL.props" Condition="Exists('..\packages\VC-LTL.5.2.2\build\native\VC-LTL.props')" />
   <Import Project="..\packages\YY.NuGet.Import.Helper.1.0.2\build\native\YY.NuGet.Import.Helper.props" Condition="Exists('..\packages\YY.NuGet.Import.Helper.1.0.2\build\native\YY.NuGet.Import.Helper.props')" />
-  <Import Project="..\packages\VC-LTL.5.2.1\build\native\VC-LTL.props" Condition="Exists('..\packages\VC-LTL.5.2.1\build\native\VC-LTL.props')" />
   <ItemGroup Label="ProjectConfigurations">
     <ProjectConfiguration Include="Debug|Win32">
       <Configuration>Debug</Configuration>
@@ -182,8 +182,8 @@
       <ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
     </PropertyGroup>
     <Error Condition="!Exists('..\packages\YY-Thunks.1.1.7\build\native\YY-Thunks.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\YY-Thunks.1.1.7\build\native\YY-Thunks.targets'))" />
-    <Error Condition="!Exists('..\packages\VC-LTL.5.2.1\build\native\VC-LTL.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\VC-LTL.5.2.1\build\native\VC-LTL.props'))" />
     <Error Condition="!Exists('..\packages\YY.NuGet.Import.Helper.1.0.2\build\native\YY.NuGet.Import.Helper.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\YY.NuGet.Import.Helper.1.0.2\build\native\YY.NuGet.Import.Helper.props'))" />
     <Error Condition="!Exists('..\packages\YY.NuGet.Import.Helper.1.0.2\build\native\YY.NuGet.Import.Helper.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\YY.NuGet.Import.Helper.1.0.2\build\native\YY.NuGet.Import.Helper.targets'))" />
+    <Error Condition="!Exists('..\packages\VC-LTL.5.2.2\build\native\VC-LTL.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\VC-LTL.5.2.2\build\native\VC-LTL.props'))" />
   </Target>
 </Project>
\ No newline at end of file
Modified +1 -1
diff --git a/Clover/packages.config b/Clover/packages.config
index 20b9eb1..340a789 100644
--- a/Clover/packages.config
+++ b/Clover/packages.config
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="VC-LTL" version="5.2.1" targetFramework="native" />
+  <package id="VC-LTL" version="5.2.2" targetFramework="native" />
   <package id="YY.NuGet.Import.Helper" version="1.0.2" targetFramework="native" />
   <package id="YY-Thunks" version="1.1.7" targetFramework="native" />
 </packages>
\ No newline at end of file
Modified +2 -2
diff --git a/Installer45/Installer45.csproj b/Installer45/Installer45.csproj
index 6896047..c2d4e93 100644
--- a/Installer45/Installer45.csproj
+++ b/Installer45/Installer45.csproj
@@ -47,8 +47,8 @@
   </ItemGroup>
 
   <ItemGroup>
-    <PackageReference Include="NewLife.Core" Version="11.5.2025.701" />
-    <PackageReference Include="NewLife.Stardust" Version="3.4.2025.701" />
+    <PackageReference Include="NewLife.Core" Version="11.6.2025.801" />
+    <PackageReference Include="NewLife.Stardust" Version="3.4.2025.801" />
   </ItemGroup>
 
   <ItemGroup>
Modified +1 -1
diff --git a/LuckyAOT/LuckyAOT.csproj b/LuckyAOT/LuckyAOT.csproj
index b1a1068..97569b1 100644
--- a/LuckyAOT/LuckyAOT.csproj
+++ b/LuckyAOT/LuckyAOT.csproj
@@ -50,7 +50,7 @@
 
   <ItemGroup>
     <PackageReference Include="PublishAotCompressed" Version="1.0.5" />
-    <PackageReference Include="VC-LTL" Version="5.2.1" />
+    <PackageReference Include="VC-LTL" Version="5.2.2" />
     <PackageReference Include="YY-Thunks" Version="1.1.7" />
   </ItemGroup>
 </Project>
Modified +1 -1
diff --git a/LuckyClover/LuckyClover.csproj b/LuckyClover/LuckyClover.csproj
index 91b3a97..821439c 100644
--- a/LuckyClover/LuckyClover.csproj
+++ b/LuckyClover/LuckyClover.csproj
@@ -55,7 +55,7 @@
 
   <ItemGroup>
     <PackageReference Include="PublishAotCompressed" Version="1.0.5" />
-    <PackageReference Include="VC-LTL" Version="5.2.1" />
+    <PackageReference Include="VC-LTL" Version="5.2.2" />
     <PackageReference Include="YY-Thunks" Version="1.1.7" />
   </ItemGroup>
 
Modified +11 -8
diff --git a/Scripts/net.sh b/Scripts/net.sh
index 4e0515e..24840ae 100644
--- a/Scripts/net.sh
+++ b/Scripts/net.sh
@@ -1,4 +1,3 @@
-
 #!/bin/bash
 
 # 获取处理器架构
@@ -9,13 +8,17 @@ source="http://x.newlifex.com"
 
 echo arch: $arch
 
-# 识别Alpine
-if [ -f "/proc/version" ]; then
-  cat /proc/version | grep -q -E 'musl|Alpine'
-  if [ $? -eq 0 ]; then
-    prefix="$prefix-musl"
-    apk add libgcc libstdc++
-  fi
+# 识别Alpine和musl环境
+if [ -f "/proc/version" ] && cat /proc/version | grep -q -E 'musl|Alpine'; then
+  # Alpine系统
+  prefix="$prefix-musl"
+  apk add libgcc libstdc++
+elif ldd --version 2>&1 | grep -q 'musl'; then
+  # 常见musl环境
+  prefix="$prefix-musl"
+elif ls /lib/ld-musl-* >/dev/null 2>&1; then
+  # 其他musl环境
+  prefix="$prefix-musl"
 fi
 
 # 根据处理器架构选择下载的文件
Modified +11 -8
diff --git a/Scripts/net8.sh b/Scripts/net8.sh
index 2386d9a..7da65ed 100644
--- a/Scripts/net8.sh
+++ b/Scripts/net8.sh
@@ -1,4 +1,3 @@
-
 #!/bin/bash
 
 # 获取处理器架构
@@ -7,13 +6,17 @@ ver="8.0.18"
 prefix="aspnetcore-runtime-$ver-linux"
 source="http://x.newlifex.com"
 
-# 识别Alpine
-if [ -f "/proc/version" ]; then
-  cat /proc/version | grep -q -E 'musl|Alpine'
-  if [ $? -eq 0 ]; then
-    prefix="$prefix-musl"
-    apk add libgcc libstdc++
-  fi
+# 识别Alpine和musl环境
+if [ -f "/proc/version" ] && cat /proc/version | grep -q -E 'musl|Alpine'; then
+  # Alpine系统
+  prefix="$prefix-musl"
+  apk add libgcc libstdc++
+elif ldd --version 2>&1 | grep -q 'musl'; then
+  # 常见musl环境
+  prefix="$prefix-musl"
+elif ls /lib/ld-musl-* >/dev/null 2>&1; then
+  # 其他musl环境
+  prefix="$prefix-musl"
 fi
 
 # 根据处理器架构选择下载的文件
Modified +11 -8
diff --git a/Scripts/net9.sh b/Scripts/net9.sh
index 4e0515e..24840ae 100644
--- a/Scripts/net9.sh
+++ b/Scripts/net9.sh
@@ -1,4 +1,3 @@
-
 #!/bin/bash
 
 # 获取处理器架构
@@ -9,13 +8,17 @@ source="http://x.newlifex.com"
 
 echo arch: $arch
 
-# 识别Alpine
-if [ -f "/proc/version" ]; then
-  cat /proc/version | grep -q -E 'musl|Alpine'
-  if [ $? -eq 0 ]; then
-    prefix="$prefix-musl"
-    apk add libgcc libstdc++
-  fi
+# 识别Alpine和musl环境
+if [ -f "/proc/version" ] && cat /proc/version | grep -q -E 'musl|Alpine'; then
+  # Alpine系统
+  prefix="$prefix-musl"
+  apk add libgcc libstdc++
+elif ldd --version 2>&1 | grep -q 'musl'; then
+  # 常见musl环境
+  prefix="$prefix-musl"
+elif ls /lib/ld-musl-* >/dev/null 2>&1; then
+  # 其他musl环境
+  prefix="$prefix-musl"
 fi
 
 # 根据处理器架构选择下载的文件