Skip to content

Commit

Permalink
Merge pull request #5 from Shiroiame-Kusu/preview
Browse files Browse the repository at this point in the history
Preview
  • Loading branch information
Shiroiame-Kusu authored Mar 10, 2024
2 parents 80769e5 + f75b97a commit a513029
Show file tree
Hide file tree
Showing 184 changed files with 1,677 additions and 1,218 deletions.
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
name: "BUG反馈"
description: Serein的部分行为不符合预期
description: Hakuu的部分行为不符合预期
title: "BUG反馈 <在此处简单描述>"
labels: ["🐛Bug"]

body:
- type: input
id: version
attributes:
label: 当前使用的Serein版本
label: 当前使用的Hakuu版本
description: |
命令行:输入`version`
winform:点击设置,拉到最底后的版本查看
wpf:设置-Serein设置
wpf:设置-Hakuu设置
validations:
required: true

- type: textarea
id: expectation
attributes:
label: 你的预期
description: 预期Serein应该的反应
description: 预期Hakuu应该的反应
placeholder: |
1. ...
validations:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: 文档相关
url: https://github.com/Zaitonn/Serein-Docs/issues/new
url: https://github.com/Zaitonn/Hakuu-Docs/issues/new
about: 文档的问题请到对应仓库反馈
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/crash_report.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: "崩溃反馈"
description: Serein发生了莫名其妙的崩溃
description: Hakuu发生了莫名其妙的崩溃
title: "崩溃反馈 <在此处简单描述报错信息>"
labels: ["❗ 崩溃"]

body:
- type: input
id: version
attributes:
label: 当前使用的Serein版本
label: 当前使用的Hakuu版本
description: |
命令行:输入`version`
winform:点击设置,拉到最底后的版本查看
wpf:设置-Serein设置
wpf:设置-Hakuu设置
validations:
required: true

Expand Down
8 changes: 4 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@
version: 2
updates:
- package-ecosystem: "nuget"
directory: "Serein/Console/"
directory: "Hakuu/Console/"
schedule:
interval: "weekly"
labels:
- "🔨依赖"

- package-ecosystem: "nuget"
directory: "Serein/Console_For_Unix/"
directory: "Hakuu/Console_For_Unix/"
schedule:
interval: "weekly"
labels:
- "🔨依赖"

- package-ecosystem: "nuget"
directory: "Serein/Winform/"
directory: "Hakuu/Winform/"
schedule:
interval: "weekly"
labels:
- "🔨依赖"

- package-ecosystem: "nuget"
directory: "Serein/WPF/"
directory: "Hakuu/WPF/"
schedule:
interval: "weekly"
labels:
Expand Down
12 changes: 6 additions & 6 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ name-template: 'v$RESOLVED_VERSION'
tag-prefix: 'v'
tag-template: 'v$RESOLVED_VERSION'
template: |
![GitHub release (latest by date)](https://img.shields.io/github/downloads/Zaitonn/Serein/v$RESOLVED_VERSION/total) ![visitor](https://visitor-badge.glitch.me/badge?page_id=Zaitonn.Serein&left_text=Serein%20Visitor)
![GitHub release (latest by date)](https://img.shields.io/github/downloads/Zaitonn/Hakuu/v$RESOLVED_VERSION/total) ![visitor](https://visitor-badge.glitch.me/badge?page_id=Zaitonn.Hakuu&left_text=Hakuu%20Visitor)
[**✨完整更新日志**](https://serein.cc/docs/version/v$RESOLVED_VERSION)
[**✨完整更新日志**](https://Hakuu.cc/docs/version/v$RESOLVED_VERSION)
新版本的所有更新日志都在这里啦
[**Serein 问卷调查**](https://docs.qq.com/form/page/DTndVd0dmVWl4VFph)
[**Hakuu 问卷调查**](https://docs.qq.com/form/page/DTndVd0dmVWl4VFph)
想耽误您大约两分钟时间来填写这个问卷,这有助于作者更好地了解用户画像,开发更多功能ヾ(•ω•`)o
[**如何选择不同的版本**](https://serein.cc/docs/tutorial/differenceBetweenVersions) / [**在线统计 - Serein**](https://online-count.serein.cc/)
如果你是第一次使用Serein的小白或者不知道选以下哪一个版本,你可以先看看上面的教程或看看别人正在用什么。这会对你非常非常有帮助!!
[**如何选择不同的版本**](https://Hakuu.cc/docs/tutorial/differenceBetweenVersions) / [**在线统计 - Hakuu**](https://online-count.Hakuu.cc/)
如果你是第一次使用Hakuu的小白或者不知道选以下哪一个版本,你可以先看看上面的教程或看看别人正在用什么。这会对你非常非常有帮助!!
[**自建下载加速站**](https://download.serein.cc/)
[**自建下载加速站**](https://download.Hakuu.cc/)
如果出现文件下载速度过慢的情况,可以复制下载地址然后打开上面的网页粘贴
42 changes: 21 additions & 21 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,57 +27,57 @@ jobs:
- name: Write Build info
shell: cmd
run: |
cmd /c echo GITHUB ACTION #${{github.run_number}} >${{ github.workspace }}\Serein\Universal\buildinfo.info
cmd /c echo %date% %time% >>${{ github.workspace }}\Serein\Universal\buildinfo.info
cmd /c echo ${{github.ref}} ${{github.sha}}>>${{ github.workspace }}\Serein\Universal\buildinfo.info
cmd /c echo GITHUB ACTION #${{github.run_number}} >${{ github.workspace }}\Hakuu\Universal\buildinfo.info
cmd /c echo %date% %time% >>${{ github.workspace }}\Hakuu\Universal\buildinfo.info
cmd /c echo ${{github.ref}} ${{github.sha}}>>${{ github.workspace }}\Hakuu\Universal\buildinfo.info
- name: DotNet restore
run: dotnet restore

- name: Build the project(Release)
run: dotnet build -p:Configuration=Release "Serein/${{ matrix.project }}/Serein-${{ matrix.project }}.csproj"
run: dotnet build -p:Configuration=Release "Hakuu/${{ matrix.project }}/Hakuu-${{ matrix.project }}.csproj"

- name: Build the project(Debug)
run: dotnet build "Serein/${{ matrix.project }}/Serein-${{ matrix.project }}.csproj"
run: dotnet build "Hakuu/${{ matrix.project }}/Hakuu-${{ matrix.project }}.csproj"

- name: Upload Serein(Release,dotnet6-windows)
- name: Upload Hakuu(Release,dotnet6-windows)
uses: actions/upload-artifact@v3
with:
name: Serein_${{ matrix.project }}_dotnet6
path: ${{ github.workspace }}\Serein\${{ matrix.project }}\bin\Release\net6.0-windows
name: Hakuu_${{ matrix.project }}_dotnet6
path: ${{ github.workspace }}\Hakuu\${{ matrix.project }}\bin\Release\net6.0-windows
if-no-files-found: ignore

- name: Upload Serein(Release,dotnetframework472)
- name: Upload Hakuu(Release,dotnetframework472)
uses: actions/upload-artifact@v3
with:
name: Serein_${{ matrix.project }}_dotnetframework472
path: ${{ github.workspace }}\Serein\${{ matrix.project }}\bin\Release\net472
name: Hakuu_${{ matrix.project }}_dotnetframework472
path: ${{ github.workspace }}\Hakuu\${{ matrix.project }}\bin\Release\net472
if-no-files-found: ignore

- name: Upload Serein(Debug,dotnet6-windows)
- name: Upload Hakuu(Debug,dotnet6-windows)
uses: actions/upload-artifact@v3
with:
name: Serein_${{ matrix.project }}_dotnet6_debug
path: ${{ github.workspace }}\Serein\${{ matrix.project }}\bin\Debug\net6.0-windows
name: Hakuu_${{ matrix.project }}_dotnet6_debug
path: ${{ github.workspace }}\Hakuu\${{ matrix.project }}\bin\Debug\net6.0-windows
if-no-files-found: ignore

- name: Upload Serein(Debug,dotnetframework472)
- name: Upload Hakuu(Debug,dotnetframework472)
uses: actions/upload-artifact@v3
with:
name: Serein_${{ matrix.project }}_dotnetframework472_debug
path: ${{ github.workspace }}\Serein\${{ matrix.project }}\bin\Debug\net472
name: Hakuu_${{ matrix.project }}_dotnetframework472_debug
path: ${{ github.workspace }}\Hakuu\${{ matrix.project }}\bin\Debug\net472
if-no-files-found: ignore

- name: Build the project(Publish)
run: |
dotnet clean
dotnet publish "Serein/${{ matrix.project }}/Serein-${{ matrix.project }}.csproj" -f net6.0-windows --no-self-contained -p:PublishSingleFile=true -p:RuntimeIdentifier=win-x64 -p:IncludeContentInSingleFile=true
dotnet publish "Hakuu/${{ matrix.project }}/Hakuu-${{ matrix.project }}.csproj" -f net6.0-windows --no-self-contained -p:PublishSingleFile=true -p:RuntimeIdentifier=win-x64 -p:IncludeContentInSingleFile=true
- name: Upload Serein(Publish)
- name: Upload Hakuu(Publish)
uses: actions/upload-artifact@v3
with:
name: Serein_${{ matrix.project }}_dotnet6_publish
path: ${{ github.workspace }}\Serein\${{ matrix.project }}\bin\Debug\net6.0-windows\win-x64\publish
name: Hakuu_${{ matrix.project }}_dotnet6_publish
path: ${{ github.workspace }}\Hakuu\${{ matrix.project }}\bin\Debug\net6.0-windows\win-x64\publish
if-no-files-found: ignore


4 changes: 2 additions & 2 deletions .github/workflows/CodeQL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
- name: Build
shell: cmd
run: |
dotnet restore ${{ github.workspace }}\Serein.sln
dotnet build ${{ github.workspace }}\Serein.sln
dotnet restore ${{ github.workspace }}\Hakuu.sln
dotnet build ${{ github.workspace }}\Hakuu.sln
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ packages/
MigrationBackup/
TEST/
FodyWeavers.xsd
Serein/Universal/buildinfo.info
Hakuu/Universal/buildinfo.info
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"name": ".NET Core",
"type": "coreclr",
"request": "launch",
"program": "${workspaceFolder}/Serein/${input:targetApplication}/bin/Debug/${input:targetFramework}/Serein-${input:targetApplication}.dll",
"program": "${workspaceFolder}/Hakuu/${input:targetApplication}/bin/Debug/${input:targetFramework}/Hakuu-${input:targetApplication}.dll",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
Expand All @@ -24,7 +24,7 @@
"name": ".NET Framework",
"type": "clr",
"request": "launch",
"program": "${workspaceFolder}/Serein/${input:targetApplication}/bin/Debug/net472/Serein-${input:targetApplication}.exe",
"program": "${workspaceFolder}/Hakuu/${input:targetApplication}/bin/Debug/net472/Hakuu-${input:targetApplication}.exe",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
Expand Down
8 changes: 4 additions & 4 deletions Serein.sln → Hakuu.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.editorconfig = .editorconfig
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serein-WPF", "Serein\WPF\Serein-WPF.csproj", "{8F3D398A-56EC-472C-A8A2-7FEFDA52802E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hakuu-WPF", "Hakuu\WPF\Hakuu-WPF.csproj", "{8F3D398A-56EC-472C-A8A2-7FEFDA52802E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Serein", "Serein", "{4CE8D3DC-CC71-4D90-A331-200DB3349565}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Hakuu", "Hakuu", "{4CE8D3DC-CC71-4D90-A331-200DB3349565}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{F3289A65-8F01-478A-9A67-01E30B49A929}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Updater", "Serein\Tools\Updater\Updater.csproj", "{032DD87F-85CE-43E6-9E9B-75B6BA11553A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Updater", "Hakuu\Tools\Updater\Updater.csproj", "{032DD87F-85CE-43E6-9E9B-75B6BA11553A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SwitchToEdge", "Serein\Tools\SwitchToEdge\SwitchToEdge.csproj", "{FE2D1C6E-BF95-465E-B1B8-B48853DBAD3C}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SwitchToEdge", "Hakuu\Tools\SwitchToEdge\SwitchToEdge.csproj", "{FE2D1C6E-BF95-465E-B1B8-B48853DBAD3C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
File renamed without changes.
18 changes: 9 additions & 9 deletions Serein/Console/Console/Base.cs → Hakuu/Console/Console/Base.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using Serein.Base;
using Serein.Core.JSPlugin;
using Serein.Core.Server;
using Serein.Extensions;
using Hakuu.Base;
using Hakuu.Core.JSPlugin;
using Hakuu.Core.Server;
using Hakuu.Extensions;
using System;
using System.Runtime.InteropServices;
using System.Text;

namespace Serein.Utils.Console
namespace Hakuu.Utils.Console
{
internal static class Base
{
Expand Down Expand Up @@ -59,12 +59,12 @@ public static void Init()
#if UNIX
if (Environment.OSVersion.Platform != PlatformID.Unix)
{
Logger.Output(LogType.Warn, "此版本为Unix专供。为获得更好的使用体验,请尝试使用`Console`类型的Serein,下载链接:https://github.com/Zaitonn/Serein/releases/latest");
Logger.Output(LogType.Warn, "此版本为Unix专供。为获得更好的使用体验,请尝试使用`Console`类型的Hakuu,下载链接:https://github.com/Zaitonn/Hakuu/releases/latest");
}
#else
if (Environment.OSVersion.Platform != PlatformID.Win32NT)
{
Logger.Output(LogType.Warn, "此版本为Windows专供。为获得更好的使用体验,请尝试使用`Console For Unix`类型的Serein,下载链接:https://github.com/Zaitonn/Serein/releases/latest");
Logger.Output(LogType.Warn, "此版本为Windows专供。为获得更好的使用体验,请尝试使用`Console For Unix`类型的Hakuu,下载链接:https://github.com/Zaitonn/Hakuu/releases/latest");
}
#endif
}
Expand All @@ -77,7 +77,7 @@ public static void Start()
Runtime.Start();
Logger.Output(LogType.Info, "启动成功");
Logger.Output(LogType.Info, "你可以输入“help”获取更多信息");
System.Console.Title = "Serein " + Global.VERSION;
System.Console.Title = "Hakuu " + Global.VERSION;
System.Console.CancelKeyPress += (_, e) =>
{
if (ServerManager.Status)
Expand All @@ -88,7 +88,7 @@ public static void Start()
else
{
Logger.Output(LogType.Info, "正在关闭...");
JSFunc.Trigger(EventType.SereinClose);
JSFunc.Trigger(EventType.HakuuClose);
500.ToSleep();
Environment.Exit(0);
}
Expand Down
34 changes: 17 additions & 17 deletions Serein/Console/Console/Input.cs → Hakuu/Console/Console/Input.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
using System.Threading.Tasks;
using Serein.Base;
using Serein.Core.Generic;
using Serein.Extensions;
using Serein.Core.JSPlugin;
using Serein.Core.Server;
using Hakuu.Base;
using Hakuu.Core.Generic;
using Hakuu.Extensions;
using Hakuu.Core.JSPlugin;
using Hakuu.Core.Server;
using System;


namespace Serein.Utils.Console
namespace Hakuu.Utils.Console
{
internal static class Input
{
private static bool IsLoading;

private const string HelpMenu =
@"Serein 帮助菜单:
@"Hakuu 帮助菜单:
s|server <operation> 服务器
operation:
Expand All @@ -30,8 +30,8 @@ internal static class Input
o|open|connect - 连接
c|close|disconnect - 断开
e|execute <command> 执行指定Serein命令
command: Serein命令
e|execute <command> 执行指定Hakuu命令
command: Hakuu命令
sysinfo - 系统信息
clear - 清屏
Expand All @@ -44,7 +44,7 @@ internal static class Input
Tip:
· 其中“<参数>”为必选参数,“|”表示该命令的别称
· 以上命令对大小写均不敏感
· 当服务器运行时,输入的内容将被作为命令发送至服务器;若要执行Serein命令请在原有命令前面加上“serein ”,如“serein help”";
· 当服务器运行时,输入的内容将被作为命令发送至服务器;若要执行Hakuu命令请在原有命令前面加上“Hakuu ”,如“Hakuu help”";

/// <summary>
/// 处理输入消息
Expand All @@ -56,9 +56,9 @@ public static void Process(string? line)
{
return;
}
if (!ServerManager.Status || line.StartsWith("serein"))
if (!ServerManager.Status || line.StartsWith("Hakuu"))
{
line = System.Text.RegularExpressions.Regex.Replace(line, @"^serein\s?", string.Empty);
line = System.Text.RegularExpressions.Regex.Replace(line, @"^Hakuu\s?", string.Empty);
string[] args = line.ToLowerInvariant().Split(' ');
switch (args[0])
{
Expand All @@ -69,7 +69,7 @@ public static void Process(string? line)
}
else
{
JSFunc.Trigger(EventType.SereinClose);
JSFunc.Trigger(EventType.HakuuClose);
Environment.Exit(0);
}
break;
Expand Down Expand Up @@ -195,16 +195,16 @@ public static void Process(string? line)
case "v":
case "version":
Logger.Output(LogType.Info,
$"Serein {Global.VERSION}\n" +
$"Hakuu {Global.VERSION}\n" +
$"编译类型 {Global.BuildInfo.Type}\n" +
$"编译时间 {Global.BuildInfo.Time}\n" +
$"详细信息 {Global.BuildInfo.Detail.Replace("\r", string.Empty)}\n" +
"\n" +
"交流群: https://jq.qq.com/?_wv=1027&k=XNZqPSPv\n" +
"官网: https://serein.cc\n" +
"GitHub Repo: https://github.com/Zaitonn/Serein\n" +
"官网: https://Hakuu.cc\n" +
"GitHub Repo: https://github.com/Zaitonn/Hakuu\n" +
"Copyright © 2022 Zaitonn. All Rights Reserved.");
if (Global.Settings.Serein.AutoUpdate &&
if (Global.Settings.Hakuu.AutoUpdate &&
Update.LastVersion != null &&
Update.IsReadyToUpdate &&
Environment.OSVersion.Platform == PlatformID.Win32NT)
Expand Down
File renamed without changes.
Loading

0 comments on commit a513029

Please sign in to comment.