Skip to content

Commit

Permalink
docs: NuGet.config & README
Browse files Browse the repository at this point in the history
  • Loading branch information
moomiji committed Oct 6, 2024
1 parent deb7770 commit 06acacb
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 12 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,6 @@ PublishScripts/
*.nuget.props
*.nuget.targets

# Nuget personal access tokens and Credentials
nuget.config

# Microsoft Azure Build Output
csx/
*.build.csdef
Expand Down
17 changes: 17 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="maaxyz.github.io" value="https://maaxyz.github.io/pkg/nuget/index.json" protocolVersion="3" />
</packageSources>
<packageSourceMapping>
<packageSource key="nuget.org">
<package pattern="*" />
<package pattern="Maa.*" />
</packageSource>
<packageSource key="maaxyz.github.io">
<package pattern="Maa.*" />
</packageSource>
</packageSourceMapping>
</configuration>
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,25 +66,30 @@ dotnet add package Maa.Framework --prerelease

#### Nightly Build

Download `nupkgs.zip` from [CI Action](https://github.com/MaaXYZ/MaaFramework.Binding.CSharp/actions/workflows/ci.yml) and extract files to `.\nupkgs\`.
##### Add package

- shell
``` ps1
dotnet add package Maa.Framework --prerelease -s .\nupkgs\
dotnet add package Maa.Framework --prerelease -s https://nuget.pkg.github.com/maaxyz/index.json
```

- or .csproj
##### Add package source

- .csproj
``` xml
<PropertyGroup>
<RestoreSources>$(RestoreSources);$(FullPath of .\nupkgs\)</RestoreSources>
<RestoreSources>$(RestoreSources);https://api.nuget.org/v3/index.json;https://maaxyz.github.io/pkg/nuget/index.json</RestoreSources>
</PropertyGroup>
```

- NuGet.config
Please refer to [this config](../NuGet.config) for example, and [this article](https://maaxyz.github.io/MaaFramework.Binding.CSharp/articles/preview.html) for complete information.

#### Specifying RIDs

The supported Runtime IDs for `MaaFramework` can be found [here](https://github.com/MaaXYZ/MaaFramework/tree/main/tools/nupkgs).

To use specific RIDs, such as the supported `win` platform packages, manually reference the following packages:
To use specific RIDs, such as the supported `win` platform packages, please manually reference the following packages:
- `Maa.Framework.Native`
- `Maa.Framework.Runtime.win-arm64`
- `Maa.Framework.Runtime.win-x64`
Expand Down
13 changes: 9 additions & 4 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,25 @@ dotnet add package Maa.Framework --prerelease

#### 夜间构建

[CI Action](https://github.com/MaaXYZ/MaaFramework.Binding.CSharp/actions/workflows/ci.yml) 下载 `nupkgs.zip` 并解压文件到 `.\nupkgs\`
##### 添加包

- shell
``` ps1
dotnet add package Maa.Framework --prerelease -s .\nupkgs\
dotnet add package Maa.Framework --prerelease -s https://nuget.pkg.github.com/maaxyz/index.json
```

- or .csproj
##### 添加包源

- .csproj
``` xml
<PropertyGroup>
<RestoreSources>$(RestoreSources);$(FullPath of .\nupkgs\)</RestoreSources>
<RestoreSources>$(RestoreSources);https://api.nuget.org/v3/index.json;https://maaxyz.github.io/pkg/nuget/index.json</RestoreSources>
</PropertyGroup>
```

- NuGet.config
例子请参考[该配置](../NuGet.config),完整信息请参考[该文章](https://maaxyz.github.io/MaaFramework.Binding.CSharp/articles/preview.html)

#### 指定 RIDs

`MaaFramework` 目前支持的 Runtime Id 可在[此处](https://github.com/MaaXYZ/MaaFramework/tree/main/tools/nupkgs)查询。
Expand Down

0 comments on commit 06acacb

Please sign in to comment.