Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge main to Plan-UI-SI #30

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c9dea62
💾 📝 Feat, Chore: 新建帮助项目 KitX.Updater
Dynesshely Sep 28, 2022
e6b3794
💾 📝 Feat, Chore(Updater): 尝试替换
Dynesshely Sep 30, 2022
6b3d3db
💾 📦 📝 Feat, Struct, Chore: 移动字体文件到新项目
Dynesshely Oct 2, 2022
12738d8
📝 🎇 Chore, Style(Fonts): 修改项目生成路径
Dynesshely Oct 3, 2022
5ff25e4
💾 📝 📦 Feat, Chore, Style(Assets): 分离资产到 KitX.Assets.dll , 新建 KitX.Ass…
Dynesshely Oct 3, 2022
c18520a
💾 📝 📦 Feat, Chore, Struct(Dashboard): 重做的应用图标, 更新引用链接
Dynesshely Oct 5, 2022
49e62c0
💾 Feat(KitX.Assets, KitX.Fonts): 移除不需要的逻辑
Dynesshely Oct 6, 2022
e1e3004
💾 📝 Feat, Chore: 更多图标, 托盘图标更清晰, 窗口图标更清晰
Dynesshely Oct 8, 2022
2531442
📝 Chore: .gitignore
Dynesshely Nov 6, 2022
e4bd27d
📦 Struct: .github
Dynesshely Nov 6, 2022
1ed3617
📝 🎇 Chore, Style: 更新 NuGet 包, 修复一些编译器建议的问题
Dynesshely Dec 5, 2022
65b06c6
💾 📝 Feat, Chore: 初始化 KitX.RepairTool 项目
Dynesshely Jan 11, 2023
275ecb9
💾 Feat: 新增在 linux 平台设定 `LC_ALL=C` 环境变量的 wayland 修复方案
Dynesshely Jan 11, 2023
6075d3e
💾 📝 Feat, Chore: CRLF; UTF-8 (BOM); 文件范围的 Namespace
Dynesshely Jan 12, 2023
7795e83
📝 Chore: 移除不受支持的选项: BaseOutputPath, BaseIntermediateOutputPath
Dynesshely Jan 14, 2023
9e83d24
📄 Docs: Init submodules' README.md
Dynesshely Feb 11, 2023
a8d8f5a
📝 📄 🔧 Chore, Docs, Fix: Typo MR -> PR
Dynesshely Feb 14, 2023
6e7499e
📄 Docs: Init LICENSE
Dynesshely Feb 21, 2023
8c2237e
📦 Struct: Put dashboard files to alone folder.
Dynesshely Jul 26, 2023
98f9158
Merge branch 'merging' into struct=redesign
Dynesshely Jul 26, 2023
f8b5df1
📄 Docs: Updated README.md
Dynesshely Jul 26, 2023
6a3c6df
📦 Struct: Rename folders.
Dynesshely Jul 26, 2023
8d31db4
📝 Chore: Adapt to new struct.
Dynesshely Jul 26, 2023
fa47fa8
Merge branch 'struct=redesign' into dev=main
Dynesshely Jul 26, 2023
587cfd0
📦 Struct: Change projects names and adapt resources path.
Dynesshely Jul 26, 2023
b17fa57
🔧 Fix: Adapt to correct path.
Dynesshely Jul 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
191 changes: 95 additions & 96 deletions .github/workflows/auto-build.yml
Original file line number Diff line number Diff line change
@@ -1,101 +1,100 @@
name: auto-build

on:
schedule:
- cron: '0 6 * * 0'
schedule:
- cron: "0 6 * * 0"

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [win, linux, osx]
arch: [x86, x64, arm, arm64]
exclude:
- os: osx
arch: x86
- os: osx
arch: arm
- os: linux
arch: x86

runs-on: windows-latest

steps:

- uses: actions/checkout@v3
with:
repository: 'Crequency/KitX'
ref: 'dev=main'
submodules: 'true'

- name: Init Source Code
shell: pwsh
run: |
./ToolKits/start.ps1 dashboard
./ToolKits/start.ps1 reference

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x

- name: Filter Publish Profiles
shell: pwsh
working-directory: "KitX Dashboard"
run: |
cd "./Properties/PublishProfiles/"

echo "===== Origin Publish Profiles ====="

ls

cd ..
mkdir tmp

cp PublishProfiles/${{ matrix.os }}-${{ matrix.arch }}*.pubxml tmp/

rm PublishProfiles/*

cp tmp/* PublishProfiles/

echo "===== Filter Publish Profiles ====="

ls PublishProfiles

- name: Publish
shell: pwsh
run: |
cd "ToolKits"
cd "KitX.ToolKits.Publisher"

echo "===== Run command: `dotnet run` ====="

dotnet run

echo "===== `dotnet run` command done ====="

$version = (Get-Item -path "..\..\KitX Publish\kitx-${{ matrix.os }}-${{ matrix.arch }}-single\KitX Dashboard.dll").VersionInfo.FileVersion
$date = (Get-Date -Format "yyyy.MM.dd")

echo "version: $version"
echo "date: $date"

# echo "version=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
# echo "date=$date" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append

echo "version=$version" >> $env:GITHUB_ENV
echo "date=$date" >> $env:GITHUB_ENV

cd ../../

- name: Create Release and Upload Release Asset
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ env.version }}
name: Auto Build for KitX v${{ env.version }} on ${{ env.date }}
body: Auto release by Actions.
draft: false
prerelease: true
files: |
KitX Publish/*.zip
build:
strategy:
fail-fast: false
matrix:
os: [win, linux, osx]
arch: [x86, x64, arm, arm64]
exclude:
- os: osx
arch: x86
- os: osx
arch: arm
- os: linux
arch: x86

runs-on: windows-latest

steps:
- uses: actions/checkout@v3
with:
repository: "Crequency/KitX"
ref: "dev=main"
submodules: "true"

- name: Init Source Code
shell: pwsh
run: |
./ToolKits/start.ps1 dashboard
./ToolKits/start.ps1 reference

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x

- name: Filter Publish Profiles
shell: pwsh
working-directory: "KitX Clients/KitX Dashboard/KitX Dashboard"
run: |
cd "./Properties/PublishProfiles/"

echo "===== Origin Publish Profiles ====="

ls

cd ..
mkdir tmp

cp PublishProfiles/${{ matrix.os }}-${{ matrix.arch }}*.pubxml tmp/

rm PublishProfiles/*

cp tmp/* PublishProfiles/

echo "===== Filter Publish Profiles ====="

ls PublishProfiles

- name: Publish
shell: pwsh
run: |
cd "ToolKits"
cd "KitX.ToolKits.Publisher"

echo "===== Run command: `dotnet run` ====="

dotnet run

echo "===== `dotnet run` command done ====="

$version = (Get-Item -path "..\..\KitX Publish\kitx-${{ matrix.os }}-${{ matrix.arch }}-single\KitX Dashboard.dll").VersionInfo.FileVersion
$date = (Get-Date -Format "yyyy.MM.dd")

echo "version: $version"
echo "date: $date"

# echo "version=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
# echo "date=$date" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append

echo "version=$version" >> $env:GITHUB_ENV
echo "date=$date" >> $env:GITHUB_ENV

cd ../../

- name: Create Release and Upload Release Asset
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ env.version }}
name: Auto Build for KitX v${{ env.version }} on ${{ env.date }}
body: Auto release by Actions.
draft: false
prerelease: true
files: |
KitX Publish/*.zip
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added KitX Dashboard Assets/KitX-Icon-1024x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added KitX Dashboard Assets/KitX-Icon-128x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added KitX Dashboard Assets/KitX-Icon-1920x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added KitX Dashboard Assets/KitX-Icon-256x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added KitX Dashboard Assets/KitX-Icon-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added KitX Dashboard Assets/KitX-Icon-32x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added KitX Dashboard Assets/KitX-Icon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added KitX Dashboard Assets/KitX-Icon-512x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added KitX Dashboard Assets/KitX-Icon-64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions KitX Dashboard Assets/KitX.Dashboard.Assets.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<!--Avalonia doesen't support TrimMode=link currently,but we are working on that https://github.com/AvaloniaUI/Avalonia/issues/6892 -->
<TrimMode>copyused</TrimMode>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
</PropertyGroup>
<ItemGroup>
<None Remove="KitX-Icon-1024x-margin-2x.png" />
<None Remove="KitX-Icon-1024x.png" />
<None Remove="KitX-Icon-128x.png" />
<None Remove="KitX-Icon-1920x-margin-1x.png" />
<None Remove="KitX-Icon-1920x-margin-2x.png" />
<None Remove="KitX-Icon-1920x.png" />
<None Remove="KitX-Icon-256x-margin-2x.png" />
<None Remove="KitX-Icon-256x.png" />
<None Remove="KitX-Icon-256x256.png" />
<None Remove="KitX-Icon-32x.png" />
<None Remove="KitX-Icon-32x32.png" />
<None Remove="KitX-Icon-512x-margin-2x.png" />
<None Remove="KitX-Icon-512x.png" />
<None Remove="KitX-Icon-64x64.png" />
</ItemGroup>
<ItemGroup>
<AvaloniaResource Include="KitX-Icon-1024x-margin-2x.png" />
<AvaloniaResource Include="KitX-Icon-1024x.png" />
<AvaloniaResource Include="KitX-Icon-128x.png" />
<AvaloniaResource Include="KitX-Icon-1920x-margin-1x.png" />
<AvaloniaResource Include="KitX-Icon-1920x-margin-2x.png" />
<AvaloniaResource Include="KitX-Icon-1920x.png" />
<AvaloniaResource Include="KitX-Icon-256x-margin-2x.png" />
<AvaloniaResource Include="KitX-Icon-256x.png" />
<AvaloniaResource Include="KitX-Icon-256x256.png" />
<AvaloniaResource Include="KitX-Icon-32x.png" />
<AvaloniaResource Include="KitX-Icon-512x-margin-2x.png" />
<AvaloniaResource Include="KitX-Icon-512x.png" />
</ItemGroup>
<ItemGroup>
<AvaloniaResource Include="KitX-Icon-32x32.png" />
<AvaloniaResource Include="KitX-Icon-64x64.png" />
</ItemGroup>
<ItemGroup>
<!--This helps with theme dll-s trimming.
If you will publish your application in self-contained mode with p:PublishTrimmed=true and it will use Fluent theme Default theme will be trimmed from the output and vice versa.
https://github.com/AvaloniaUI/Avalonia/issues/5593 -->
<TrimmableAssembly Include="Avalonia.Themes.Fluent" />
<TrimmableAssembly Include="Avalonia.Themes.Default" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="0.10.18" />
<PackageReference Include="Avalonia.Desktop" Version="0.10.18" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="0.10.18" />
<PackageReference Include="XamlNameReferenceGenerator" Version="1.5.1" />
</ItemGroup>
</Project>
32 changes: 32 additions & 0 deletions KitX Dashboard Fonts/KitX.Dashboard.Fonts.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<!--Avalonia doesen't support TrimMode=link currently,but we are working on that https://github.com/AvaloniaUI/Avalonia/issues/6892 -->
<TrimMode>copyused</TrimMode>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
</PropertyGroup>
<ItemGroup>
<None Remove="sarasa-mono-cl-regular.ttf" />
<None Remove="SourceHanSans-VF.ttf" />
</ItemGroup>
<ItemGroup>
<AvaloniaResource Include="sarasa-mono-cl-regular.ttf" />
<AvaloniaResource Include="SourceHanSans-VF.ttf" />
</ItemGroup>
<ItemGroup>
<!--This helps with theme dll-s trimming.
If you will publish your application in self-contained mode with p:PublishTrimmed=true and it will use Fluent theme Default theme will be trimmed from the output and vice versa.
https://github.com/AvaloniaUI/Avalonia/issues/5593 -->
<TrimmableAssembly Include="Avalonia.Themes.Fluent" />
<TrimmableAssembly Include="Avalonia.Themes.Default" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="0.10.18" />
<PackageReference Include="Avalonia.Desktop" Version="0.10.18" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="0.10.18" />
<PackageReference Include="XamlNameReferenceGenerator" Version="1.5.1" />
</ItemGroup>
</Project>
Binary file added KitX Dashboard Fonts/SourceHanSans-VF.ttf
Binary file not shown.
Binary file added KitX Dashboard Fonts/sarasa-mono-cl-regular.ttf
Binary file not shown.
11 changes: 11 additions & 0 deletions KitX Dashboard Repair Tool/KitX.Dashboard.RepairTool.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PublishAot>true</PublishAot>
</PropertyGroup>

</Project>
57 changes: 57 additions & 0 deletions KitX Dashboard Repair Tool/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

var tip_copyright = () =>
{
Console.WriteLine(
$"""
KitX Repair Tool (C) Crequency
Environment: {Environment.Version}
OS Version: {Environment.OSVersion}
""");
};

var log_exception = (Exception e) =>
{
Console.WriteLine(e.Message);
Console.WriteLine(e.StackTrace);
};

T? ask<T>(string tip = "Input: ", Func<string?, T>? parse = null)
{
Console.Write(tip);
string? input = Console.ReadLine();
if (input is null) return default(T);
if (parse is not null) return parse(input);
else throw new Exception(input);
};

var menu = () =>
{
Console.WriteLine(
"""
1. (root) Linux wayland repair (add `LC_ALL=C` to environment variables)
""");
return ask("Your select: ", x => int.TryParse(x, out int y) ? y : -1);
};

tip_copyright();
switch (menu())
{
case 1:
if (!OperatingSystem.IsLinux())
{
Console.WriteLine("Only on linux.");
break;
}
try
{
File.AppendAllLines("/etc/environment", new string[] { "LC_ALL=C" });
}
catch (Exception e)
{
log_exception(e);
}
break;
default:
break;
}

14 changes: 14 additions & 0 deletions KitX Dashboard Updater/KitX.Dashboard.Updater.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Common.Update.Replacer" Version="1.0.1.2" />
</ItemGroup>

</Project>
Loading
Loading