Compare commits

...

2 commits

Author SHA1 Message Date
2dust
f952d2383c Remove IncludeNativeLibrariesForSelfExtract
Some checks are pending
release Linux / build (Release) (push) Waiting to run
release macOS / build (Release) (push) Waiting to run
release Windows desktop (Avalonia UI) / build (Release) (push) Waiting to run
release Windows / build (Release) (push) Waiting to run
2025-02-11 10:16:19 +08:00
2dust
8a29e147d3 Added Enable Mixin parameter 2025-02-10 20:04:47 +08:00
2 changed files with 12 additions and 12 deletions

View file

@ -28,6 +28,5 @@
<UseSystemResourceKeys>true</UseSystemResourceKeys> <UseSystemResourceKeys>true</UseSystemResourceKeys>
<PublishSingleFile>true</PublishSingleFile> <PublishSingleFile>true</PublishSingleFile>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View file

@ -128,7 +128,7 @@ namespace ServiceLib.Services.CoreConfig
//Mixin //Mixin
try try
{ {
MixinContent(fileContent, node); await MixinContent(fileContent, node);
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -158,20 +158,21 @@ namespace ServiceLib.Services.CoreConfig
} }
} }
private void MixinContent(Dictionary<string, object> fileContent, ProfileItem node) private async Task MixinContent(Dictionary<string, object> fileContent, ProfileItem node)
{ {
//if (!_config.clashUIItem.enableMixinContent) if (!_config.ClashUIItem.EnableMixinContent)
//{
// return;
//}
var path = Utils.GetConfigPath(Global.ClashMixinConfigFileName);
if (!File.Exists(path))
{ {
return; return;
} }
var txtFile = File.ReadAllText(Utils.GetConfigPath(Global.ClashMixinConfigFileName)); var path = Utils.GetConfigPath(Global.ClashMixinConfigFileName);
if (!File.Exists(path))
{
var mixin = EmbedUtils.GetEmbedText(Global.ClashMixinYaml);
await File.AppendAllTextAsync(path, mixin);
}
var txtFile = await File.ReadAllTextAsync(Utils.GetConfigPath(Global.ClashMixinConfigFileName));
var mixinContent = YamlUtils.FromYaml<Dictionary<string, object>>(txtFile); var mixinContent = YamlUtils.FromYaml<Dictionary<string, object>>(txtFile);
if (mixinContent == null) if (mixinContent == null)