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

Improve template & fix settings bug #1240

Merged
merged 2 commits into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host",
"symbolInfo": {
"BundleQemuWindows": {
"longName": "bundle-qemu-windows"
}
},
"usageExamples": [
""
]
}
12 changes: 12 additions & 0 deletions Source/Mosa.Templates/templates/.template.config/ide.host.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "http://json.schemastore.org/ide.host",
"symbolInfo": [
{
"id": "BundleQemuWindows",
"name": {
"text": "Bundle QEMU for Windows"
},
"isVisible": true
}
]
}
10 changes: 10 additions & 0 deletions Source/Mosa.Templates/templates/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
<ItemGroup>
<PackageReference Include="Mosa.Platform" Version="*" />
<PackageReference Include="Mosa.DeviceSystem" Version="*" />
<!--#if (BundleQemuWindows) -->
<PackageReference Include="Mosa.Tools.Package.Qemu" Version="*" />
<!--#else -->
<PackageReference Include="Mosa.Tools.Package" Version="*" />
<!--#endif -->
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions Source/Mosa.Tool.Bootstrap/Mosa.Tool.Bootstrap.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="11.0.10" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.10" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.10" />
<PackageReference Include="Avalonia.Desktop" Version="11.1.3" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.1.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.1.3" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia" Version="11.1.0-beta2" />
<PackageReference Include="Avalonia.Desktop" Version="11.1.0-beta2" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.1.0-beta2" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.1.0-beta2" />
<PackageReference Include="Avalonia.Desktop" Version="11.1.3" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.1.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.1.3" />
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions Source/Mosa.Tool.Launcher/Mosa.Tool.Launcher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="11.0.10" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.10" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.10" />
<PackageReference Include="Avalonia.Desktop" Version="11.1.3" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.1.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.1.3" />
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions Source/Mosa.Utility.Configuration/MOSASettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Loading