Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
laolarou726 committed Apr 2, 2023
1 parent 40b41fb commit b354c56
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 12 deletions.
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,25 @@ All you need for minecraft launcher in typescript. https://voxelum.github.io/min
+ Due to the limitation of the default number of connections in .NET, you need to manually override the default number of connections to ensure that some methods in <DownloadHelper> are executed normally. You can add the following code in App.xaml.cs or the entry point of the program to complete the modification (The maximum value should not exceed 1024)

```c#

using System.Net;

ServicePointManager.DefaultConnectionLimit = 512;

```

## Installation

There are two methods for the first step:
* Clone and copy ProjBobcat's source code to your solution folder, then add ProjBobcat's reference to your project.
* Directly install ProjBobcat via Nuget Package Manager or simply execute

```
Install-Package ProjBobcat
```
in Package Manager Console.
After the step above is completed, you need to add two lines of code into your program's entry point (App.xaml.cs or something else):
```c#
ServiceHelper.Init();
HttpClientHelper.Init();
```
in Package Manager Console.

## Roadmap

Expand Down Expand Up @@ -108,7 +107,9 @@ Selective components:
#### Java Detection

```csharp

var javaList = ProjBobcat.Class.Helper.SystemInfoHelper.FindJava(); // Returns a list of all java installations found in registry.
```

#### Core Initialization
Expand All @@ -130,13 +131,15 @@ var core = new DefaultGameCore
```

#### Game Scaning

```csharp

List<VersionInfo> gameList = core.VersionLocator.GetAllGames().ToList();

```

#### Resource Completion

```csharp
//Here we use mcbbs' download source, change the uri to meet your need.
var drc = new DefaultResourceCompleter
Expand Down Expand Up @@ -232,12 +235,14 @@ launchSettings.Authenticator = new OfflineAuthenticator
Online:

```csharp

launchSettings.Authenticator = new YggdrasilAuthenticator
{
LauncherAccountParser = core.VersionLocator.LauncherAccountParser
Email = "[email protected]", // Registered E-mail address on Mojang authentication server.
Password = "password"
};

```

#### Launch!
Expand Down
18 changes: 12 additions & 6 deletions README_zh_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,23 @@ All you need for minecraft launcher in typescript. https://voxelum.github.io/min
## 安装前提醒
+ 由于 Projbobcat 使用了来自 .NET Core 和 .NET 5.0+ 的诸多最新语言特性。如果您想使用本项目,您需要将您的项目框架版本设置为 **.NET 5 或更高版本**
+ 由于.NET的默认连接数限制,您需要手动覆盖掉默认的连接数才能保证 <DownloadHelper> 中的部分方法正常执行,您可以在App.xaml.cs或程序入口点添加下面的代码来完成修改(最大值不宜超过1024)

```c#

using System.Net;

ServicePointManager.DefaultConnectionLimit = 512;

```

## 安装方法
* 复制本项目源代码至您的解决方案中,然后在您的主项目添加引用。
* 直接通过 Nuget 包管理器安装 ProjBobcat 或在包管理器控制台中执行以下命令

```
Install-Package ProjBobcat
```
* 你需要在主程序入口处添加以下两行代码 (通常是 App.xaml.cs 或其他):
```c#
ServiceHelper.Init();
HttpClientHelper.Init();
```


## 功能列表

Expand Down Expand Up @@ -117,7 +116,9 @@ ProjBobcat提供了3大必要组件和一个核心总成来支撑起整个核心
#### 扫描 Java

```csharp

var javaList = ProjBobcat.Class.Helper.SystemInfoHelper.FindJava(); // 返回一个表,包含了从注册表中检索到的系统中 Java 安装的全部信息
```

#### 初始化核心
Expand All @@ -139,14 +140,17 @@ var core = new DefaultGameCore
```

#### 扫描全部游戏

```csharp

List<VersionInfo> gameList = core.VersionLocator.GetAllGames().ToList();

```

#### 资源补全

```csharp

// 这里使用mcbbs源,请自行修改以满足您的需求。
var drc = new DefaultResourceCompleter
{
Expand Down Expand Up @@ -242,12 +246,14 @@ launchSettings.Authenticator = new OfflineAuthenticator
在线验证模型:

```csharp

launchSettings.Authenticator = new YggdrasilAuthenticator
{
LauncherAccountParser = core.VersionLocator.LauncherAccountParser
Email = "[email protected]", // 在膜江验证服务器上注册的正版账号邮箱地址。
Password = "password" // 填写明文密码。
};

```

#### 启动游戏
Expand Down

0 comments on commit b354c56

Please sign in to comment.