diff --git a/LANCommander.Client/LANCommander.Client.csproj b/LANCommander.Client/LANCommander.Client.csproj
index 6055ef27..95081727 100644
--- a/LANCommander.Client/LANCommander.Client.csproj
+++ b/LANCommander.Client/LANCommander.Client.csproj
@@ -3298,4 +3298,8 @@
+
+
+
+
diff --git a/LANCommander.Client/Models/Settings.cs b/LANCommander.Client/Models/Settings.cs
index d2323ca4..84652d59 100644
--- a/LANCommander.Client/Models/Settings.cs
+++ b/LANCommander.Client/Models/Settings.cs
@@ -1,4 +1,5 @@
-using System;
+using Microsoft.Extensions.Logging;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -13,6 +14,7 @@ namespace LANCommander.Client.Models
public GameSettings Games { get; set; } = new GameSettings();
public MediaSettings Media { get; set; } = new MediaSettings();
public ProfileSettings Profile { get; set; } = new ProfileSettings();
+ public DebugSettings Debug { get; set; } = new DebugSettings();
}
public class DatabaseSettings
@@ -43,4 +45,11 @@ namespace LANCommander.Client.Models
public string Alias { get; set; }
public string Avatar { get; set; }
}
+
+ public class DebugSettings
+ {
+ public bool EnableScriptDebugging { get; set; } = false;
+ public LogLevel LoggingLevel { get; set; } = LogLevel.Warning;
+ public string LoggingPath { get; set; } = "Logs";
+ }
}
diff --git a/LANCommander.Client/Services/DownloadService.cs b/LANCommander.Client/Services/DownloadService.cs
index 311a1cdd..9748f4c4 100644
--- a/LANCommander.Client/Services/DownloadService.cs
+++ b/LANCommander.Client/Services/DownloadService.cs
@@ -309,6 +309,9 @@ namespace LANCommander.Client.Services
script.UseFile(ScriptHelper.GetScriptFilePath(installDirectory, game.Id, SDK.Enums.ScriptType.Install));
+ if (Settings.Debug.EnableScriptDebugging)
+ script.EnableDebug();
+
return script.Execute();
}
@@ -341,6 +344,9 @@ namespace LANCommander.Client.Services
SDK.GameService.UpdatePlayerAlias(installDirectory, game.Id, newName);
+ if (Settings.Debug.EnableScriptDebugging)
+ script.EnableDebug();
+
return script.Execute();
}
@@ -371,6 +377,9 @@ namespace LANCommander.Client.Services
SDK.GameService.UpdateCurrentKey(installDirectory, game.Id, key);
+ if (Settings.Debug.EnableScriptDebugging)
+ script.EnableDebug();
+
return script.Execute();
}
diff --git a/LANCommander.PowerShell/Cmdlets/ConvertFrom-SerializedBase64.cs b/LANCommander.PowerShell/Cmdlets/ConvertFrom-SerializedBase64.cs
index d600b385..0df64657 100644
--- a/LANCommander.PowerShell/Cmdlets/ConvertFrom-SerializedBase64.cs
+++ b/LANCommander.PowerShell/Cmdlets/ConvertFrom-SerializedBase64.cs
@@ -4,6 +4,8 @@ using System.Linq;
using System.Management.Automation;
using System.Text;
using System.Threading.Tasks;
+using YamlDotNet.Serialization;
+using YamlDotNet.Serialization.NamingConventions;
namespace LANCommander.PowerShell.Cmdlets
{
@@ -16,9 +18,14 @@ namespace LANCommander.PowerShell.Cmdlets
protected override void ProcessRecord()
{
- var xml = Encoding.UTF8.GetString(Convert.FromBase64String(Input));
+ var yaml = Encoding.UTF8.GetString(Convert.FromBase64String(Input));
- WriteObject(PSSerializer.Deserialize(xml));
+ var deserializer = new DeserializerBuilder()
+ .IgnoreUnmatchedProperties()
+ .WithNamingConvention(new PascalCaseNamingConvention())
+ .Build();
+
+ WriteObject(deserializer.Deserialize