This commit is contained in:
TheWhiteDog9487
2026-08-08 12:19:54 +08:00
parent d4550e240c
commit d5cf0c9910
2 changed files with 38 additions and 2 deletions
+33 -1
View File
@@ -36,4 +36,36 @@ wget https://github.com/TheWhiteDog9487/lag2cn/releases/latest/download/language
chmod +x language_arm chmod +x language_arm
./language_arm ./language_arm
rm language_arm rm language_arm
``` ```
## 关于可用性
对每一个系统版本进行实际测试是不现实的,我会尽量保证可用性,但是更新之后的测试只会在最新版本进行
并且,由于各种系统版本众多来源复杂,哪怕是最新版本也未必100%可用
故此,如果您在使用过程中遇到问题,请在GitHub仓库打开一个新的issue,我会尽力处理
## 如果你想自行编译
最低依赖项:
- .NET 10 SDK
- 任意C++编译器
推荐依赖项:
- Alpine Linux
- .NET 10 SDK
- Clang
- build-base
推荐使用AlpineLinux进行编译,因为Alpine的系统libc就是musl,编译出的产物可以直接用而不需要管目标系统glibc的版本问题
您可以使用下面的Docker命令获得一个Alpine环境
```shell
docker run --rm -it -v .:/src -w /src alpine
```
安装依赖项
```shell
apk update
apk add clang build-base dotnet10-sdk
```
然后进行编译
```shell
dotnet publish language.cs
```
你需要的ELF会出现在`artifacts/language/`文件夹内
+5 -1
View File
@@ -1,3 +1,6 @@
#!/usr/bin/env -S dotnet --
// https://learn.microsoft.com/zh-cn/dotnet/core/sdk/file-based-apps
#:property PublishAot=true #:property PublishAot=true
#:property StaticExecutable=true #:property StaticExecutable=true
#:property OptimizationPreference=Speed #:property OptimizationPreference=Speed
@@ -128,4 +131,5 @@ enum SupportedLinuxDistributions {
Debian, Debian,
Armbian, Armbian,
Ubuntu, Ubuntu,
ArchLinux } ArchLinux,
CachyOS }