From 6d64d70769bae01f92ff8154bd6fe32b675d6fd4 Mon Sep 17 00:00:00 2001 From: AnErrupTion Date: Sat, 5 Oct 2024 09:59:29 +0200 Subject: [PATCH 1/2] Improve template & fix settings bug --- .../Mosa.Templates/templates/.template.config/dotnetcli.host.json | 0 Source/Mosa.Templates/templates/.template.config/ide.host.json | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 Source/Mosa.Templates/templates/.template.config/dotnetcli.host.json create mode 100644 Source/Mosa.Templates/templates/.template.config/ide.host.json diff --git a/Source/Mosa.Templates/templates/.template.config/dotnetcli.host.json b/Source/Mosa.Templates/templates/.template.config/dotnetcli.host.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Source/Mosa.Templates/templates/.template.config/ide.host.json b/Source/Mosa.Templates/templates/.template.config/ide.host.json new file mode 100644 index 0000000000..e69de29bb2 From 561a8d84aece33f9448714360768009a27faf23b Mon Sep 17 00:00:00 2001 From: AnErrupTion Date: Sat, 5 Oct 2024 10:00:13 +0200 Subject: [PATCH 2/2] Add files --- .../templates/.template.config/dotnetcli.host.json | 11 +++++++++++ .../templates/.template.config/ide.host.json | 12 ++++++++++++ .../templates/.template.config/template.json | 10 ++++++++++ .../templates/Mosa.Starter/Mosa.Starter.csproj | 4 ++++ .../Mosa.Tool.Bootstrap/Mosa.Tool.Bootstrap.csproj | 6 +++--- .../Mosa.Tool.Explorer.Avalonia.csproj | 7 +++---- Source/Mosa.Tool.Launcher/Mosa.Tool.Launcher.csproj | 6 +++--- Source/Mosa.Utility.Configuration/MOSASettings.cs | 6 +++--- 8 files changed, 49 insertions(+), 13 deletions(-) diff --git a/Source/Mosa.Templates/templates/.template.config/dotnetcli.host.json b/Source/Mosa.Templates/templates/.template.config/dotnetcli.host.json index e69de29bb2..a5960cb7bc 100644 --- a/Source/Mosa.Templates/templates/.template.config/dotnetcli.host.json +++ b/Source/Mosa.Templates/templates/.template.config/dotnetcli.host.json @@ -0,0 +1,11 @@ +{ + "$schema": "http://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "BundleQemuWindows": { + "longName": "bundle-qemu-windows" + } + }, + "usageExamples": [ + "" + ] +} diff --git a/Source/Mosa.Templates/templates/.template.config/ide.host.json b/Source/Mosa.Templates/templates/.template.config/ide.host.json index e69de29bb2..f8195cff2a 100644 --- a/Source/Mosa.Templates/templates/.template.config/ide.host.json +++ b/Source/Mosa.Templates/templates/.template.config/ide.host.json @@ -0,0 +1,12 @@ +{ + "$schema": "http://json.schemastore.org/ide.host", + "symbolInfo": [ + { + "id": "BundleQemuWindows", + "name": { + "text": "Bundle QEMU for Windows" + }, + "isVisible": true + } + ] +} diff --git a/Source/Mosa.Templates/templates/.template.config/template.json b/Source/Mosa.Templates/templates/.template.config/template.json index ead58de975..35a38e0cb2 100644 --- a/Source/Mosa.Templates/templates/.template.config/template.json +++ b/Source/Mosa.Templates/templates/.template.config/template.json @@ -4,11 +4,21 @@ "classifications": [ "Common", "OS", "Kernel" ], "identity": "Mosa.Starter", "sourceName": "Mosa.Starter", + "defaultName": "MosaKernel", "name": "MOSA Kernel", "shortName": "mosakrnl", "preferNameDirectory": true, "tags": { "language": "C#", "type": "solution" + }, + "symbols": { + "BundleQemuWindows": { + "type": "parameter", + "description": "Defines if QEMU for Windows should be bundled by default in the project.", + "datatype": "bool", + "displayName": "Bundle QEMU for Windows", + "defaultValue": "true" + } } } diff --git a/Source/Mosa.Templates/templates/Mosa.Starter/Mosa.Starter.csproj b/Source/Mosa.Templates/templates/Mosa.Starter/Mosa.Starter.csproj index 77d78b26c2..6bbc0b917b 100644 --- a/Source/Mosa.Templates/templates/Mosa.Starter/Mosa.Starter.csproj +++ b/Source/Mosa.Templates/templates/Mosa.Starter/Mosa.Starter.csproj @@ -16,7 +16,11 @@ + + + + diff --git a/Source/Mosa.Tool.Bootstrap/Mosa.Tool.Bootstrap.csproj b/Source/Mosa.Tool.Bootstrap/Mosa.Tool.Bootstrap.csproj index 36f56ff657..05655f6606 100644 --- a/Source/Mosa.Tool.Bootstrap/Mosa.Tool.Bootstrap.csproj +++ b/Source/Mosa.Tool.Bootstrap/Mosa.Tool.Bootstrap.csproj @@ -8,9 +8,9 @@ - - - + + + diff --git a/Source/Mosa.Tool.Explorer.Avalonia/Mosa.Tool.Explorer.Avalonia.csproj b/Source/Mosa.Tool.Explorer.Avalonia/Mosa.Tool.Explorer.Avalonia.csproj index 0cf19b81e2..485dcca87d 100755 --- a/Source/Mosa.Tool.Explorer.Avalonia/Mosa.Tool.Explorer.Avalonia.csproj +++ b/Source/Mosa.Tool.Explorer.Avalonia/Mosa.Tool.Explorer.Avalonia.csproj @@ -19,10 +19,9 @@ - - - - + + + diff --git a/Source/Mosa.Tool.Launcher/Mosa.Tool.Launcher.csproj b/Source/Mosa.Tool.Launcher/Mosa.Tool.Launcher.csproj index 63994d2faf..03b47e9fa5 100644 --- a/Source/Mosa.Tool.Launcher/Mosa.Tool.Launcher.csproj +++ b/Source/Mosa.Tool.Launcher/Mosa.Tool.Launcher.csproj @@ -13,9 +13,9 @@ - - - + + + diff --git a/Source/Mosa.Utility.Configuration/MOSASettings.cs b/Source/Mosa.Utility.Configuration/MOSASettings.cs index 19fb75fe4d..539ecbc78c 100644 --- a/Source/Mosa.Utility.Configuration/MOSASettings.cs +++ b/Source/Mosa.Utility.Configuration/MOSASettings.cs @@ -1039,9 +1039,9 @@ public static string GetRegistry(string name, string defaultValue) try { return (string)Registry.CurrentUser - .OpenSubKey(WindowsRegistry.Software) - .OpenSubKey(WindowsRegistry.MosaApp) - .GetValue(name, defaultValue); + .OpenSubKey(WindowsRegistry.Software)? + .OpenSubKey(WindowsRegistry.MosaApp)? + .GetValue(name, defaultValue) ?? defaultValue; } catch {