-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'struct=redesign' into dev=main
- Loading branch information
Showing
182 changed files
with
250 additions
and
10 deletions.
There are no files selected for viewing
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.
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.
File renamed without changes
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.
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.
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
using Common.Update.Replacer; | ||
|
||
namespace KitX.Updater | ||
{ | ||
public class Updater | ||
{ | ||
/// <summary> | ||
/// 换个颜色执行 | ||
/// </summary> | ||
/// <param name="cc">新颜色</param> | ||
/// <param name="action">动作</param> | ||
private static void DoColor(ConsoleColor cc, Action action) | ||
{ | ||
ConsoleColor now = Console.ForegroundColor; | ||
Console.ForegroundColor = cc; | ||
action(); | ||
Console.ForegroundColor = now; | ||
} | ||
|
||
public static void Main(string[] args) | ||
{ | ||
try | ||
{ | ||
string _rootDir = string.Empty; | ||
string _newFilesDir = string.Empty; | ||
|
||
for (int i = 0; i < args.Length; i++) | ||
{ | ||
switch (args[i]) | ||
{ | ||
case "--source-dir": | ||
if (i != args.Length - 1) | ||
{ | ||
++i; | ||
_rootDir = args[i]; | ||
} | ||
else throw new Exception("参数 --source-dir 缺少值"); | ||
break; | ||
case "--update-from": | ||
if (i != args.Length - 1) | ||
{ | ||
++i; | ||
_newFilesDir = args[i]; | ||
} | ||
else throw new Exception("参数 --update-from 缺少值"); | ||
break; | ||
} | ||
} | ||
|
||
Replacer replacer = new Replacer() | ||
.SetSourceDir(_newFilesDir) | ||
.SetRootDir(_rootDir); | ||
replacer.Replace(); | ||
} | ||
catch (Exception e) | ||
{ | ||
DoColor(ConsoleColor.Red, new(() => | ||
{ | ||
Console.WriteLine(e.Message); | ||
})); | ||
} | ||
} | ||
} | ||
} | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters