From b136172183965fc2155af909b528b6be850b6fa1 Mon Sep 17 00:00:00 2001
From: NoobNotFound
Date: Tue, 18 Jun 2024 00:49:30 +0530
Subject: [PATCH 01/61] update the updator, add mc 1.21, bump to version 0.7.9
---
.../Emerald.App.Package/Package.WinUI.wapproj | 21 +++++++++----------
.../Emerald.App.Package/Package.appxmanifest | 2 +-
.../Emerald.App/Helpers/MCVersionsCreator.cs | 1 +
.../Emerald.App/Helpers/Updater/Updater.cs | 13 ++++++++----
Emerald.App/Emerald.App/MainWindow.xaml.cs | 2 +-
.../Emerald.App/Strings/en-US/Resources.resw | 8 +++----
6 files changed, 26 insertions(+), 21 deletions(-)
diff --git a/Emerald.App/Emerald.App.Package/Package.WinUI.wapproj b/Emerald.App/Emerald.App.Package/Package.WinUI.wapproj
index acbf8918..1bd0d770 100644
--- a/Emerald.App/Emerald.App.Package/Package.WinUI.wapproj
+++ b/Emerald.App/Emerald.App.Package/Package.WinUI.wapproj
@@ -55,9 +55,8 @@
True
..\Emerald.App\Emerald.App.csproj
False
- 9CBDFA6FDB25BE48AA09759C40DFAB769CF9740A
SHA256
- True
+ False
True
x86|x64|arm64
D:\Projects\Emerald\Emerald.App\Emerald.App.Package\AppPackages\
@@ -66,31 +65,31 @@
Package.WinUI_TemporaryKey.pfx
- Auto
+ Always
- Auto
+ Always
- Auto
+ Always
- Auto
+ Always
- Auto
+ Always
- Auto
+ Always
- Auto
+ Always
- Auto
+ Always
- Auto
+ Always
diff --git a/Emerald.App/Emerald.App.Package/Package.appxmanifest b/Emerald.App/Emerald.App.Package/Package.appxmanifest
index 6fcfd00a..0297724c 100644
--- a/Emerald.App/Emerald.App.Package/Package.appxmanifest
+++ b/Emerald.App/Emerald.App.Package/Package.appxmanifest
@@ -11,7 +11,7 @@
+ Version="0.7.9.0" />
Emerald
diff --git a/Emerald.App/Emerald.App/Helpers/MCVersionsCreator.cs b/Emerald.App/Emerald.App/Helpers/MCVersionsCreator.cs
index 593bc3e4..dcb5ebae 100644
--- a/Emerald.App/Emerald.App/Helpers/MCVersionsCreator.cs
+++ b/Emerald.App/Emerald.App/Helpers/MCVersionsCreator.cs
@@ -51,6 +51,7 @@ public ObservableCollection CreateVersions()
Collection.Add(LoadCustomVers());
}
+ AddItem("1.21");
AddItem("1.20");
AddItem("1.19");
AddItem("1.18");
diff --git a/Emerald.App/Emerald.App/Helpers/Updater/Updater.cs b/Emerald.App/Emerald.App/Helpers/Updater/Updater.cs
index e62f920c..246642bb 100644
--- a/Emerald.App/Emerald.App/Helpers/Updater/Updater.cs
+++ b/Emerald.App/Emerald.App/Helpers/Updater/Updater.cs
@@ -81,14 +81,18 @@ public async void CheckForUpdates(bool OnlyInformifHigherAvailable = false)
if (!rel.Assets.Any(x => x.Name.EndsWith("msixbundle") && x.Name.ToLower().Contains(this.Architecture.ToString().ToLower())))
{
TasksHelper.CompleteTask(id, false, "NoMsixUpdate");
- goto Return;
+
+ if (!OnlyInformifHigherAvailable)
+ MessageBox.Show("Error".Localize(), "NoMsixUpdate".Localize(), Enums.MessageBoxButtons.Ok);
+
+ goto Return;
}
var asset = rel.Assets.First(x => x.Name.EndsWith("msixbundle") && x.Name.ToLower().Contains(this.Architecture.ToString().ToLower()));
if (ver > currentver)
{
TasksHelper.CompleteTask(id, true, "UpdateAvailable");
- var msg = await MessageBox.Show("UpdateAvailable".Localize(), "##ReleaseNotes".Localize() + "\n\n " + rel.Body,Enums.MessageBoxButtons.CustomWithCancel, "UpdateNow".Localize());
+ var msg = await MessageBox.Show("UpdateAvailable".Localize(), "## Version: " + ver.ToString() + "\n\n###ReleaseNotes".Localize() + "\n\n " + rel.Body,Enums.MessageBoxButtons.CustomWithCancel, "UpdateNow".Localize());
if(msg == Enums.MessageBoxResults.Cancel)
goto Return;
@@ -100,8 +104,7 @@ public async void CheckForUpdates(bool OnlyInformifHigherAvailable = false)
if(OnlyInformifHigherAvailable)
goto Return;
- var msg = await MessageBox.Show("DowngradeAvailable".Localize(), "DowngradeDescription".Localize(),Enums.MessageBoxButtons.CustomWithCancel,"Downgrade".Localize());
- if (msg == Enums.MessageBoxResults.Cancel)
+ var msg = await MessageBox.Show("DowngradeAvailable".Localize(), "DowngradeDescription".Localize(),Enums.MessageBoxButtons.Ok);
goto Return;
@@ -117,6 +120,8 @@ public async void CheckForUpdates(bool OnlyInformifHigherAvailable = false)
goto Return;
}
var a = rel.Assets.First(x => x.Name.EndsWith("msixbundle") && x.Name.ToLower().Contains(this.Architecture.ToString().ToLower()));
+ if(a == null)
+ goto Return ;
DownloadQAndInstallUpdate(a.BrowserDownloadUrl,a.Name);
Return:
diff --git a/Emerald.App/Emerald.App/MainWindow.xaml.cs b/Emerald.App/Emerald.App/MainWindow.xaml.cs
index 7d2efe89..7147aef9 100644
--- a/Emerald.App/Emerald.App/MainWindow.xaml.cs
+++ b/Emerald.App/Emerald.App/MainWindow.xaml.cs
@@ -210,7 +210,7 @@ void TintColor()
};
if (SS.Settings.App.Updates.CheckAtStartup)
- App.Current.Updater.CheckForUpdates();
+ App.Current.Updater.CheckForUpdates(true);
(Content as FrameworkElement).Loaded -= Initialize;
}
private static void UpdateUI()
diff --git a/Emerald.App/Emerald.App/Strings/en-US/Resources.resw b/Emerald.App/Emerald.App/Strings/en-US/Resources.resw
index 2c910bf2..54116319 100644
--- a/Emerald.App/Emerald.App/Strings/en-US/Resources.resw
+++ b/Emerald.App/Emerald.App/Strings/en-US/Resources.resw
@@ -271,7 +271,7 @@
Load Mod
- Failed to load the app settings accounts. The version of the setting system is different. You may have recently updated the app. Contact a developer of this app to recover the settings
+ Failed to load the app settings and accounts. The version of the setting system is different. You may have recently updated the app. Contact a developer of this app to recover the settings
Login
@@ -710,7 +710,7 @@
Downgrade Available
- The current version is higher than the latest version in the servers. You must be using a private beta. Do you want to downgrade?
+ The current version is higher than the latest version in the servers. You must be using a private beta. Please wait until a higher stable version be available
Download Update
@@ -719,7 +719,7 @@
Install Update
- Failed to find the installer package in the release
+ Failed to find the installer package in the release for this architecture
You are on the latest version
@@ -752,6 +752,6 @@
Updates
- Automatically update, include prerelease etc..
+ Auto update, include prerelease etc..
\ No newline at end of file
From 459b624a50e9eba66e41ba1b93db601d6a28c1d0 Mon Sep 17 00:00:00 2001
From: NoobNotFound
Date: Mon, 8 Jul 2024 18:45:30 +0530
Subject: [PATCH 02/61] change package certificate
---
Emerald.App/Emerald.App.Package/Package.WinUI.wapproj | 1 +
Emerald.App/Emerald.App/Emerald.App.csproj | 1 +
2 files changed, 2 insertions(+)
diff --git a/Emerald.App/Emerald.App.Package/Package.WinUI.wapproj b/Emerald.App/Emerald.App.Package/Package.WinUI.wapproj
index 1bd0d770..c76b14af 100644
--- a/Emerald.App/Emerald.App.Package/Package.WinUI.wapproj
+++ b/Emerald.App/Emerald.App.Package/Package.WinUI.wapproj
@@ -63,6 +63,7 @@
0
False
Package.WinUI_TemporaryKey.pfx
+ C36FEB2A573AF2E3DD0737A454F36CB17B8C121C
Always
diff --git a/Emerald.App/Emerald.App/Emerald.App.csproj b/Emerald.App/Emerald.App/Emerald.App.csproj
index c7a83d17..b80e8e74 100644
--- a/Emerald.App/Emerald.App/Emerald.App.csproj
+++ b/Emerald.App/Emerald.App/Emerald.App.csproj
@@ -17,6 +17,7 @@
+
From 5af849ebe7b62052468a3667fe0ab76f82a7b578 Mon Sep 17 00:00:00 2001
From: NoobNotFound
Date: Mon, 8 Jul 2024 18:50:31 +0530
Subject: [PATCH 03/61] create new core lib for multi platform
---
Emerald.CoreX/Class1.cs | 7 +++++++
Emerald.CoreX/Emerald.CoreX.csproj | 9 +++++++++
Emerald.sln | 22 ++++++++++++++++++++++
3 files changed, 38 insertions(+)
create mode 100644 Emerald.CoreX/Class1.cs
create mode 100644 Emerald.CoreX/Emerald.CoreX.csproj
diff --git a/Emerald.CoreX/Class1.cs b/Emerald.CoreX/Class1.cs
new file mode 100644
index 00000000..8efea347
--- /dev/null
+++ b/Emerald.CoreX/Class1.cs
@@ -0,0 +1,7 @@
+namespace Emerald.CoreX
+{
+ public class Class1
+ {
+
+ }
+}
diff --git a/Emerald.CoreX/Emerald.CoreX.csproj b/Emerald.CoreX/Emerald.CoreX.csproj
new file mode 100644
index 00000000..fa71b7ae
--- /dev/null
+++ b/Emerald.CoreX/Emerald.CoreX.csproj
@@ -0,0 +1,9 @@
+
+
+
+ net8.0
+ enable
+ enable
+
+
+
diff --git a/Emerald.sln b/Emerald.sln
index 053ff471..d6e0b24a 100644
--- a/Emerald.sln
+++ b/Emerald.sln
@@ -19,6 +19,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{2BB1
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CmlLib", "CMLLib\CmlLib\CmlLib.csproj", "{7FAC2A8B-C2EF-47FA-9598-FB2B414A7156}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Emerald.CoreX", "Emerald.CoreX\Emerald.CoreX.csproj", "{13795E09-8131-4716-9EBC-970952E9F360}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -123,6 +125,26 @@ Global
{7FAC2A8B-C2EF-47FA-9598-FB2B414A7156}.Release|x64.Build.0 = Release|Any CPU
{7FAC2A8B-C2EF-47FA-9598-FB2B414A7156}.Release|x86.ActiveCfg = Release|Any CPU
{7FAC2A8B-C2EF-47FA-9598-FB2B414A7156}.Release|x86.Build.0 = Release|Any CPU
+ {13795E09-8131-4716-9EBC-970952E9F360}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {13795E09-8131-4716-9EBC-970952E9F360}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {13795E09-8131-4716-9EBC-970952E9F360}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {13795E09-8131-4716-9EBC-970952E9F360}.Debug|ARM.Build.0 = Debug|Any CPU
+ {13795E09-8131-4716-9EBC-970952E9F360}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {13795E09-8131-4716-9EBC-970952E9F360}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {13795E09-8131-4716-9EBC-970952E9F360}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {13795E09-8131-4716-9EBC-970952E9F360}.Debug|x64.Build.0 = Debug|Any CPU
+ {13795E09-8131-4716-9EBC-970952E9F360}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {13795E09-8131-4716-9EBC-970952E9F360}.Debug|x86.Build.0 = Debug|Any CPU
+ {13795E09-8131-4716-9EBC-970952E9F360}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {13795E09-8131-4716-9EBC-970952E9F360}.Release|Any CPU.Build.0 = Release|Any CPU
+ {13795E09-8131-4716-9EBC-970952E9F360}.Release|ARM.ActiveCfg = Release|Any CPU
+ {13795E09-8131-4716-9EBC-970952E9F360}.Release|ARM.Build.0 = Release|Any CPU
+ {13795E09-8131-4716-9EBC-970952E9F360}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {13795E09-8131-4716-9EBC-970952E9F360}.Release|ARM64.Build.0 = Release|Any CPU
+ {13795E09-8131-4716-9EBC-970952E9F360}.Release|x64.ActiveCfg = Release|Any CPU
+ {13795E09-8131-4716-9EBC-970952E9F360}.Release|x64.Build.0 = Release|Any CPU
+ {13795E09-8131-4716-9EBC-970952E9F360}.Release|x86.ActiveCfg = Release|Any CPU
+ {13795E09-8131-4716-9EBC-970952E9F360}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
From c749d5a481b29d863c8437c22cd06dc6bd9d0fc4 Mon Sep 17 00:00:00 2001
From: NoobNotFound
Date: Mon, 8 Jul 2024 20:44:30 +0530
Subject: [PATCH 04/61] add some files to CoreX
---
Emerald.CoreX/Class1.cs | 7 -----
Emerald.CoreX/Core.cs | 13 ++++++++
Emerald.CoreX/Emerald.CoreX.csproj | 6 ++++
Emerald.CoreX/Enums/MCVersionType.cs | 18 +++++++++++
Emerald.CoreX/Installers/Fabric.cs | 12 ++++++++
Emerald.CoreX/Installers/Forge.cs | 12 ++++++++
.../Installers/IModLoaderInstaller.cs | 13 ++++++++
Emerald.CoreX/Installers/LiteLoader.cs | 12 ++++++++
Emerald.CoreX/Installers/Optifine.cs | 12 ++++++++
Emerald.CoreX/Models/MCVersion.cs | 30 +++++++++++++++++++
Emerald.CoreX/Modrinth.cs | 12 ++++++++
11 files changed, 140 insertions(+), 7 deletions(-)
delete mode 100644 Emerald.CoreX/Class1.cs
create mode 100644 Emerald.CoreX/Core.cs
create mode 100644 Emerald.CoreX/Enums/MCVersionType.cs
create mode 100644 Emerald.CoreX/Installers/Fabric.cs
create mode 100644 Emerald.CoreX/Installers/Forge.cs
create mode 100644 Emerald.CoreX/Installers/IModLoaderInstaller.cs
create mode 100644 Emerald.CoreX/Installers/LiteLoader.cs
create mode 100644 Emerald.CoreX/Installers/Optifine.cs
create mode 100644 Emerald.CoreX/Models/MCVersion.cs
create mode 100644 Emerald.CoreX/Modrinth.cs
diff --git a/Emerald.CoreX/Class1.cs b/Emerald.CoreX/Class1.cs
deleted file mode 100644
index 8efea347..00000000
--- a/Emerald.CoreX/Class1.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace Emerald.CoreX
-{
- public class Class1
- {
-
- }
-}
diff --git a/Emerald.CoreX/Core.cs b/Emerald.CoreX/Core.cs
new file mode 100644
index 00000000..4f8ef55d
--- /dev/null
+++ b/Emerald.CoreX/Core.cs
@@ -0,0 +1,13 @@
+using Microsoft.Extensions.Logging;
+using CmlLib.Core;
+using CmlLib.Core.VersionMetadata;
+namespace Emerald.CoreX;
+
+public class Core(ILogger logger)
+{
+ public MinecraftLauncher Launcher { get; set; }
+ public void InitializeLauncher()
+ {
+ Launcher = new MinecraftLauncher();
+ }
+}
\ No newline at end of file
diff --git a/Emerald.CoreX/Emerald.CoreX.csproj b/Emerald.CoreX/Emerald.CoreX.csproj
index fa71b7ae..ed9e2beb 100644
--- a/Emerald.CoreX/Emerald.CoreX.csproj
+++ b/Emerald.CoreX/Emerald.CoreX.csproj
@@ -6,4 +6,10 @@
enable
+
+
+
+
+
+
diff --git a/Emerald.CoreX/Enums/MCVersionType.cs b/Emerald.CoreX/Enums/MCVersionType.cs
new file mode 100644
index 00000000..6d90c3d0
--- /dev/null
+++ b/Emerald.CoreX/Enums/MCVersionType.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Emerald.CoreX.Enums
+{
+ public enum MCVersionType
+ {
+ Vanilla,
+ Fabric,
+ Lite,
+ Forge,
+ Optifine,
+ Undefined
+ }
+}
diff --git a/Emerald.CoreX/Installers/Fabric.cs b/Emerald.CoreX/Installers/Fabric.cs
new file mode 100644
index 00000000..53c693ed
--- /dev/null
+++ b/Emerald.CoreX/Installers/Fabric.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Emerald.CoreX.Installers
+{
+ internal class Fabric : IModLoaderInstaller
+ {
+ }
+}
diff --git a/Emerald.CoreX/Installers/Forge.cs b/Emerald.CoreX/Installers/Forge.cs
new file mode 100644
index 00000000..a51d3718
--- /dev/null
+++ b/Emerald.CoreX/Installers/Forge.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Emerald.CoreX.Installers
+{
+ internal class Forge : IModLoaderInstaller
+ {
+ }
+}
diff --git a/Emerald.CoreX/Installers/IModLoaderInstaller.cs b/Emerald.CoreX/Installers/IModLoaderInstaller.cs
new file mode 100644
index 00000000..a24f9e5b
--- /dev/null
+++ b/Emerald.CoreX/Installers/IModLoaderInstaller.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Emerald.CoreX.Installers
+{
+ internal interface IModLoaderInstaller
+ {
+
+ }
+}
diff --git a/Emerald.CoreX/Installers/LiteLoader.cs b/Emerald.CoreX/Installers/LiteLoader.cs
new file mode 100644
index 00000000..8798c807
--- /dev/null
+++ b/Emerald.CoreX/Installers/LiteLoader.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Emerald.CoreX.Installers
+{
+ internal class LiteLoader: IModLoaderInstaller
+ {
+ }
+}
diff --git a/Emerald.CoreX/Installers/Optifine.cs b/Emerald.CoreX/Installers/Optifine.cs
new file mode 100644
index 00000000..dec37deb
--- /dev/null
+++ b/Emerald.CoreX/Installers/Optifine.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Emerald.CoreX.Installers
+{
+ internal class Optifine : IModLoaderInstaller
+ {
+ }
+}
diff --git a/Emerald.CoreX/Models/MCVersion.cs b/Emerald.CoreX/Models/MCVersion.cs
new file mode 100644
index 00000000..82fd834e
--- /dev/null
+++ b/Emerald.CoreX/Models/MCVersion.cs
@@ -0,0 +1,30 @@
+using CmlLib.Core.Version;
+using CmlLib.Core.VersionMetadata;
+using CommunityToolkit.Mvvm.ComponentModel;
+using Emerald.CoreX.Enums;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Emerald.CoreX.Models
+{
+ public partial class MCVersion
+ {
+ public MCVersionType Type { get; private set; }
+ public MVersionType ReleaseType { get; private set; }
+
+ public string Name { get; private set; }
+
+ public string DisplayName { get; set; }
+
+ public IVersionMetadata Metadata { get; private set; }
+
+ public bool Local { get; private set; }
+
+ public MCVersion[] Subversions { get; private set; }
+
+ }
+}
diff --git a/Emerald.CoreX/Modrinth.cs b/Emerald.CoreX/Modrinth.cs
new file mode 100644
index 00000000..ecafabd6
--- /dev/null
+++ b/Emerald.CoreX/Modrinth.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Emerald.CoreX
+{
+ internal class Modrinth
+ {
+ }
+}
From f33b9e482a65975bac46967fbe8da48dc1413133 Mon Sep 17 00:00:00 2001
From: NoobNotFound
Date: Mon, 8 Jul 2024 20:57:56 +0530
Subject: [PATCH 05/61] Moved to .Net 8
---
Emerald.App/Emerald.App/Emerald.App.csproj | 5 +++--
Emerald.Core/Emerald.Core.csproj | 25 +++++++++-------------
Emerald.Core/Launcher.cs | 1 -
3 files changed, 13 insertions(+), 18 deletions(-)
diff --git a/Emerald.App/Emerald.App/Emerald.App.csproj b/Emerald.App/Emerald.App/Emerald.App.csproj
index b80e8e74..898eef95 100644
--- a/Emerald.App/Emerald.App/Emerald.App.csproj
+++ b/Emerald.App/Emerald.App/Emerald.App.csproj
@@ -2,12 +2,13 @@
WinExe
- net7.0-windows10.0.22000.0
+ net8.0-windows10.0.22000.0
10.0.17763.0
Emerald.WinUI
app.manifest
x86;x64;arm64
- win10-x86;win10-x64;win10-arm64
+ win-x86;win-x64;win-arm64
+ win10-x86;win10-x64;win10-arm64
true
Debug;Release
enable
diff --git a/Emerald.Core/Emerald.Core.csproj b/Emerald.Core/Emerald.Core.csproj
index 8bb6d6e5..83657dd3 100644
--- a/Emerald.Core/Emerald.Core.csproj
+++ b/Emerald.Core/Emerald.Core.csproj
@@ -1,20 +1,15 @@
-
- net7.0-windows10.0.22000.0
- enable
- enable
- Emerald.Core
- Debug;Release
- 10.0.17763.0
- win10-x86;win10-x64
-
+
+ net8.0
+ enable
+ enable
+
-
-
-
-
-
-
+
+
+
+
+
diff --git a/Emerald.Core/Launcher.cs b/Emerald.Core/Launcher.cs
index 33b44c6b..17ffd0d2 100644
--- a/Emerald.Core/Launcher.cs
+++ b/Emerald.Core/Launcher.cs
@@ -12,7 +12,6 @@
using Emerald.Core.Tasks;
using ProjBobcat.Class.Model.Optifine;
using System.ComponentModel;
-using Windows.System;
using ProgressChangedEventArgs = Emerald.Core.Args.ProgressChangedEventArgs;
namespace Emerald.Core
From 85bb0d3d572023c1180746a435df6d6c8d7658b4 Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Fri, 12 Jul 2024 21:32:24 +0100
Subject: [PATCH 06/61] Remove win10 runtime condition
Signed-off-by: Lamparter
---
Emerald.App/Emerald.App/Emerald.App.csproj | 1 -
1 file changed, 1 deletion(-)
diff --git a/Emerald.App/Emerald.App/Emerald.App.csproj b/Emerald.App/Emerald.App/Emerald.App.csproj
index 898eef95..2fe002e1 100644
--- a/Emerald.App/Emerald.App/Emerald.App.csproj
+++ b/Emerald.App/Emerald.App/Emerald.App.csproj
@@ -8,7 +8,6 @@
app.manifest
x86;x64;arm64
win-x86;win-x64;win-arm64
- win10-x86;win10-x64;win10-arm64
true
Debug;Release
enable
From 7867dab0264e7b50878ef5bcd744c7a7fbf03897 Mon Sep 17 00:00:00 2001
From: codefactor-io
Date: Fri, 12 Jul 2024 20:34:06 +0000
Subject: [PATCH 07/61] [CodeFactor] Apply fixes
---
Emerald.CoreX/Installers/IModLoaderInstaller.cs | 3 +--
Emerald.CoreX/Models/MCVersion.cs | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/Emerald.CoreX/Installers/IModLoaderInstaller.cs b/Emerald.CoreX/Installers/IModLoaderInstaller.cs
index a24f9e5b..a91b12c6 100644
--- a/Emerald.CoreX/Installers/IModLoaderInstaller.cs
+++ b/Emerald.CoreX/Installers/IModLoaderInstaller.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -8,6 +8,5 @@ namespace Emerald.CoreX.Installers
{
internal interface IModLoaderInstaller
{
-
}
}
diff --git a/Emerald.CoreX/Models/MCVersion.cs b/Emerald.CoreX/Models/MCVersion.cs
index 82fd834e..84248297 100644
--- a/Emerald.CoreX/Models/MCVersion.cs
+++ b/Emerald.CoreX/Models/MCVersion.cs
@@ -1,4 +1,4 @@
-using CmlLib.Core.Version;
+using CmlLib.Core.Version;
using CmlLib.Core.VersionMetadata;
using CommunityToolkit.Mvvm.ComponentModel;
using Emerald.CoreX.Enums;
@@ -25,6 +25,5 @@ public partial class MCVersion
public bool Local { get; private set; }
public MCVersion[] Subversions { get; private set; }
-
}
}
From caa5fe473ecb1326aa0d48f51620a0ef1823245d Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Sat, 13 Jul 2024 08:26:08 +0100
Subject: [PATCH 08/61] Update README.md
Signed-off-by: Lamparter
---
README.md | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index c9faa88e..f1efaecd 100644
--- a/README.md
+++ b/README.md
@@ -57,7 +57,8 @@ There are multiple ways to participate in the community:
├──Emerald.App // Emerald app code and packager
| ├──Emerald.App // Emerald app code (such as code related to UI but not Minecraft)
| └──Emerald.App.Package // Package code for generating an uploadable MSIX bundle.
-└──Emerald.Core // Emerald core code (such as code related to launching and modifying Minecraft
+├──Emerald.Core // Emerald core code (such as code related to launching and modifying Minecraft
+└──Emerald.CoreX // Emerald core code for the ability to run different Minecraft installation profiles and mods.
```
### 🗃️ Contributors
@@ -101,4 +102,4 @@ git clone https://github.com/RiversideValley/Emerald
Copyright (c) 2022-2023 Riverside Valley Corporation
-Licensed under the Nightshade Vexillum license as stated in the [LICENSE](LICENSE.md).
\ No newline at end of file
+Licensed under the Nightshade Vexillum license as stated in the [LICENSE](LICENSE.md).
From 0d3456fcac69044ed7fafe40be90f4c0a7eb33bf Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Sat, 13 Jul 2024 08:33:21 +0100
Subject: [PATCH 09/61] Update license year
Signed-off-by: Lamparter
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index c9faa88e..2095061e 100644
--- a/README.md
+++ b/README.md
@@ -99,6 +99,6 @@ git clone https://github.com/RiversideValley/Emerald
## ⚖️ License
-Copyright (c) 2022-2023 Riverside Valley Corporation
+Copyright (c) 2022-2024 Riverside Valley Corporation
-Licensed under the Nightshade Vexillum license as stated in the [LICENSE](LICENSE.md).
\ No newline at end of file
+Licensed under the Nightshade Vexillum license as stated in the [LICENSE](LICENSE.md).
From 7aa85c929712ce941f8ae6f49d4df83188ea549e Mon Sep 17 00:00:00 2001
From: 0x5BFA <62196528+0x5bfa@users.noreply.github.com>
Date: Sat, 13 Jul 2024 16:49:38 +0900
Subject: [PATCH 10/61] Update Emerald.App.csproj
Signed-off-by: 0x5BFA <62196528+0x5bfa@users.noreply.github.com>
---
Emerald.App/Emerald.App/Emerald.App.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Emerald.App/Emerald.App/Emerald.App.csproj b/Emerald.App/Emerald.App/Emerald.App.csproj
index 2fe002e1..c7306220 100644
--- a/Emerald.App/Emerald.App/Emerald.App.csproj
+++ b/Emerald.App/Emerald.App/Emerald.App.csproj
@@ -7,7 +7,7 @@
Emerald.WinUI
app.manifest
x86;x64;arm64
- win-x86;win-x64;win-arm64
+ win-x86;win-x64;win-arm64
true
Debug;Release
enable
From af8aec32d83178918db072d94c8906324ac27d02 Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Sun, 14 Jul 2024 18:38:01 +0100
Subject: [PATCH 11/61] =?UTF-8?q?=F0=9F=93=9D=20Update=20README.md?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Lamparter
---
README.md | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 2095061e..48ada146 100644
--- a/README.md
+++ b/README.md
@@ -6,9 +6,12 @@
-
+
+
+
+
From b672c258d696112c55298039ede71ac9f074522f Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Sun, 14 Jul 2024 18:40:17 +0100
Subject: [PATCH 12/61] =?UTF-8?q?=F0=9F=93=9D=20Update=20README.md?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Lamparter
---
README.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/README.md b/README.md
index 48ada146..33d42427 100644
--- a/README.md
+++ b/README.md
@@ -12,6 +12,9 @@
+
+
+
From f62d9d43b5dae395a71820ee66daeb0394cfdb4b Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Sun, 14 Jul 2024 18:44:26 +0100
Subject: [PATCH 13/61] =?UTF-8?q?=F0=9F=93=9D=20Fix=20screenshot=20in=20RE?=
=?UTF-8?q?ADME?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Finally!
Signed-off-by: Lamparter
---
README.md | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 33d42427..a36c1442 100644
--- a/README.md
+++ b/README.md
@@ -43,9 +43,7 @@ See [this section](#-building-the-code)
### 📸 Screenshots
-
-
-
+[![Emerald screenshot](https://user-images.githubusercontent.com/71598437/212673147-54e79843-76aa-44ff-9db3-60b025334f07.png)](https://github.com/RiversideValley/Emerald)
## 🦜 Contributing & Feedback
From 1964838676c33dbfc1103dace75df03516b7c84c Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Sun, 14 Jul 2024 18:48:57 +0100
Subject: [PATCH 14/61] =?UTF-8?q?=F0=9F=93=84=20Revise=20license?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Lamparter
---
LICENSE.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/LICENSE.md b/LICENSE.md
index 16dd4827..f28a54a9 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,8 +1,8 @@
**Nightshade Vexillum License**
```
-Emoji are used within this document to outwardly express conventions of easy-to-read documents, and/or help other cultures read the text at their convenience, if some words may be unclear to them.
-The Emoji contained within these documents are may not wholly represent the associated meaning, and the First Party does not warrant the misunderstanding of such.
+Emoji are used within this document to outwardly express conventions of easy-to-read documents, and/or help others understand the text at their convenience, if some words may be unclear to them.
+The Emoji contained within these documents may not wholly convey the associated meaning, and the First Party does not warrant the misunderstanding of such.
```
## 📖 Definitions
From c609f7d69d22df4ff4a95e0cc838a7161a72589b Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Sun, 14 Jul 2024 18:53:05 +0100
Subject: [PATCH 15/61] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20Remove=20spelling=20?=
=?UTF-8?q?mistakes=20in=20files=20that=20reference=20'Extensions.cs'=20(#?=
=?UTF-8?q?38)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Emerald.App/Emerald.App/DirectResources.cs | 2 +-
.../Emerald.App/Helpers/{Extentions.cs => Extensions.cs} | 2 +-
Emerald.App/Emerald.App/Views/Store/InstallerPage.xaml | 2 +-
Emerald.Core/{Extentions.cs => Extensions.cs} | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
rename Emerald.App/Emerald.App/Helpers/{Extentions.cs => Extensions.cs} (99%)
rename Emerald.Core/{Extentions.cs => Extensions.cs} (86%)
diff --git a/Emerald.App/Emerald.App/DirectResources.cs b/Emerald.App/Emerald.App/DirectResources.cs
index 6c4bb36d..aad5c3dd 100644
--- a/Emerald.App/Emerald.App/DirectResources.cs
+++ b/Emerald.App/Emerald.App/DirectResources.cs
@@ -8,7 +8,7 @@ namespace Emerald.WinUI;
public static class DirectResoucres
{
public static int MaxRAM
- => Extentions.GetMemoryGB() * 1024;
+ => Extensions.GetMemoryGB() * 1024;
public static int MinRAM
=> 512;
diff --git a/Emerald.App/Emerald.App/Helpers/Extentions.cs b/Emerald.App/Emerald.App/Helpers/Extensions.cs
similarity index 99%
rename from Emerald.App/Emerald.App/Helpers/Extentions.cs
rename to Emerald.App/Emerald.App/Helpers/Extensions.cs
index 42278a2d..2d61c177 100644
--- a/Emerald.App/Emerald.App/Helpers/Extentions.cs
+++ b/Emerald.App/Emerald.App/Helpers/Extensions.cs
@@ -12,7 +12,7 @@
namespace Emerald.WinUI.Helpers
{
- public static class Extentions
+ public static class Extensions
{
private static readonly ConcurrentDictionary cachedResources = new();
diff --git a/Emerald.App/Emerald.App/Views/Store/InstallerPage.xaml b/Emerald.App/Emerald.App/Views/Store/InstallerPage.xaml
index 587318ed..062991dc 100644
--- a/Emerald.App/Emerald.App/Views/Store/InstallerPage.xaml
+++ b/Emerald.App/Emerald.App/Views/Store/InstallerPage.xaml
@@ -34,7 +34,7 @@
|
- Downloads
+ Downloads
diff --git a/Emerald.Core/Extentions.cs b/Emerald.Core/Extensions.cs
similarity index 86%
rename from Emerald.Core/Extentions.cs
rename to Emerald.Core/Extensions.cs
index ebcfec9a..429795d7 100644
--- a/Emerald.Core/Extentions.cs
+++ b/Emerald.Core/Extensions.cs
@@ -1,6 +1,6 @@
namespace Emerald.Core
{
- public static class Extentions
+ public static class Extensions
{
public static string ToFullVersion(this ProjBobcat.Class.Model.Optifine.OptifineDownloadVersionModel x)
=> $"{x.McVersion}-Optifine_{x.Type}_{x.Patch}";
From 7c239b8685f06baff15f47dd835e37d0f12d39d6 Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Sun, 14 Jul 2024 19:09:13 +0100
Subject: [PATCH 16/61] =?UTF-8?q?=F0=9F=93=9D=20Update=20README.md?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Lamparter
---
README.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index a36c1442..e3e19bd1 100644
--- a/README.md
+++ b/README.md
@@ -6,13 +6,13 @@
-
+
-
+
-
+
From 0e0241504e7cf3baa4fe3d62618ea0ea1dbb4f1e Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Sun, 14 Jul 2024 21:16:27 +0100
Subject: [PATCH 17/61] =?UTF-8?q?=F0=9F=94=90=20Update=20CODEOWNERS?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Lamparter
---
CODEOWNERS | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/CODEOWNERS b/CODEOWNERS
index cd5f9dec..e1fcfd32 100644
--- a/CODEOWNERS
+++ b/CODEOWNERS
@@ -7,10 +7,9 @@
* @RiversideValley/Emerald @NoobNotFound
/Emerald.*/ @RiversideValley/Emerald
Emerald.* @RiversideValley/Emerald
-.editorconfig @RiversideValley/Emerald
-*.md @Lamparter git@theriversi.de lamparter@theriversi.de
-/.github/ @RiversideValley/Emerald
-.gitattributes @RiversideValley/Emerald
+*.md @Lamparter
+/.github/ @Lamparter
+.gitattributes @Lamparter
.gitignore @RiversideValley/Emerald
-.gitmodules @RiversideValley/Emerald
-LICENSE.md @Lamparter git@theriversi.de lamparter@theriversi.de
+.gitmodules @NoobNotFound
+LICENSE.md @Lamparter
From d05fb35ad3678b38060373d7dc3dcf57c8e01f83 Mon Sep 17 00:00:00 2001
From: NoobNotFound
Date: Wed, 17 Jul 2024 20:48:20 +0530
Subject: [PATCH 18/61] Add fluent themed blank Uno app (maccatalyst, desktop)
---
Emerald.Core/Emerald.Core.csproj | 2 +-
Emerald.CoreX/Emerald.CoreX.csproj | 2 +-
Emerald.Uno/.editorconfig | 167 ++++++++
Emerald.Uno/.gitignore | 403 ++++++++++++++++++
Emerald.Uno/.vscode/extensions.json | 5 +
Emerald.Uno/.vscode/launch.json | 35 ++
Emerald.Uno/.vscode/settings.json | 10 +
Emerald.Uno/.vscode/tasks.json | 31 ++
Emerald.Uno/.vsconfig | 18 +
Emerald.Uno/Directory.Build.props | 23 +
Emerald.Uno/Directory.Build.targets | 2 +
Emerald.Uno/Directory.Packages.props | 9 +
Emerald.Uno/Emerald.Uno.sln | 88 ++++
Emerald.Uno/Emerald.Uno/App.xaml | 19 +
Emerald.Uno/Emerald.Uno/App.xaml.cs | 93 ++++
Emerald.Uno/Emerald.Uno/Assets/Icons/icon.svg | 42 ++
.../Assets/Icons/icon_foreground.svg | 137 ++++++
.../Emerald.Uno/Assets/SharedAssets.md | 32 ++
.../Assets/Splash/splash_screen.svg | 137 ++++++
Emerald.Uno/Emerald.Uno/Emerald.Uno.csproj | 32 ++
Emerald.Uno/Emerald.Uno/GlobalUsings.cs | 5 +
Emerald.Uno/Emerald.Uno/MainPage.xaml | 14 +
Emerald.Uno/Emerald.Uno/MainPage.xaml.cs | 9 +
Emerald.Uno/Emerald.Uno/Package.appxmanifest | 43 ++
.../Emerald.Uno/Platforms/Desktop/Program.cs | 20 +
.../Platforms/MacCatalyst/Entitlements.plist | 6 +
.../Platforms/MacCatalyst/Info.plist | 26 ++
.../Platforms/MacCatalyst/Main.maccatalyst.cs | 14 +
.../LaunchImages.launchimage/Contents.json | 58 +++
.../Properties/launchSettings.json | 22 +
Emerald.Uno/Emerald.Uno/ReadMe.md | 7 +
.../Emerald.Uno/Strings/en/Resources.resw | 123 ++++++
Emerald.Uno/Emerald.Uno/app.manifest | 25 ++
Emerald.Uno/global.json | 9 +
34 files changed, 1666 insertions(+), 2 deletions(-)
create mode 100644 Emerald.Uno/.editorconfig
create mode 100644 Emerald.Uno/.gitignore
create mode 100644 Emerald.Uno/.vscode/extensions.json
create mode 100644 Emerald.Uno/.vscode/launch.json
create mode 100644 Emerald.Uno/.vscode/settings.json
create mode 100644 Emerald.Uno/.vscode/tasks.json
create mode 100644 Emerald.Uno/.vsconfig
create mode 100644 Emerald.Uno/Directory.Build.props
create mode 100644 Emerald.Uno/Directory.Build.targets
create mode 100644 Emerald.Uno/Directory.Packages.props
create mode 100644 Emerald.Uno/Emerald.Uno.sln
create mode 100644 Emerald.Uno/Emerald.Uno/App.xaml
create mode 100644 Emerald.Uno/Emerald.Uno/App.xaml.cs
create mode 100644 Emerald.Uno/Emerald.Uno/Assets/Icons/icon.svg
create mode 100644 Emerald.Uno/Emerald.Uno/Assets/Icons/icon_foreground.svg
create mode 100644 Emerald.Uno/Emerald.Uno/Assets/SharedAssets.md
create mode 100644 Emerald.Uno/Emerald.Uno/Assets/Splash/splash_screen.svg
create mode 100644 Emerald.Uno/Emerald.Uno/Emerald.Uno.csproj
create mode 100644 Emerald.Uno/Emerald.Uno/GlobalUsings.cs
create mode 100644 Emerald.Uno/Emerald.Uno/MainPage.xaml
create mode 100644 Emerald.Uno/Emerald.Uno/MainPage.xaml.cs
create mode 100644 Emerald.Uno/Emerald.Uno/Package.appxmanifest
create mode 100644 Emerald.Uno/Emerald.Uno/Platforms/Desktop/Program.cs
create mode 100644 Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Entitlements.plist
create mode 100644 Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Info.plist
create mode 100644 Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Main.maccatalyst.cs
create mode 100644 Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Media.xcassets/LaunchImages.launchimage/Contents.json
create mode 100644 Emerald.Uno/Emerald.Uno/Properties/launchSettings.json
create mode 100644 Emerald.Uno/Emerald.Uno/ReadMe.md
create mode 100644 Emerald.Uno/Emerald.Uno/Strings/en/Resources.resw
create mode 100644 Emerald.Uno/Emerald.Uno/app.manifest
create mode 100644 Emerald.Uno/global.json
diff --git a/Emerald.Core/Emerald.Core.csproj b/Emerald.Core/Emerald.Core.csproj
index 83657dd3..d143325d 100644
--- a/Emerald.Core/Emerald.Core.csproj
+++ b/Emerald.Core/Emerald.Core.csproj
@@ -12,4 +12,4 @@
-
+
\ No newline at end of file
diff --git a/Emerald.CoreX/Emerald.CoreX.csproj b/Emerald.CoreX/Emerald.CoreX.csproj
index ed9e2beb..367cd3d7 100644
--- a/Emerald.CoreX/Emerald.CoreX.csproj
+++ b/Emerald.CoreX/Emerald.CoreX.csproj
@@ -12,4 +12,4 @@
-
+
\ No newline at end of file
diff --git a/Emerald.Uno/.editorconfig b/Emerald.Uno/.editorconfig
new file mode 100644
index 00000000..b947be64
--- /dev/null
+++ b/Emerald.Uno/.editorconfig
@@ -0,0 +1,167 @@
+; This file is for unifying the coding style for different editors and IDEs.
+; More information at http://editorconfig.org
+
+# This file is the top-most EditorConfig file
+root = true
+
+##########################################
+# Common Settings
+##########################################
+
+[*]
+indent_style = space
+end_of_line = crlf
+trim_trailing_whitespace = true
+insert_final_newline = true
+charset = utf-8
+
+##########################################
+# File Extension Settings
+##########################################
+
+[*.{yml,yaml}]
+indent_size = 2
+
+[.vsconfig]
+indent_size = 2
+end_of_line = lf
+
+[*.sln]
+indent_style = tab
+indent_size = 2
+
+[*.{csproj,proj,projitems,shproj}]
+indent_size = 2
+
+[*.{json,slnf}]
+indent_size = 2
+end_of_line = lf
+
+[*.{props,targets}]
+indent_size = 2
+
+[*.xaml]
+indent_size = 2
+charset = utf-8-bom
+
+[*.xml]
+indent_size = 2
+end_of_line = lf
+
+[*.plist]
+indent_size = 2
+indent_style = tab
+end_of_line = lf
+
+[*.manifest]
+indent_size = 2
+
+[*.appxmanifest]
+indent_size = 2
+
+[*.{json,css,webmanifest}]
+indent_size = 2
+end_of_line = lf
+
+[web.config]
+indent_size = 2
+end_of_line = lf
+
+[*.sh]
+indent_size = 2
+end_of_line = lf
+
+[*.cs]
+# EOL should be normalized by Git. See https://github.com/dotnet/format/issues/1099
+end_of_line = unset
+
+# See https://github.com/dotnet/roslyn/issues/20356#issuecomment-310143926
+trim_trailing_whitespace = false
+
+tab_width = 4
+indent_size = 4
+
+# Sort using and Import directives with System.* appearing first
+dotnet_sort_system_directives_first = true
+
+# Avoid "this." and "Me." if not necessary
+dotnet_style_qualification_for_field = false:suggestion
+dotnet_style_qualification_for_property = false:suggestion
+dotnet_style_qualification_for_method = false:suggestion
+dotnet_style_qualification_for_event = false:suggestion
+
+#### Naming styles ####
+
+# Naming rules
+
+dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
+dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
+dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
+
+dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
+dotnet_naming_rule.types_should_be_pascal_case.symbols = types
+dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
+
+dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
+dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
+dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
+
+# Symbol specifications
+
+dotnet_naming_symbols.interface.applicable_kinds = interface
+dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
+dotnet_naming_symbols.interface.required_modifiers =
+
+dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
+dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
+dotnet_naming_symbols.types.required_modifiers =
+
+dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
+dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
+dotnet_naming_symbols.non_field_members.required_modifiers =
+
+# Naming styles
+
+dotnet_naming_style.begins_with_i.required_prefix = I
+dotnet_naming_style.begins_with_i.required_suffix =
+dotnet_naming_style.begins_with_i.word_separator =
+dotnet_naming_style.begins_with_i.capitalization = pascal_case
+
+dotnet_naming_style.pascal_case.required_prefix =
+dotnet_naming_style.pascal_case.required_suffix =
+dotnet_naming_style.pascal_case.word_separator =
+dotnet_naming_style.pascal_case.capitalization = pascal_case
+
+dotnet_naming_style.pascal_case.required_prefix =
+dotnet_naming_style.pascal_case.required_suffix =
+dotnet_naming_style.pascal_case.word_separator =
+dotnet_naming_style.pascal_case.capitalization = pascal_case
+dotnet_style_operator_placement_when_wrapping = beginning_of_line
+dotnet_style_coalesce_expression = true:suggestion
+dotnet_style_null_propagation = true:suggestion
+dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
+dotnet_style_prefer_auto_properties = true:silent
+dotnet_style_object_initializer = true:suggestion
+dotnet_style_collection_initializer = true:suggestion
+dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
+dotnet_style_prefer_conditional_expression_over_assignment = true:silent
+dotnet_style_prefer_conditional_expression_over_return = true:silent
+dotnet_style_explicit_tuple_names = true:suggestion
+dotnet_style_prefer_inferred_tuple_names = true:suggestion
+
+csharp_indent_labels = one_less_than_current
+csharp_using_directive_placement = outside_namespace:silent
+csharp_prefer_simple_using_statement = true:suggestion
+csharp_prefer_braces = true:silent
+csharp_style_namespace_declarations = file_scoped:warning
+csharp_style_prefer_method_group_conversion = true:silent
+csharp_style_prefer_top_level_statements = true:silent
+csharp_style_prefer_primary_constructors = true:suggestion
+csharp_style_expression_bodied_methods = false:silent
+csharp_style_expression_bodied_constructors = false:silent
+csharp_style_expression_bodied_operators = false:silent
+csharp_style_expression_bodied_properties = true:silent
+csharp_style_expression_bodied_indexers = true:silent
+csharp_style_expression_bodied_accessors = true:silent
+csharp_style_expression_bodied_lambdas = true:silent
+csharp_style_expression_bodied_local_functions = false:silent
diff --git a/Emerald.Uno/.gitignore b/Emerald.Uno/.gitignore
new file mode 100644
index 00000000..ef88c205
--- /dev/null
+++ b/Emerald.Uno/.gitignore
@@ -0,0 +1,403 @@
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+##
+## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
+
+# User-specific files
+*.rsuser
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Mono auto generated files
+mono_crash.*
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+[Ww][Ii][Nn]32/
+[Aa][Rr][Mm]/
+[Aa][Rr][Mm]64/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
+[Ll]ogs/
+
+# Visual Studio 2015/2017 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# Visual Studio 2017 auto generated files
+Generated\ Files/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUnit
+*.VisualState.xml
+TestResult.xml
+nunit-*.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# Benchmark Results
+BenchmarkDotNet.Artifacts/
+
+# .NET Core
+project.lock.json
+project.fragment.lock.json
+artifacts/
+
+# ASP.NET Scaffolding
+ScaffoldingReadMe.txt
+
+# StyleCop
+StyleCopReport.xml
+
+# Files built by Visual Studio
+*_i.c
+*_p.c
+*_h.h
+*.ilk
+*.meta
+*.obj
+*.iobj
+*.pch
+*.pdb
+*.ipdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*_wpftmp.csproj
+*.log
+*.tlog
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# Visual Studio Trace Files
+*.e2e
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# AxoCover is a Code Coverage Tool
+.axoCover/*
+!.axoCover/settings.json
+
+# Coverlet is a free, cross platform Code Coverage Tool
+coverage*.json
+coverage*.xml
+coverage*.info
+
+# Visual Studio code coverage results
+*.coverage
+*.coveragexml
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# Note: Comment the next line if you want to checkin your web deploy settings,
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# NuGet Symbol Packages
+*.snupkg
+# The packages folder can be ignored because of Package Restore
+**/[Pp]ackages/*
+# except build/, which is used as an MSBuild target.
+!**/[Pp]ackages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/[Pp]ackages/repositories.config
+# NuGet v3's project.json files produces more ignorable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+*.appx
+*.appxbundle
+*.appxupload
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!?*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.jfm
+*.pfx
+*.publishsettings
+orleans.codegen.cs
+
+# Including strong name files can present a security risk
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
+#*.snk
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+ServiceFabricBackup/
+*.rptproj.bak
+
+# SQL Server files
+*.mdf
+*.ldf
+*.ndf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+*.rptproj.rsuser
+*- [Bb]ackup.rdl
+*- [Bb]ackup ([0-9]).rdl
+*- [Bb]ackup ([0-9][0-9]).rdl
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+node_modules/
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+*.vbw
+
+# Visual Studio 6 auto-generated project file (contains which files were open etc.)
+*.vbp
+
+# Visual Studio 6 workspace and project file (working project files containing files to include in project)
+*.dsw
+*.dsp
+
+# Visual Studio 6 technical files
+*.ncb
+*.aps
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# CodeRush personal settings
+.cr/personal
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Tabs Studio
+*.tss
+
+# Telerik's JustMock configuration file
+*.jmconfig
+
+# BizTalk build output
+*.btp.cs
+*.btm.cs
+*.odx.cs
+*.xsd.cs
+
+# OpenCover UI analysis results
+OpenCover/
+
+# Azure Stream Analytics local run output
+ASALocalRun/
+
+# MSBuild Binary and Structured Log
+*.binlog
+
+# NVidia Nsight GPU debugger configuration file
+*.nvuser
+
+# MFractors (Xamarin productivity tool) working folder
+.mfractor/
+
+# Local History for Visual Studio
+.localhistory/
+
+# Visual Studio History (VSHistory) files
+.vshistory/
+
+# BeatPulse healthcheck temp database
+healthchecksdb
+
+# Backup folder for Package Reference Convert tool in Visual Studio 2017
+MigrationBackup/
+
+# Ionide (cross platform F# VS Code tools) working folder
+.ionide/
+
+# Fody - auto-generated XML schema
+FodyWeavers.xsd
+
+# VS Code files for those working on multiple tools
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+*.code-workspace
+
+# Local History for Visual Studio Code
+.history/
+
+# Windows Installer files from build outputs
+*.cab
+*.msi
+*.msix
+*.msm
+*.msp
+
+# JetBrains Rider
+*.sln.iml
+
+# Single Target Config
+solution-config.props
+# Publish Profiles
+!**/Properties/PublishProfiles/*.pubxml
\ No newline at end of file
diff --git a/Emerald.Uno/.vscode/extensions.json b/Emerald.Uno/.vscode/extensions.json
new file mode 100644
index 00000000..a63ad400
--- /dev/null
+++ b/Emerald.Uno/.vscode/extensions.json
@@ -0,0 +1,5 @@
+{
+ "recommendations": [
+ "unoplatform.vscode"
+ ],
+}
diff --git a/Emerald.Uno/.vscode/launch.json b/Emerald.Uno/.vscode/launch.json
new file mode 100644
index 00000000..6edf6c2e
--- /dev/null
+++ b/Emerald.Uno/.vscode/launch.json
@@ -0,0 +1,35 @@
+{
+ // Use IntelliSense to find out which attributes exist for C# debugging
+ // Use hover for the description of the existing attributes
+ // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "Uno Platform Mobile",
+ "type": "Uno",
+ "request": "launch",
+ // any Uno* task will do, this is simply to satisfy vscode requirement when a launch.json is present
+ "preLaunchTask": "Uno: android | Debug | android-x64"
+ },
+ {
+ // Use IntelliSense to find out which attributes exist for C# debugging
+ // Use hover for the description of the existing attributes
+ // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
+ "name": "Uno Platform Desktop (Debug)",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build-desktop",
+ // If you have changed target frameworks, make sure to update the program path.
+ "program": "${workspaceFolder}/Emerald.Uno/bin/Debug/net8.0-desktop/Emerald.Uno.dll",
+ "args": [],
+ "launchSettingsProfile": "Emerald.Uno (Desktop)",
+ "env": {
+ "DOTNET_MODIFIABLE_ASSEMBLIES": "debug"
+ },
+ "cwd": "${workspaceFolder}/Emerald.Uno",
+ // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
+ "console": "internalConsole",
+ "stopAtEntry": false
+ },
+ ]
+}
diff --git a/Emerald.Uno/.vscode/settings.json b/Emerald.Uno/.vscode/settings.json
new file mode 100644
index 00000000..3405922d
--- /dev/null
+++ b/Emerald.Uno/.vscode/settings.json
@@ -0,0 +1,10 @@
+{
+ "explorer.fileNesting.enabled": true,
+ "explorer.fileNesting.expand": false,
+ "explorer.fileNesting.patterns": {
+ "*.xaml": "$(capture).xaml.cs"
+ },
+ "files.associations": {
+ "global.json": "jsonc"
+ }
+}
diff --git a/Emerald.Uno/.vscode/tasks.json b/Emerald.Uno/.vscode/tasks.json
new file mode 100644
index 00000000..d1233194
--- /dev/null
+++ b/Emerald.Uno/.vscode/tasks.json
@@ -0,0 +1,31 @@
+{
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "label": "build-desktop",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "build",
+ "${workspaceFolder}/Emerald.Uno/Emerald.Uno.csproj",
+ "/property:GenerateFullPaths=true",
+ "/property:TargetFramework=net8.0-desktop",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "publish-desktop",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "publish",
+ "${workspaceFolder}/Emerald.Uno/Emerald.Uno.csproj",
+ "/property:GenerateFullPaths=true",
+ "/property:TargetFramework=net8.0-desktop",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ }
+ ]
+}
diff --git a/Emerald.Uno/.vsconfig b/Emerald.Uno/.vsconfig
new file mode 100644
index 00000000..14e219a9
--- /dev/null
+++ b/Emerald.Uno/.vsconfig
@@ -0,0 +1,18 @@
+{
+ "version": "1.0",
+ "components": [
+ "Microsoft.VisualStudio.Component.CoreEditor",
+ "Microsoft.VisualStudio.Workload.CoreEditor",
+ "Microsoft.NetCore.Component.SDK",
+ "Microsoft.NetCore.Component.DevelopmentTools",
+ "Microsoft.Net.ComponentGroup.DevelopmentPrerequisites",
+ "Microsoft.VisualStudio.Component.TextTemplating",
+ "Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites",
+ "Microsoft.VisualStudio.Component.Debugger.JustInTime",
+ "Microsoft.VisualStudio.Workload.ManagedDesktop",
+ "Microsoft.VisualStudio.Component.MonoDebugger",
+ "Microsoft.VisualStudio.ComponentGroup.Maui.All",
+ "Microsoft.VisualStudio.Workload.NetCrossPlat",
+ "Microsoft.VisualStudio.Workload.NetCoreTools"
+ ]
+}
diff --git a/Emerald.Uno/Directory.Build.props b/Emerald.Uno/Directory.Build.props
new file mode 100644
index 00000000..2bd4f977
--- /dev/null
+++ b/Emerald.Uno/Directory.Build.props
@@ -0,0 +1,23 @@
+
+
+ enable
+ enable
+ true
+
+
+ $(NoWarn);NU1507;NETSDK1201;PRI257
+
+
+
+
+ 4.1.23
+ 6.0.18
+ 5.0.13
+ 5.2.14
+
+
diff --git a/Emerald.Uno/Directory.Build.targets b/Emerald.Uno/Directory.Build.targets
new file mode 100644
index 00000000..f75adf7e
--- /dev/null
+++ b/Emerald.Uno/Directory.Build.targets
@@ -0,0 +1,2 @@
+
+
diff --git a/Emerald.Uno/Directory.Packages.props b/Emerald.Uno/Directory.Packages.props
new file mode 100644
index 00000000..0cea764d
--- /dev/null
+++ b/Emerald.Uno/Directory.Packages.props
@@ -0,0 +1,9 @@
+
+
+
+
+
diff --git a/Emerald.Uno/Emerald.Uno.sln b/Emerald.Uno/Emerald.Uno.sln
new file mode 100644
index 00000000..2b517401
--- /dev/null
+++ b/Emerald.Uno/Emerald.Uno.sln
@@ -0,0 +1,88 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.2.32210.308
+MinimumVisualStudioVersion = 15.0.26124.0
+
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Emerald.Uno", "Emerald.Uno\Emerald.Uno.csproj", "{56590F45-D858-45B0-AD87-84D23799BF2D}"
+EndProject
+
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BADA71DC-7FFD-4EDC-9F28-FB74AEADC713}"
+ ProjectSection(SolutionItems) = preProject
+ .gitignore = .gitignore
+ Directory.Build.props = Directory.Build.props
+ Directory.Build.targets = Directory.Build.targets
+ global.json = global.json
+ Directory.Packages.props = Directory.Packages.props
+ .vsconfig = .vsconfig
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|ARM = Debug|ARM
+ Debug|ARM64 = Debug|ARM64
+ Debug|iPhone = Debug|iPhone
+ Debug|iPhoneSimulator = Debug|iPhoneSimulator
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|ARM = Release|ARM
+ Release|ARM64 = Release|ARM64
+ Release|iPhone = Release|iPhone
+ Release|iPhoneSimulator = Release|iPhoneSimulator
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|ARM.Build.0 = Debug|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|ARM.Deploy.0 = Debug|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|ARM64.Deploy.0 = Debug|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|iPhone.Deploy.0 = Debug|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|x64.Build.0 = Debug|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|x64.Deploy.0 = Debug|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|x86.Build.0 = Debug|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|x86.Deploy.0 = Debug|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|ARM.ActiveCfg = Release|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|ARM.Build.0 = Release|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|ARM.Deploy.0 = Release|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|ARM64.Build.0 = Release|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|ARM64.Deploy.0 = Release|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|iPhone.Build.0 = Release|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|iPhone.Deploy.0 = Release|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|x64.ActiveCfg = Release|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|x64.Build.0 = Release|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|x64.Deploy.0 = Release|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|x86.ActiveCfg = Release|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|x86.Build.0 = Release|Any CPU
+ {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|x86.Deploy.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {AB135C24-13F4-4748-B054-A09A7EDEAF5D}
+ EndGlobalSection
+EndGlobal
diff --git a/Emerald.Uno/Emerald.Uno/App.xaml b/Emerald.Uno/Emerald.Uno/App.xaml
new file mode 100644
index 00000000..c099af18
--- /dev/null
+++ b/Emerald.Uno/Emerald.Uno/App.xaml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Emerald.Uno/Emerald.Uno/App.xaml.cs b/Emerald.Uno/Emerald.Uno/App.xaml.cs
new file mode 100644
index 00000000..af8abac3
--- /dev/null
+++ b/Emerald.Uno/Emerald.Uno/App.xaml.cs
@@ -0,0 +1,93 @@
+using Uno.Resizetizer;
+
+namespace Emerald.Uno;
+
+public partial class App : Application
+{
+ ///
+ /// Initializes the singleton application object. This is the first line of authored code
+ /// executed, and as such is the logical equivalent of main() or WinMain().
+ ///
+ public App()
+ {
+ this.InitializeComponent();
+ }
+
+ protected Window? MainWindow { get; private set; }
+ protected IHost? Host { get; private set; }
+
+ protected override void OnLaunched(LaunchActivatedEventArgs args)
+ {
+ var builder = this.CreateBuilder(args)
+ .Configure(host => host
+#if DEBUG
+ // Switch to Development environment when running in DEBUG
+ .UseEnvironment(Environments.Development)
+#endif
+ .UseLogging(configure: (context, logBuilder) =>
+ {
+ // Configure log levels for different categories of logging
+ logBuilder
+ .SetMinimumLevel(
+ context.HostingEnvironment.IsDevelopment() ?
+ LogLevel.Information :
+ LogLevel.Warning)
+
+ // Default filters for core Uno Platform namespaces
+ .CoreLogLevel(LogLevel.Warning);
+
+ // Uno Platform namespace filter groups
+ // Uncomment individual methods to see more detailed logging
+ //// Generic Xaml events
+ //logBuilder.XamlLogLevel(LogLevel.Debug);
+ //// Layout specific messages
+ //logBuilder.XamlLayoutLogLevel(LogLevel.Debug);
+ //// Storage messages
+ //logBuilder.StorageLogLevel(LogLevel.Debug);
+ //// Binding related messages
+ //logBuilder.XamlBindingLogLevel(LogLevel.Debug);
+ //// Binder memory references tracking
+ //logBuilder.BinderMemoryReferenceLogLevel(LogLevel.Debug);
+ //// DevServer and HotReload related
+ //logBuilder.HotReloadCoreLogLevel(LogLevel.Information);
+ //// Debug JS interop
+ //logBuilder.WebAssemblyLogLevel(LogLevel.Debug);
+
+ }, enableUnoLogging: true)
+ .ConfigureServices((context, services) =>
+ {
+ // TODO: Register your services
+ //services.AddSingleton();
+ })
+ );
+ MainWindow = builder.Window;
+
+#if DEBUG
+ MainWindow.EnableHotReload();
+#endif
+ MainWindow.SetWindowIcon();
+
+ Host = builder.Build();
+
+ // Do not repeat app initialization when the Window already has content,
+ // just ensure that the window is active
+ if (MainWindow.Content is not Frame rootFrame)
+ {
+ // Create a Frame to act as the navigation context and navigate to the first page
+ rootFrame = new Frame();
+
+ // Place the frame in the current Window
+ MainWindow.Content = rootFrame;
+ }
+
+ if (rootFrame.Content == null)
+ {
+ // When the navigation stack isn't restored navigate to the first page,
+ // configuring the new page by passing required information as a navigation
+ // parameter
+ rootFrame.Navigate(typeof(MainPage), args.Arguments);
+ }
+ // Ensure the current window is active
+ MainWindow.Activate();
+ }
+}
diff --git a/Emerald.Uno/Emerald.Uno/Assets/Icons/icon.svg b/Emerald.Uno/Emerald.Uno/Assets/Icons/icon.svg
new file mode 100644
index 00000000..a15af53a
--- /dev/null
+++ b/Emerald.Uno/Emerald.Uno/Assets/Icons/icon.svg
@@ -0,0 +1,42 @@
+
+
diff --git a/Emerald.Uno/Emerald.Uno/Assets/Icons/icon_foreground.svg b/Emerald.Uno/Emerald.Uno/Assets/Icons/icon_foreground.svg
new file mode 100644
index 00000000..8ffc41ae
--- /dev/null
+++ b/Emerald.Uno/Emerald.Uno/Assets/Icons/icon_foreground.svg
@@ -0,0 +1,137 @@
+
+
diff --git a/Emerald.Uno/Emerald.Uno/Assets/SharedAssets.md b/Emerald.Uno/Emerald.Uno/Assets/SharedAssets.md
new file mode 100644
index 00000000..1b84a74a
--- /dev/null
+++ b/Emerald.Uno/Emerald.Uno/Assets/SharedAssets.md
@@ -0,0 +1,32 @@
+# Shared Assets
+
+See documentation about assets here: https://github.com/unoplatform/uno/blob/master/doc/articles/features/working-with-assets.md
+
+## Here is a cheat sheet
+
+1. Add the image file to the `Assets` directory of a shared project.
+2. Set the build action to `Content`.
+3. (Recommended) Provide an asset for various scales/dpi
+
+### Examples
+
+```text
+\Assets\Images\logo.scale-100.png
+\Assets\Images\logo.scale-200.png
+\Assets\Images\logo.scale-400.png
+
+\Assets\Images\scale-100\logo.png
+\Assets\Images\scale-200\logo.png
+\Assets\Images\scale-400\logo.png
+```
+
+### Table of scales
+
+| Scale | WinUI | iOS/MacCatalyst | Android |
+|-------|:-----------:|:---------------:|:-------:|
+| `100` | scale-100 | @1x | mdpi |
+| `125` | scale-125 | N/A | N/A |
+| `150` | scale-150 | N/A | hdpi |
+| `200` | scale-200 | @2x | xhdpi |
+| `300` | scale-300 | @3x | xxhdpi |
+| `400` | scale-400 | N/A | xxxhdpi |
diff --git a/Emerald.Uno/Emerald.Uno/Assets/Splash/splash_screen.svg b/Emerald.Uno/Emerald.Uno/Assets/Splash/splash_screen.svg
new file mode 100644
index 00000000..8ffc41ae
--- /dev/null
+++ b/Emerald.Uno/Emerald.Uno/Assets/Splash/splash_screen.svg
@@ -0,0 +1,137 @@
+
+
diff --git a/Emerald.Uno/Emerald.Uno/Emerald.Uno.csproj b/Emerald.Uno/Emerald.Uno/Emerald.Uno.csproj
new file mode 100644
index 00000000..5fc9bc3f
--- /dev/null
+++ b/Emerald.Uno/Emerald.Uno/Emerald.Uno.csproj
@@ -0,0 +1,32 @@
+
+
+
+ net8.0-maccatalyst;
+ net8.0-desktop;
+
+
+ Exe
+ true
+
+
+ Emerald.Uno
+
+ com.Riverside.Emerald.Uno
+
+ 1.0
+ 1
+
+
+
+ Lottie;
+ Hosting;
+ Toolkit;
+ Logging;
+ ThemeService;
+
+
+
+
diff --git a/Emerald.Uno/Emerald.Uno/GlobalUsings.cs b/Emerald.Uno/Emerald.Uno/GlobalUsings.cs
new file mode 100644
index 00000000..2f101745
--- /dev/null
+++ b/Emerald.Uno/Emerald.Uno/GlobalUsings.cs
@@ -0,0 +1,5 @@
+global using System.Collections.Immutable;
+global using Microsoft.Extensions.DependencyInjection;
+global using Microsoft.Extensions.Hosting;
+global using Microsoft.Extensions.Logging;
+global using ApplicationExecutionState = Windows.ApplicationModel.Activation.ApplicationExecutionState;
diff --git a/Emerald.Uno/Emerald.Uno/MainPage.xaml b/Emerald.Uno/Emerald.Uno/MainPage.xaml
new file mode 100644
index 00000000..fabe71b5
--- /dev/null
+++ b/Emerald.Uno/Emerald.Uno/MainPage.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
diff --git a/Emerald.Uno/Emerald.Uno/MainPage.xaml.cs b/Emerald.Uno/Emerald.Uno/MainPage.xaml.cs
new file mode 100644
index 00000000..7221ba67
--- /dev/null
+++ b/Emerald.Uno/Emerald.Uno/MainPage.xaml.cs
@@ -0,0 +1,9 @@
+namespace Emerald.Uno;
+
+public sealed partial class MainPage : Page
+{
+ public MainPage()
+ {
+ this.InitializeComponent();
+ }
+}
diff --git a/Emerald.Uno/Emerald.Uno/Package.appxmanifest b/Emerald.Uno/Emerald.Uno/Package.appxmanifest
new file mode 100644
index 00000000..4a56eba6
--- /dev/null
+++ b/Emerald.Uno/Emerald.Uno/Package.appxmanifest
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+ Emerald.Uno
+ Emerald.Uno
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Emerald.Uno/Emerald.Uno/Platforms/Desktop/Program.cs b/Emerald.Uno/Emerald.Uno/Platforms/Desktop/Program.cs
new file mode 100644
index 00000000..fa9a1876
--- /dev/null
+++ b/Emerald.Uno/Emerald.Uno/Platforms/Desktop/Program.cs
@@ -0,0 +1,20 @@
+using Uno.UI.Runtime.Skia;
+
+namespace Emerald.Uno;
+
+public class Program
+{
+ [STAThread]
+ public static void Main(string[] args)
+ {
+ var host = SkiaHostBuilder.Create()
+ .App(() => new App())
+ .UseX11()
+ .UseLinuxFrameBuffer()
+ .UseMacOS()
+ .UseWindows()
+ .Build();
+
+ host.Run();
+ }
+}
diff --git a/Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Entitlements.plist b/Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Entitlements.plist
new file mode 100644
index 00000000..24c31036
--- /dev/null
+++ b/Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Entitlements.plist
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Info.plist b/Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Info.plist
new file mode 100644
index 00000000..1bb02ddc
--- /dev/null
+++ b/Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Info.plist
@@ -0,0 +1,26 @@
+
+
+
+
+ UIDeviceFamily
+
+ 2
+
+ LSApplicationCategoryType
+ public.app-category.utilities
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ XSAppIconAssets
+ Assets.xcassets/icon.appiconset
+
+
+
+
diff --git a/Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Main.maccatalyst.cs b/Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Main.maccatalyst.cs
new file mode 100644
index 00000000..123635ea
--- /dev/null
+++ b/Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Main.maccatalyst.cs
@@ -0,0 +1,14 @@
+using UIKit;
+
+namespace Emerald.Uno.MacCatalyst;
+
+public class EntryPoint
+{
+ // This is the main entry point of the application.
+ public static void Main(string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main(args, null, typeof(App));
+ }
+}
diff --git a/Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Media.xcassets/LaunchImages.launchimage/Contents.json b/Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Media.xcassets/LaunchImages.launchimage/Contents.json
new file mode 100644
index 00000000..69555e44
--- /dev/null
+++ b/Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Media.xcassets/LaunchImages.launchimage/Contents.json
@@ -0,0 +1,58 @@
+{
+ "images": [
+ {
+ "orientation": "portrait",
+ "extent": "full-screen",
+ "minimum-system-version": "7.0",
+ "scale": "2x",
+ "size": "640x960",
+ "idiom": "iphone"
+ },
+ {
+ "orientation": "portrait",
+ "extent": "full-screen",
+ "minimum-system-version": "7.0",
+ "subtype": "retina4",
+ "scale": "2x",
+ "size": "640x1136",
+ "idiom": "iphone"
+ },
+ {
+ "orientation": "portrait",
+ "extent": "full-screen",
+ "minimum-system-version": "7.0",
+ "scale": "1x",
+ "size": "768x1024",
+ "idiom": "ipad"
+ },
+ {
+ "orientation": "landscape",
+ "extent": "full-screen",
+ "minimum-system-version": "7.0",
+ "scale": "1x",
+ "size": "1024x768",
+ "idiom": "ipad"
+ },
+ {
+ "orientation": "portrait",
+ "extent": "full-screen",
+ "minimum-system-version": "7.0",
+ "scale": "2x",
+ "size": "1536x2048",
+ "idiom": "ipad"
+ },
+ {
+ "orientation": "landscape",
+ "extent": "full-screen",
+ "minimum-system-version": "7.0",
+ "scale": "2x",
+ "size": "2048x1536",
+ "idiom": "ipad"
+ }
+ ],
+ "properties": {},
+ "info": {
+ "version": 1,
+ "author": ""
+ }
+}
\ No newline at end of file
diff --git a/Emerald.Uno/Emerald.Uno/Properties/launchSettings.json b/Emerald.Uno/Emerald.Uno/Properties/launchSettings.json
new file mode 100644
index 00000000..3b3d93a5
--- /dev/null
+++ b/Emerald.Uno/Emerald.Uno/Properties/launchSettings.json
@@ -0,0 +1,22 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:8080",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "Emerald.Uno (Desktop)": {
+ "commandName": "Project",
+ "compatibleTargetFramework": "desktop"
+ },
+ "Emerald.Uno (Desktop WSL2)": {
+ "commandName": "WSL2",
+ "commandLineArgs": "{ProjectDir}/bin/Debug/net8.0-desktop/Emerald.Uno.dll",
+ "distributionName": "",
+ "compatibleTargetFramework": "desktop"
+ }
+ }
+}
diff --git a/Emerald.Uno/Emerald.Uno/ReadMe.md b/Emerald.Uno/Emerald.Uno/ReadMe.md
new file mode 100644
index 00000000..93482da2
--- /dev/null
+++ b/Emerald.Uno/Emerald.Uno/ReadMe.md
@@ -0,0 +1,7 @@
+# Getting Started
+
+Welcome to the Uno Platform!
+
+To discover how to get started with your new app: https://aka.platform.uno/get-started
+
+For more information on how to use the Uno.Sdk or upgrade Uno Platform packages in your solution: https://aka.platform.uno/using-uno-sdk
\ No newline at end of file
diff --git a/Emerald.Uno/Emerald.Uno/Strings/en/Resources.resw b/Emerald.Uno/Emerald.Uno/Strings/en/Resources.resw
new file mode 100644
index 00000000..2723b3c3
--- /dev/null
+++ b/Emerald.Uno/Emerald.Uno/Strings/en/Resources.resw
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Emerald.Uno-en
+
+
diff --git a/Emerald.Uno/Emerald.Uno/app.manifest b/Emerald.Uno/Emerald.Uno/app.manifest
new file mode 100644
index 00000000..a61e665f
--- /dev/null
+++ b/Emerald.Uno/Emerald.Uno/app.manifest
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true/PM
+ PerMonitorV2, PerMonitor
+
+
+
diff --git a/Emerald.Uno/global.json b/Emerald.Uno/global.json
new file mode 100644
index 00000000..ce7228cb
--- /dev/null
+++ b/Emerald.Uno/global.json
@@ -0,0 +1,9 @@
+{
+ // To update the version of Uno please update the version of the Uno.Sdk here. See https://aka.platform.uno/upgrade-uno-packages for more information.
+ "msbuild-sdks": {
+ "Uno.Sdk": "5.2.175"
+ },
+ "sdk": {
+ "allowPrerelease": false
+ }
+}
From 0642c5a67c69cf11b4df1e46fda306a7cfed0b26 Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Thu, 18 Jul 2024 17:15:42 +0100
Subject: [PATCH 19/61] Remove Uno Platform project
I didn't really like it anyway
---
Emerald.Uno/.editorconfig | 167 --------
Emerald.Uno/.gitignore | 403 ------------------
Emerald.Uno/.vscode/extensions.json | 5 -
Emerald.Uno/.vscode/launch.json | 35 --
Emerald.Uno/.vscode/settings.json | 10 -
Emerald.Uno/.vscode/tasks.json | 31 --
Emerald.Uno/.vsconfig | 18 -
Emerald.Uno/Directory.Build.props | 23 -
Emerald.Uno/Directory.Build.targets | 2 -
Emerald.Uno/Directory.Packages.props | 9 -
Emerald.Uno/Emerald.Uno.sln | 88 ----
Emerald.Uno/Emerald.Uno/App.xaml | 19 -
Emerald.Uno/Emerald.Uno/App.xaml.cs | 93 ----
Emerald.Uno/Emerald.Uno/Assets/Icons/icon.svg | 42 --
.../Assets/Icons/icon_foreground.svg | 137 ------
.../Emerald.Uno/Assets/SharedAssets.md | 32 --
.../Assets/Splash/splash_screen.svg | 137 ------
Emerald.Uno/Emerald.Uno/Emerald.Uno.csproj | 32 --
Emerald.Uno/Emerald.Uno/GlobalUsings.cs | 5 -
Emerald.Uno/Emerald.Uno/MainPage.xaml | 14 -
Emerald.Uno/Emerald.Uno/MainPage.xaml.cs | 9 -
Emerald.Uno/Emerald.Uno/Package.appxmanifest | 43 --
.../Emerald.Uno/Platforms/Desktop/Program.cs | 20 -
.../Platforms/MacCatalyst/Entitlements.plist | 6 -
.../Platforms/MacCatalyst/Info.plist | 26 --
.../Platforms/MacCatalyst/Main.maccatalyst.cs | 14 -
.../LaunchImages.launchimage/Contents.json | 58 ---
.../Properties/launchSettings.json | 22 -
Emerald.Uno/Emerald.Uno/ReadMe.md | 7 -
.../Emerald.Uno/Strings/en/Resources.resw | 123 ------
Emerald.Uno/Emerald.Uno/app.manifest | 25 --
Emerald.Uno/global.json | 9 -
32 files changed, 1664 deletions(-)
delete mode 100644 Emerald.Uno/.editorconfig
delete mode 100644 Emerald.Uno/.gitignore
delete mode 100644 Emerald.Uno/.vscode/extensions.json
delete mode 100644 Emerald.Uno/.vscode/launch.json
delete mode 100644 Emerald.Uno/.vscode/settings.json
delete mode 100644 Emerald.Uno/.vscode/tasks.json
delete mode 100644 Emerald.Uno/.vsconfig
delete mode 100644 Emerald.Uno/Directory.Build.props
delete mode 100644 Emerald.Uno/Directory.Build.targets
delete mode 100644 Emerald.Uno/Directory.Packages.props
delete mode 100644 Emerald.Uno/Emerald.Uno.sln
delete mode 100644 Emerald.Uno/Emerald.Uno/App.xaml
delete mode 100644 Emerald.Uno/Emerald.Uno/App.xaml.cs
delete mode 100644 Emerald.Uno/Emerald.Uno/Assets/Icons/icon.svg
delete mode 100644 Emerald.Uno/Emerald.Uno/Assets/Icons/icon_foreground.svg
delete mode 100644 Emerald.Uno/Emerald.Uno/Assets/SharedAssets.md
delete mode 100644 Emerald.Uno/Emerald.Uno/Assets/Splash/splash_screen.svg
delete mode 100644 Emerald.Uno/Emerald.Uno/Emerald.Uno.csproj
delete mode 100644 Emerald.Uno/Emerald.Uno/GlobalUsings.cs
delete mode 100644 Emerald.Uno/Emerald.Uno/MainPage.xaml
delete mode 100644 Emerald.Uno/Emerald.Uno/MainPage.xaml.cs
delete mode 100644 Emerald.Uno/Emerald.Uno/Package.appxmanifest
delete mode 100644 Emerald.Uno/Emerald.Uno/Platforms/Desktop/Program.cs
delete mode 100644 Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Entitlements.plist
delete mode 100644 Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Info.plist
delete mode 100644 Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Main.maccatalyst.cs
delete mode 100644 Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Media.xcassets/LaunchImages.launchimage/Contents.json
delete mode 100644 Emerald.Uno/Emerald.Uno/Properties/launchSettings.json
delete mode 100644 Emerald.Uno/Emerald.Uno/ReadMe.md
delete mode 100644 Emerald.Uno/Emerald.Uno/Strings/en/Resources.resw
delete mode 100644 Emerald.Uno/Emerald.Uno/app.manifest
delete mode 100644 Emerald.Uno/global.json
diff --git a/Emerald.Uno/.editorconfig b/Emerald.Uno/.editorconfig
deleted file mode 100644
index b947be64..00000000
--- a/Emerald.Uno/.editorconfig
+++ /dev/null
@@ -1,167 +0,0 @@
-; This file is for unifying the coding style for different editors and IDEs.
-; More information at http://editorconfig.org
-
-# This file is the top-most EditorConfig file
-root = true
-
-##########################################
-# Common Settings
-##########################################
-
-[*]
-indent_style = space
-end_of_line = crlf
-trim_trailing_whitespace = true
-insert_final_newline = true
-charset = utf-8
-
-##########################################
-# File Extension Settings
-##########################################
-
-[*.{yml,yaml}]
-indent_size = 2
-
-[.vsconfig]
-indent_size = 2
-end_of_line = lf
-
-[*.sln]
-indent_style = tab
-indent_size = 2
-
-[*.{csproj,proj,projitems,shproj}]
-indent_size = 2
-
-[*.{json,slnf}]
-indent_size = 2
-end_of_line = lf
-
-[*.{props,targets}]
-indent_size = 2
-
-[*.xaml]
-indent_size = 2
-charset = utf-8-bom
-
-[*.xml]
-indent_size = 2
-end_of_line = lf
-
-[*.plist]
-indent_size = 2
-indent_style = tab
-end_of_line = lf
-
-[*.manifest]
-indent_size = 2
-
-[*.appxmanifest]
-indent_size = 2
-
-[*.{json,css,webmanifest}]
-indent_size = 2
-end_of_line = lf
-
-[web.config]
-indent_size = 2
-end_of_line = lf
-
-[*.sh]
-indent_size = 2
-end_of_line = lf
-
-[*.cs]
-# EOL should be normalized by Git. See https://github.com/dotnet/format/issues/1099
-end_of_line = unset
-
-# See https://github.com/dotnet/roslyn/issues/20356#issuecomment-310143926
-trim_trailing_whitespace = false
-
-tab_width = 4
-indent_size = 4
-
-# Sort using and Import directives with System.* appearing first
-dotnet_sort_system_directives_first = true
-
-# Avoid "this." and "Me." if not necessary
-dotnet_style_qualification_for_field = false:suggestion
-dotnet_style_qualification_for_property = false:suggestion
-dotnet_style_qualification_for_method = false:suggestion
-dotnet_style_qualification_for_event = false:suggestion
-
-#### Naming styles ####
-
-# Naming rules
-
-dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
-dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
-dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
-
-dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
-dotnet_naming_rule.types_should_be_pascal_case.symbols = types
-dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
-
-dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
-dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
-dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
-
-# Symbol specifications
-
-dotnet_naming_symbols.interface.applicable_kinds = interface
-dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
-dotnet_naming_symbols.interface.required_modifiers =
-
-dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
-dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
-dotnet_naming_symbols.types.required_modifiers =
-
-dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
-dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
-dotnet_naming_symbols.non_field_members.required_modifiers =
-
-# Naming styles
-
-dotnet_naming_style.begins_with_i.required_prefix = I
-dotnet_naming_style.begins_with_i.required_suffix =
-dotnet_naming_style.begins_with_i.word_separator =
-dotnet_naming_style.begins_with_i.capitalization = pascal_case
-
-dotnet_naming_style.pascal_case.required_prefix =
-dotnet_naming_style.pascal_case.required_suffix =
-dotnet_naming_style.pascal_case.word_separator =
-dotnet_naming_style.pascal_case.capitalization = pascal_case
-
-dotnet_naming_style.pascal_case.required_prefix =
-dotnet_naming_style.pascal_case.required_suffix =
-dotnet_naming_style.pascal_case.word_separator =
-dotnet_naming_style.pascal_case.capitalization = pascal_case
-dotnet_style_operator_placement_when_wrapping = beginning_of_line
-dotnet_style_coalesce_expression = true:suggestion
-dotnet_style_null_propagation = true:suggestion
-dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
-dotnet_style_prefer_auto_properties = true:silent
-dotnet_style_object_initializer = true:suggestion
-dotnet_style_collection_initializer = true:suggestion
-dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
-dotnet_style_prefer_conditional_expression_over_assignment = true:silent
-dotnet_style_prefer_conditional_expression_over_return = true:silent
-dotnet_style_explicit_tuple_names = true:suggestion
-dotnet_style_prefer_inferred_tuple_names = true:suggestion
-
-csharp_indent_labels = one_less_than_current
-csharp_using_directive_placement = outside_namespace:silent
-csharp_prefer_simple_using_statement = true:suggestion
-csharp_prefer_braces = true:silent
-csharp_style_namespace_declarations = file_scoped:warning
-csharp_style_prefer_method_group_conversion = true:silent
-csharp_style_prefer_top_level_statements = true:silent
-csharp_style_prefer_primary_constructors = true:suggestion
-csharp_style_expression_bodied_methods = false:silent
-csharp_style_expression_bodied_constructors = false:silent
-csharp_style_expression_bodied_operators = false:silent
-csharp_style_expression_bodied_properties = true:silent
-csharp_style_expression_bodied_indexers = true:silent
-csharp_style_expression_bodied_accessors = true:silent
-csharp_style_expression_bodied_lambdas = true:silent
-csharp_style_expression_bodied_local_functions = false:silent
diff --git a/Emerald.Uno/.gitignore b/Emerald.Uno/.gitignore
deleted file mode 100644
index ef88c205..00000000
--- a/Emerald.Uno/.gitignore
+++ /dev/null
@@ -1,403 +0,0 @@
-## Ignore Visual Studio temporary files, build results, and
-## files generated by popular Visual Studio add-ons.
-##
-## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
-
-# User-specific files
-*.rsuser
-*.suo
-*.user
-*.userosscache
-*.sln.docstates
-
-# User-specific files (MonoDevelop/Xamarin Studio)
-*.userprefs
-
-# Mono auto generated files
-mono_crash.*
-
-# Build results
-[Dd]ebug/
-[Dd]ebugPublic/
-[Rr]elease/
-[Rr]eleases/
-x64/
-x86/
-[Ww][Ii][Nn]32/
-[Aa][Rr][Mm]/
-[Aa][Rr][Mm]64/
-bld/
-[Bb]in/
-[Oo]bj/
-[Ll]og/
-[Ll]ogs/
-
-# Visual Studio 2015/2017 cache/options directory
-.vs/
-# Uncomment if you have tasks that create the project's static files in wwwroot
-#wwwroot/
-
-# Visual Studio 2017 auto generated files
-Generated\ Files/
-
-# MSTest test Results
-[Tt]est[Rr]esult*/
-[Bb]uild[Ll]og.*
-
-# NUnit
-*.VisualState.xml
-TestResult.xml
-nunit-*.xml
-
-# Build Results of an ATL Project
-[Dd]ebugPS/
-[Rr]eleasePS/
-dlldata.c
-
-# Benchmark Results
-BenchmarkDotNet.Artifacts/
-
-# .NET Core
-project.lock.json
-project.fragment.lock.json
-artifacts/
-
-# ASP.NET Scaffolding
-ScaffoldingReadMe.txt
-
-# StyleCop
-StyleCopReport.xml
-
-# Files built by Visual Studio
-*_i.c
-*_p.c
-*_h.h
-*.ilk
-*.meta
-*.obj
-*.iobj
-*.pch
-*.pdb
-*.ipdb
-*.pgc
-*.pgd
-*.rsp
-*.sbr
-*.tlb
-*.tli
-*.tlh
-*.tmp
-*.tmp_proj
-*_wpftmp.csproj
-*.log
-*.tlog
-*.vspscc
-*.vssscc
-.builds
-*.pidb
-*.svclog
-*.scc
-
-# Chutzpah Test files
-_Chutzpah*
-
-# Visual C++ cache files
-ipch/
-*.aps
-*.ncb
-*.opendb
-*.opensdf
-*.sdf
-*.cachefile
-*.VC.db
-*.VC.VC.opendb
-
-# Visual Studio profiler
-*.psess
-*.vsp
-*.vspx
-*.sap
-
-# Visual Studio Trace Files
-*.e2e
-
-# TFS 2012 Local Workspace
-$tf/
-
-# Guidance Automation Toolkit
-*.gpState
-
-# ReSharper is a .NET coding add-in
-_ReSharper*/
-*.[Rr]e[Ss]harper
-*.DotSettings.user
-
-# TeamCity is a build add-in
-_TeamCity*
-
-# DotCover is a Code Coverage Tool
-*.dotCover
-
-# AxoCover is a Code Coverage Tool
-.axoCover/*
-!.axoCover/settings.json
-
-# Coverlet is a free, cross platform Code Coverage Tool
-coverage*.json
-coverage*.xml
-coverage*.info
-
-# Visual Studio code coverage results
-*.coverage
-*.coveragexml
-
-# NCrunch
-_NCrunch_*
-.*crunch*.local.xml
-nCrunchTemp_*
-
-# MightyMoose
-*.mm.*
-AutoTest.Net/
-
-# Web workbench (sass)
-.sass-cache/
-
-# Installshield output folder
-[Ee]xpress/
-
-# DocProject is a documentation generator add-in
-DocProject/buildhelp/
-DocProject/Help/*.HxT
-DocProject/Help/*.HxC
-DocProject/Help/*.hhc
-DocProject/Help/*.hhk
-DocProject/Help/*.hhp
-DocProject/Help/Html2
-DocProject/Help/html
-
-# Click-Once directory
-publish/
-
-# Publish Web Output
-*.[Pp]ublish.xml
-*.azurePubxml
-# Note: Comment the next line if you want to checkin your web deploy settings,
-# but database connection strings (with potential passwords) will be unencrypted
-*.pubxml
-*.publishproj
-
-# Microsoft Azure Web App publish settings. Comment the next line if you want to
-# checkin your Azure Web App publish settings, but sensitive information contained
-# in these scripts will be unencrypted
-PublishScripts/
-
-# NuGet Packages
-*.nupkg
-# NuGet Symbol Packages
-*.snupkg
-# The packages folder can be ignored because of Package Restore
-**/[Pp]ackages/*
-# except build/, which is used as an MSBuild target.
-!**/[Pp]ackages/build/
-# Uncomment if necessary however generally it will be regenerated when needed
-#!**/[Pp]ackages/repositories.config
-# NuGet v3's project.json files produces more ignorable files
-*.nuget.props
-*.nuget.targets
-
-# Microsoft Azure Build Output
-csx/
-*.build.csdef
-
-# Microsoft Azure Emulator
-ecf/
-rcf/
-
-# Windows Store app package directories and files
-AppPackages/
-BundleArtifacts/
-Package.StoreAssociation.xml
-_pkginfo.txt
-*.appx
-*.appxbundle
-*.appxupload
-
-# Visual Studio cache files
-# files ending in .cache can be ignored
-*.[Cc]ache
-# but keep track of directories ending in .cache
-!?*.[Cc]ache/
-
-# Others
-ClientBin/
-~$*
-*~
-*.dbmdl
-*.dbproj.schemaview
-*.jfm
-*.pfx
-*.publishsettings
-orleans.codegen.cs
-
-# Including strong name files can present a security risk
-# (https://github.com/github/gitignore/pull/2483#issue-259490424)
-#*.snk
-
-# Since there are multiple workflows, uncomment next line to ignore bower_components
-# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
-#bower_components/
-
-# RIA/Silverlight projects
-Generated_Code/
-
-# Backup & report files from converting an old project file
-# to a newer Visual Studio version. Backup files are not needed,
-# because we have git ;-)
-_UpgradeReport_Files/
-Backup*/
-UpgradeLog*.XML
-UpgradeLog*.htm
-ServiceFabricBackup/
-*.rptproj.bak
-
-# SQL Server files
-*.mdf
-*.ldf
-*.ndf
-
-# Business Intelligence projects
-*.rdl.data
-*.bim.layout
-*.bim_*.settings
-*.rptproj.rsuser
-*- [Bb]ackup.rdl
-*- [Bb]ackup ([0-9]).rdl
-*- [Bb]ackup ([0-9][0-9]).rdl
-
-# Microsoft Fakes
-FakesAssemblies/
-
-# GhostDoc plugin setting file
-*.GhostDoc.xml
-
-# Node.js Tools for Visual Studio
-.ntvs_analysis.dat
-node_modules/
-
-# Visual Studio 6 build log
-*.plg
-
-# Visual Studio 6 workspace options file
-*.opt
-
-# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
-*.vbw
-
-# Visual Studio 6 auto-generated project file (contains which files were open etc.)
-*.vbp
-
-# Visual Studio 6 workspace and project file (working project files containing files to include in project)
-*.dsw
-*.dsp
-
-# Visual Studio 6 technical files
-*.ncb
-*.aps
-
-# Visual Studio LightSwitch build output
-**/*.HTMLClient/GeneratedArtifacts
-**/*.DesktopClient/GeneratedArtifacts
-**/*.DesktopClient/ModelManifest.xml
-**/*.Server/GeneratedArtifacts
-**/*.Server/ModelManifest.xml
-_Pvt_Extensions
-
-# Paket dependency manager
-.paket/paket.exe
-paket-files/
-
-# FAKE - F# Make
-.fake/
-
-# CodeRush personal settings
-.cr/personal
-
-# Python Tools for Visual Studio (PTVS)
-__pycache__/
-*.pyc
-
-# Cake - Uncomment if you are using it
-# tools/**
-# !tools/packages.config
-
-# Tabs Studio
-*.tss
-
-# Telerik's JustMock configuration file
-*.jmconfig
-
-# BizTalk build output
-*.btp.cs
-*.btm.cs
-*.odx.cs
-*.xsd.cs
-
-# OpenCover UI analysis results
-OpenCover/
-
-# Azure Stream Analytics local run output
-ASALocalRun/
-
-# MSBuild Binary and Structured Log
-*.binlog
-
-# NVidia Nsight GPU debugger configuration file
-*.nvuser
-
-# MFractors (Xamarin productivity tool) working folder
-.mfractor/
-
-# Local History for Visual Studio
-.localhistory/
-
-# Visual Studio History (VSHistory) files
-.vshistory/
-
-# BeatPulse healthcheck temp database
-healthchecksdb
-
-# Backup folder for Package Reference Convert tool in Visual Studio 2017
-MigrationBackup/
-
-# Ionide (cross platform F# VS Code tools) working folder
-.ionide/
-
-# Fody - auto-generated XML schema
-FodyWeavers.xsd
-
-# VS Code files for those working on multiple tools
-.vscode/*
-!.vscode/settings.json
-!.vscode/tasks.json
-!.vscode/launch.json
-!.vscode/extensions.json
-*.code-workspace
-
-# Local History for Visual Studio Code
-.history/
-
-# Windows Installer files from build outputs
-*.cab
-*.msi
-*.msix
-*.msm
-*.msp
-
-# JetBrains Rider
-*.sln.iml
-
-# Single Target Config
-solution-config.props
-# Publish Profiles
-!**/Properties/PublishProfiles/*.pubxml
\ No newline at end of file
diff --git a/Emerald.Uno/.vscode/extensions.json b/Emerald.Uno/.vscode/extensions.json
deleted file mode 100644
index a63ad400..00000000
--- a/Emerald.Uno/.vscode/extensions.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "recommendations": [
- "unoplatform.vscode"
- ],
-}
diff --git a/Emerald.Uno/.vscode/launch.json b/Emerald.Uno/.vscode/launch.json
deleted file mode 100644
index 6edf6c2e..00000000
--- a/Emerald.Uno/.vscode/launch.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- // Use IntelliSense to find out which attributes exist for C# debugging
- // Use hover for the description of the existing attributes
- // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
- "version": "0.2.0",
- "configurations": [
- {
- "name": "Uno Platform Mobile",
- "type": "Uno",
- "request": "launch",
- // any Uno* task will do, this is simply to satisfy vscode requirement when a launch.json is present
- "preLaunchTask": "Uno: android | Debug | android-x64"
- },
- {
- // Use IntelliSense to find out which attributes exist for C# debugging
- // Use hover for the description of the existing attributes
- // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
- "name": "Uno Platform Desktop (Debug)",
- "type": "coreclr",
- "request": "launch",
- "preLaunchTask": "build-desktop",
- // If you have changed target frameworks, make sure to update the program path.
- "program": "${workspaceFolder}/Emerald.Uno/bin/Debug/net8.0-desktop/Emerald.Uno.dll",
- "args": [],
- "launchSettingsProfile": "Emerald.Uno (Desktop)",
- "env": {
- "DOTNET_MODIFIABLE_ASSEMBLIES": "debug"
- },
- "cwd": "${workspaceFolder}/Emerald.Uno",
- // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
- "console": "internalConsole",
- "stopAtEntry": false
- },
- ]
-}
diff --git a/Emerald.Uno/.vscode/settings.json b/Emerald.Uno/.vscode/settings.json
deleted file mode 100644
index 3405922d..00000000
--- a/Emerald.Uno/.vscode/settings.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "explorer.fileNesting.enabled": true,
- "explorer.fileNesting.expand": false,
- "explorer.fileNesting.patterns": {
- "*.xaml": "$(capture).xaml.cs"
- },
- "files.associations": {
- "global.json": "jsonc"
- }
-}
diff --git a/Emerald.Uno/.vscode/tasks.json b/Emerald.Uno/.vscode/tasks.json
deleted file mode 100644
index d1233194..00000000
--- a/Emerald.Uno/.vscode/tasks.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "version": "2.0.0",
- "tasks": [
- {
- "label": "build-desktop",
- "command": "dotnet",
- "type": "process",
- "args": [
- "build",
- "${workspaceFolder}/Emerald.Uno/Emerald.Uno.csproj",
- "/property:GenerateFullPaths=true",
- "/property:TargetFramework=net8.0-desktop",
- "/consoleloggerparameters:NoSummary"
- ],
- "problemMatcher": "$msCompile"
- },
- {
- "label": "publish-desktop",
- "command": "dotnet",
- "type": "process",
- "args": [
- "publish",
- "${workspaceFolder}/Emerald.Uno/Emerald.Uno.csproj",
- "/property:GenerateFullPaths=true",
- "/property:TargetFramework=net8.0-desktop",
- "/consoleloggerparameters:NoSummary"
- ],
- "problemMatcher": "$msCompile"
- }
- ]
-}
diff --git a/Emerald.Uno/.vsconfig b/Emerald.Uno/.vsconfig
deleted file mode 100644
index 14e219a9..00000000
--- a/Emerald.Uno/.vsconfig
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "version": "1.0",
- "components": [
- "Microsoft.VisualStudio.Component.CoreEditor",
- "Microsoft.VisualStudio.Workload.CoreEditor",
- "Microsoft.NetCore.Component.SDK",
- "Microsoft.NetCore.Component.DevelopmentTools",
- "Microsoft.Net.ComponentGroup.DevelopmentPrerequisites",
- "Microsoft.VisualStudio.Component.TextTemplating",
- "Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites",
- "Microsoft.VisualStudio.Component.Debugger.JustInTime",
- "Microsoft.VisualStudio.Workload.ManagedDesktop",
- "Microsoft.VisualStudio.Component.MonoDebugger",
- "Microsoft.VisualStudio.ComponentGroup.Maui.All",
- "Microsoft.VisualStudio.Workload.NetCrossPlat",
- "Microsoft.VisualStudio.Workload.NetCoreTools"
- ]
-}
diff --git a/Emerald.Uno/Directory.Build.props b/Emerald.Uno/Directory.Build.props
deleted file mode 100644
index 2bd4f977..00000000
--- a/Emerald.Uno/Directory.Build.props
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
- enable
- enable
- true
-
-
- $(NoWarn);NU1507;NETSDK1201;PRI257
-
-
-
-
- 4.1.23
- 6.0.18
- 5.0.13
- 5.2.14
-
-
diff --git a/Emerald.Uno/Directory.Build.targets b/Emerald.Uno/Directory.Build.targets
deleted file mode 100644
index f75adf7e..00000000
--- a/Emerald.Uno/Directory.Build.targets
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/Emerald.Uno/Directory.Packages.props b/Emerald.Uno/Directory.Packages.props
deleted file mode 100644
index 0cea764d..00000000
--- a/Emerald.Uno/Directory.Packages.props
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
diff --git a/Emerald.Uno/Emerald.Uno.sln b/Emerald.Uno/Emerald.Uno.sln
deleted file mode 100644
index 2b517401..00000000
--- a/Emerald.Uno/Emerald.Uno.sln
+++ /dev/null
@@ -1,88 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.2.32210.308
-MinimumVisualStudioVersion = 15.0.26124.0
-
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Emerald.Uno", "Emerald.Uno\Emerald.Uno.csproj", "{56590F45-D858-45B0-AD87-84D23799BF2D}"
-EndProject
-
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BADA71DC-7FFD-4EDC-9F28-FB74AEADC713}"
- ProjectSection(SolutionItems) = preProject
- .gitignore = .gitignore
- Directory.Build.props = Directory.Build.props
- Directory.Build.targets = Directory.Build.targets
- global.json = global.json
- Directory.Packages.props = Directory.Packages.props
- .vsconfig = .vsconfig
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|ARM = Debug|ARM
- Debug|ARM64 = Debug|ARM64
- Debug|iPhone = Debug|iPhone
- Debug|iPhoneSimulator = Debug|iPhoneSimulator
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|ARM = Release|ARM
- Release|ARM64 = Release|ARM64
- Release|iPhone = Release|iPhone
- Release|iPhoneSimulator = Release|iPhoneSimulator
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|ARM.ActiveCfg = Debug|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|ARM.Build.0 = Debug|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|ARM.Deploy.0 = Debug|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|ARM64.ActiveCfg = Debug|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|ARM64.Build.0 = Debug|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|ARM64.Deploy.0 = Debug|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|iPhone.ActiveCfg = Debug|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|iPhone.Build.0 = Debug|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|iPhone.Deploy.0 = Debug|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|x64.ActiveCfg = Debug|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|x64.Build.0 = Debug|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|x64.Deploy.0 = Debug|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|x86.ActiveCfg = Debug|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|x86.Build.0 = Debug|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Debug|x86.Deploy.0 = Debug|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|Any CPU.Build.0 = Release|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|Any CPU.Deploy.0 = Release|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|ARM.ActiveCfg = Release|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|ARM.Build.0 = Release|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|ARM.Deploy.0 = Release|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|ARM64.ActiveCfg = Release|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|ARM64.Build.0 = Release|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|ARM64.Deploy.0 = Release|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|iPhone.ActiveCfg = Release|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|iPhone.Build.0 = Release|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|iPhone.Deploy.0 = Release|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|x64.ActiveCfg = Release|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|x64.Build.0 = Release|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|x64.Deploy.0 = Release|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|x86.ActiveCfg = Release|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|x86.Build.0 = Release|Any CPU
- {56590F45-D858-45B0-AD87-84D23799BF2D}.Release|x86.Deploy.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {AB135C24-13F4-4748-B054-A09A7EDEAF5D}
- EndGlobalSection
-EndGlobal
diff --git a/Emerald.Uno/Emerald.Uno/App.xaml b/Emerald.Uno/Emerald.Uno/App.xaml
deleted file mode 100644
index c099af18..00000000
--- a/Emerald.Uno/Emerald.Uno/App.xaml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Emerald.Uno/Emerald.Uno/App.xaml.cs b/Emerald.Uno/Emerald.Uno/App.xaml.cs
deleted file mode 100644
index af8abac3..00000000
--- a/Emerald.Uno/Emerald.Uno/App.xaml.cs
+++ /dev/null
@@ -1,93 +0,0 @@
-using Uno.Resizetizer;
-
-namespace Emerald.Uno;
-
-public partial class App : Application
-{
- ///
- /// Initializes the singleton application object. This is the first line of authored code
- /// executed, and as such is the logical equivalent of main() or WinMain().
- ///
- public App()
- {
- this.InitializeComponent();
- }
-
- protected Window? MainWindow { get; private set; }
- protected IHost? Host { get; private set; }
-
- protected override void OnLaunched(LaunchActivatedEventArgs args)
- {
- var builder = this.CreateBuilder(args)
- .Configure(host => host
-#if DEBUG
- // Switch to Development environment when running in DEBUG
- .UseEnvironment(Environments.Development)
-#endif
- .UseLogging(configure: (context, logBuilder) =>
- {
- // Configure log levels for different categories of logging
- logBuilder
- .SetMinimumLevel(
- context.HostingEnvironment.IsDevelopment() ?
- LogLevel.Information :
- LogLevel.Warning)
-
- // Default filters for core Uno Platform namespaces
- .CoreLogLevel(LogLevel.Warning);
-
- // Uno Platform namespace filter groups
- // Uncomment individual methods to see more detailed logging
- //// Generic Xaml events
- //logBuilder.XamlLogLevel(LogLevel.Debug);
- //// Layout specific messages
- //logBuilder.XamlLayoutLogLevel(LogLevel.Debug);
- //// Storage messages
- //logBuilder.StorageLogLevel(LogLevel.Debug);
- //// Binding related messages
- //logBuilder.XamlBindingLogLevel(LogLevel.Debug);
- //// Binder memory references tracking
- //logBuilder.BinderMemoryReferenceLogLevel(LogLevel.Debug);
- //// DevServer and HotReload related
- //logBuilder.HotReloadCoreLogLevel(LogLevel.Information);
- //// Debug JS interop
- //logBuilder.WebAssemblyLogLevel(LogLevel.Debug);
-
- }, enableUnoLogging: true)
- .ConfigureServices((context, services) =>
- {
- // TODO: Register your services
- //services.AddSingleton();
- })
- );
- MainWindow = builder.Window;
-
-#if DEBUG
- MainWindow.EnableHotReload();
-#endif
- MainWindow.SetWindowIcon();
-
- Host = builder.Build();
-
- // Do not repeat app initialization when the Window already has content,
- // just ensure that the window is active
- if (MainWindow.Content is not Frame rootFrame)
- {
- // Create a Frame to act as the navigation context and navigate to the first page
- rootFrame = new Frame();
-
- // Place the frame in the current Window
- MainWindow.Content = rootFrame;
- }
-
- if (rootFrame.Content == null)
- {
- // When the navigation stack isn't restored navigate to the first page,
- // configuring the new page by passing required information as a navigation
- // parameter
- rootFrame.Navigate(typeof(MainPage), args.Arguments);
- }
- // Ensure the current window is active
- MainWindow.Activate();
- }
-}
diff --git a/Emerald.Uno/Emerald.Uno/Assets/Icons/icon.svg b/Emerald.Uno/Emerald.Uno/Assets/Icons/icon.svg
deleted file mode 100644
index a15af53a..00000000
--- a/Emerald.Uno/Emerald.Uno/Assets/Icons/icon.svg
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
diff --git a/Emerald.Uno/Emerald.Uno/Assets/Icons/icon_foreground.svg b/Emerald.Uno/Emerald.Uno/Assets/Icons/icon_foreground.svg
deleted file mode 100644
index 8ffc41ae..00000000
--- a/Emerald.Uno/Emerald.Uno/Assets/Icons/icon_foreground.svg
+++ /dev/null
@@ -1,137 +0,0 @@
-
-
diff --git a/Emerald.Uno/Emerald.Uno/Assets/SharedAssets.md b/Emerald.Uno/Emerald.Uno/Assets/SharedAssets.md
deleted file mode 100644
index 1b84a74a..00000000
--- a/Emerald.Uno/Emerald.Uno/Assets/SharedAssets.md
+++ /dev/null
@@ -1,32 +0,0 @@
-# Shared Assets
-
-See documentation about assets here: https://github.com/unoplatform/uno/blob/master/doc/articles/features/working-with-assets.md
-
-## Here is a cheat sheet
-
-1. Add the image file to the `Assets` directory of a shared project.
-2. Set the build action to `Content`.
-3. (Recommended) Provide an asset for various scales/dpi
-
-### Examples
-
-```text
-\Assets\Images\logo.scale-100.png
-\Assets\Images\logo.scale-200.png
-\Assets\Images\logo.scale-400.png
-
-\Assets\Images\scale-100\logo.png
-\Assets\Images\scale-200\logo.png
-\Assets\Images\scale-400\logo.png
-```
-
-### Table of scales
-
-| Scale | WinUI | iOS/MacCatalyst | Android |
-|-------|:-----------:|:---------------:|:-------:|
-| `100` | scale-100 | @1x | mdpi |
-| `125` | scale-125 | N/A | N/A |
-| `150` | scale-150 | N/A | hdpi |
-| `200` | scale-200 | @2x | xhdpi |
-| `300` | scale-300 | @3x | xxhdpi |
-| `400` | scale-400 | N/A | xxxhdpi |
diff --git a/Emerald.Uno/Emerald.Uno/Assets/Splash/splash_screen.svg b/Emerald.Uno/Emerald.Uno/Assets/Splash/splash_screen.svg
deleted file mode 100644
index 8ffc41ae..00000000
--- a/Emerald.Uno/Emerald.Uno/Assets/Splash/splash_screen.svg
+++ /dev/null
@@ -1,137 +0,0 @@
-
-
diff --git a/Emerald.Uno/Emerald.Uno/Emerald.Uno.csproj b/Emerald.Uno/Emerald.Uno/Emerald.Uno.csproj
deleted file mode 100644
index 5fc9bc3f..00000000
--- a/Emerald.Uno/Emerald.Uno/Emerald.Uno.csproj
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- net8.0-maccatalyst;
- net8.0-desktop;
-
-
- Exe
- true
-
-
- Emerald.Uno
-
- com.Riverside.Emerald.Uno
-
- 1.0
- 1
-
-
-
- Lottie;
- Hosting;
- Toolkit;
- Logging;
- ThemeService;
-
-
-
-
diff --git a/Emerald.Uno/Emerald.Uno/GlobalUsings.cs b/Emerald.Uno/Emerald.Uno/GlobalUsings.cs
deleted file mode 100644
index 2f101745..00000000
--- a/Emerald.Uno/Emerald.Uno/GlobalUsings.cs
+++ /dev/null
@@ -1,5 +0,0 @@
-global using System.Collections.Immutable;
-global using Microsoft.Extensions.DependencyInjection;
-global using Microsoft.Extensions.Hosting;
-global using Microsoft.Extensions.Logging;
-global using ApplicationExecutionState = Windows.ApplicationModel.Activation.ApplicationExecutionState;
diff --git a/Emerald.Uno/Emerald.Uno/MainPage.xaml b/Emerald.Uno/Emerald.Uno/MainPage.xaml
deleted file mode 100644
index fabe71b5..00000000
--- a/Emerald.Uno/Emerald.Uno/MainPage.xaml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
diff --git a/Emerald.Uno/Emerald.Uno/MainPage.xaml.cs b/Emerald.Uno/Emerald.Uno/MainPage.xaml.cs
deleted file mode 100644
index 7221ba67..00000000
--- a/Emerald.Uno/Emerald.Uno/MainPage.xaml.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace Emerald.Uno;
-
-public sealed partial class MainPage : Page
-{
- public MainPage()
- {
- this.InitializeComponent();
- }
-}
diff --git a/Emerald.Uno/Emerald.Uno/Package.appxmanifest b/Emerald.Uno/Emerald.Uno/Package.appxmanifest
deleted file mode 100644
index 4a56eba6..00000000
--- a/Emerald.Uno/Emerald.Uno/Package.appxmanifest
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
-
-
-
- Emerald.Uno
- Emerald.Uno
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Emerald.Uno/Emerald.Uno/Platforms/Desktop/Program.cs b/Emerald.Uno/Emerald.Uno/Platforms/Desktop/Program.cs
deleted file mode 100644
index fa9a1876..00000000
--- a/Emerald.Uno/Emerald.Uno/Platforms/Desktop/Program.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using Uno.UI.Runtime.Skia;
-
-namespace Emerald.Uno;
-
-public class Program
-{
- [STAThread]
- public static void Main(string[] args)
- {
- var host = SkiaHostBuilder.Create()
- .App(() => new App())
- .UseX11()
- .UseLinuxFrameBuffer()
- .UseMacOS()
- .UseWindows()
- .Build();
-
- host.Run();
- }
-}
diff --git a/Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Entitlements.plist b/Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Entitlements.plist
deleted file mode 100644
index 24c31036..00000000
--- a/Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Entitlements.plist
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Info.plist b/Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Info.plist
deleted file mode 100644
index 1bb02ddc..00000000
--- a/Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Info.plist
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
- UIDeviceFamily
-
- 2
-
- LSApplicationCategoryType
- public.app-category.utilities
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- XSAppIconAssets
- Assets.xcassets/icon.appiconset
-
-
-
-
diff --git a/Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Main.maccatalyst.cs b/Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Main.maccatalyst.cs
deleted file mode 100644
index 123635ea..00000000
--- a/Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Main.maccatalyst.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using UIKit;
-
-namespace Emerald.Uno.MacCatalyst;
-
-public class EntryPoint
-{
- // This is the main entry point of the application.
- public static void Main(string[] args)
- {
- // if you want to use a different Application Delegate class from "AppDelegate"
- // you can specify it here.
- UIApplication.Main(args, null, typeof(App));
- }
-}
diff --git a/Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Media.xcassets/LaunchImages.launchimage/Contents.json b/Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Media.xcassets/LaunchImages.launchimage/Contents.json
deleted file mode 100644
index 69555e44..00000000
--- a/Emerald.Uno/Emerald.Uno/Platforms/MacCatalyst/Media.xcassets/LaunchImages.launchimage/Contents.json
+++ /dev/null
@@ -1,58 +0,0 @@
-{
- "images": [
- {
- "orientation": "portrait",
- "extent": "full-screen",
- "minimum-system-version": "7.0",
- "scale": "2x",
- "size": "640x960",
- "idiom": "iphone"
- },
- {
- "orientation": "portrait",
- "extent": "full-screen",
- "minimum-system-version": "7.0",
- "subtype": "retina4",
- "scale": "2x",
- "size": "640x1136",
- "idiom": "iphone"
- },
- {
- "orientation": "portrait",
- "extent": "full-screen",
- "minimum-system-version": "7.0",
- "scale": "1x",
- "size": "768x1024",
- "idiom": "ipad"
- },
- {
- "orientation": "landscape",
- "extent": "full-screen",
- "minimum-system-version": "7.0",
- "scale": "1x",
- "size": "1024x768",
- "idiom": "ipad"
- },
- {
- "orientation": "portrait",
- "extent": "full-screen",
- "minimum-system-version": "7.0",
- "scale": "2x",
- "size": "1536x2048",
- "idiom": "ipad"
- },
- {
- "orientation": "landscape",
- "extent": "full-screen",
- "minimum-system-version": "7.0",
- "scale": "2x",
- "size": "2048x1536",
- "idiom": "ipad"
- }
- ],
- "properties": {},
- "info": {
- "version": 1,
- "author": ""
- }
-}
\ No newline at end of file
diff --git a/Emerald.Uno/Emerald.Uno/Properties/launchSettings.json b/Emerald.Uno/Emerald.Uno/Properties/launchSettings.json
deleted file mode 100644
index 3b3d93a5..00000000
--- a/Emerald.Uno/Emerald.Uno/Properties/launchSettings.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "iisSettings": {
- "windowsAuthentication": false,
- "anonymousAuthentication": true,
- "iisExpress": {
- "applicationUrl": "http://localhost:8080",
- "sslPort": 0
- }
- },
- "profiles": {
- "Emerald.Uno (Desktop)": {
- "commandName": "Project",
- "compatibleTargetFramework": "desktop"
- },
- "Emerald.Uno (Desktop WSL2)": {
- "commandName": "WSL2",
- "commandLineArgs": "{ProjectDir}/bin/Debug/net8.0-desktop/Emerald.Uno.dll",
- "distributionName": "",
- "compatibleTargetFramework": "desktop"
- }
- }
-}
diff --git a/Emerald.Uno/Emerald.Uno/ReadMe.md b/Emerald.Uno/Emerald.Uno/ReadMe.md
deleted file mode 100644
index 93482da2..00000000
--- a/Emerald.Uno/Emerald.Uno/ReadMe.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# Getting Started
-
-Welcome to the Uno Platform!
-
-To discover how to get started with your new app: https://aka.platform.uno/get-started
-
-For more information on how to use the Uno.Sdk or upgrade Uno Platform packages in your solution: https://aka.platform.uno/using-uno-sdk
\ No newline at end of file
diff --git a/Emerald.Uno/Emerald.Uno/Strings/en/Resources.resw b/Emerald.Uno/Emerald.Uno/Strings/en/Resources.resw
deleted file mode 100644
index 2723b3c3..00000000
--- a/Emerald.Uno/Emerald.Uno/Strings/en/Resources.resw
+++ /dev/null
@@ -1,123 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- Emerald.Uno-en
-
-
diff --git a/Emerald.Uno/Emerald.Uno/app.manifest b/Emerald.Uno/Emerald.Uno/app.manifest
deleted file mode 100644
index a61e665f..00000000
--- a/Emerald.Uno/Emerald.Uno/app.manifest
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- true/PM
- PerMonitorV2, PerMonitor
-
-
-
diff --git a/Emerald.Uno/global.json b/Emerald.Uno/global.json
deleted file mode 100644
index ce7228cb..00000000
--- a/Emerald.Uno/global.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- // To update the version of Uno please update the version of the Uno.Sdk here. See https://aka.platform.uno/upgrade-uno-packages for more information.
- "msbuild-sdks": {
- "Uno.Sdk": "5.2.175"
- },
- "sdk": {
- "allowPrerelease": false
- }
-}
From 28eb041f199e131e9f8f6f5b70a0cb3c25646b91 Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Thu, 18 Jul 2024 17:31:17 +0100
Subject: [PATCH 20/61] Add universal solution
---
.editorconfig | 173 +++++++++-
.github/ISSUE_TEMPLATE/bug_report.yml | 101 ++++--
.github/ISSUE_TEMPLATE/feature_request.yml | 57 ++--
.github/ISSUE_TEMPLATE/sample/bug_report.yml | 83 +++++
.github/ISSUE_TEMPLATE/sample/config.yml | 1 +
.../ISSUE_TEMPLATE/sample/feature_request.yml | 39 +++
.github/ISSUE_TEMPLATE/sample/spec.yml | 80 +++++
.github/Install-WindowsSdkISO.ps1 | 314 ++++++++++++++++++
.github/dependabot.yml | 11 +
.github/steps/install_dependencies/action.yml | 45 +++
.github/workflows/ci.yml | 36 ++
.gitignore | 47 ++-
.vscode/extensions.json | 5 +
.vscode/launch.json | 35 ++
.vscode/settings.json | 10 +
.vscode/tasks.json | 31 ++
.vsconfig | 19 ++
Directory.Build.props | 23 ++
Directory.Build.targets | 2 +
Directory.Packages.props | 9 +
Emerald.sln | 149 +--------
Emerald/App.xaml | 19 ++
Emerald/App.xaml.cs | 62 ++++
Emerald/Assets/Icons/icon.svg | 42 +++
Emerald/Assets/Icons/icon_foreground.svg | 137 ++++++++
Emerald/Assets/SharedAssets.md | 32 ++
Emerald/Assets/Splash/splash_screen.svg | 137 ++++++++
Emerald/Emerald.csproj | 44 +++
Emerald/GlobalUsings.cs | 7 +
Emerald/MainPage.xaml | 14 +
Emerald/MainPage.xaml.cs | 9 +
Emerald/Package.appxmanifest | 43 +++
Emerald/Platforms/Desktop/Program.cs | 19 ++
.../Platforms/MacCatalyst/Entitlements.plist | 6 +
Emerald/Platforms/MacCatalyst/Info.plist | 26 ++
.../Platforms/MacCatalyst/Main.maccatalyst.cs | 13 +
.../LaunchImages.launchimage/Contents.json | 58 ++++
.../PublishProfiles/win-arm64.pubxml | 22 ++
.../Properties/PublishProfiles/win-x64.pubxml | 22 ++
.../Properties/PublishProfiles/win-x86.pubxml | 22 ++
Emerald/Properties/launchSettings.json | 31 ++
Emerald/ReadMe.md | 7 +
Emerald/Strings/en/Resources.resw | 123 +++++++
Emerald/app.manifest | 25 ++
global.json | 9 +
45 files changed, 1980 insertions(+), 219 deletions(-)
create mode 100644 .github/ISSUE_TEMPLATE/sample/bug_report.yml
create mode 100644 .github/ISSUE_TEMPLATE/sample/config.yml
create mode 100644 .github/ISSUE_TEMPLATE/sample/feature_request.yml
create mode 100644 .github/ISSUE_TEMPLATE/sample/spec.yml
create mode 100644 .github/Install-WindowsSdkISO.ps1
create mode 100644 .github/dependabot.yml
create mode 100644 .github/steps/install_dependencies/action.yml
create mode 100644 .github/workflows/ci.yml
create mode 100644 .vscode/extensions.json
create mode 100644 .vscode/launch.json
create mode 100644 .vscode/settings.json
create mode 100644 .vscode/tasks.json
create mode 100644 .vsconfig
create mode 100644 Directory.Build.props
create mode 100644 Directory.Build.targets
create mode 100644 Directory.Packages.props
create mode 100644 Emerald/App.xaml
create mode 100644 Emerald/App.xaml.cs
create mode 100644 Emerald/Assets/Icons/icon.svg
create mode 100644 Emerald/Assets/Icons/icon_foreground.svg
create mode 100644 Emerald/Assets/SharedAssets.md
create mode 100644 Emerald/Assets/Splash/splash_screen.svg
create mode 100644 Emerald/Emerald.csproj
create mode 100644 Emerald/GlobalUsings.cs
create mode 100644 Emerald/MainPage.xaml
create mode 100644 Emerald/MainPage.xaml.cs
create mode 100644 Emerald/Package.appxmanifest
create mode 100644 Emerald/Platforms/Desktop/Program.cs
create mode 100644 Emerald/Platforms/MacCatalyst/Entitlements.plist
create mode 100644 Emerald/Platforms/MacCatalyst/Info.plist
create mode 100644 Emerald/Platforms/MacCatalyst/Main.maccatalyst.cs
create mode 100644 Emerald/Platforms/MacCatalyst/Media.xcassets/LaunchImages.launchimage/Contents.json
create mode 100644 Emerald/Platforms/Windows/Properties/PublishProfiles/win-arm64.pubxml
create mode 100644 Emerald/Platforms/Windows/Properties/PublishProfiles/win-x64.pubxml
create mode 100644 Emerald/Platforms/Windows/Properties/PublishProfiles/win-x86.pubxml
create mode 100644 Emerald/Properties/launchSettings.json
create mode 100644 Emerald/ReadMe.md
create mode 100644 Emerald/Strings/en/Resources.resw
create mode 100644 Emerald/app.manifest
create mode 100644 global.json
diff --git a/.editorconfig b/.editorconfig
index ea0c3b57..b947be64 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,22 +1,167 @@
-[*.cs]
+; This file is for unifying the coding style for different editors and IDEs.
+; More information at http://editorconfig.org
-# CS8618: Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
-dotnet_diagnostic.CS8618.severity = silent
+# This file is the top-most EditorConfig file
+root = true
-dotnet_diagnostic.CS8604.severity = silent
+##########################################
+# Common Settings
+##########################################
-dotnet_diagnostic.CS8622.severity = silent
+[*]
+indent_style = space
+end_of_line = crlf
+trim_trailing_whitespace = true
+insert_final_newline = true
+charset = utf-8
-dotnet_diagnostic.CS8625.severity = silent
+##########################################
+# File Extension Settings
+##########################################
-# CS8602: Dereference of a possibly null reference.
-dotnet_diagnostic.CS8602.severity = silent
+[*.{yml,yaml}]
+indent_size = 2
-# CS8603: Possible null reference return.
-dotnet_diagnostic.CS8603.severity = silent
+[.vsconfig]
+indent_size = 2
+end_of_line = lf
-# CS0252: Possible unintended reference comparison; left hand side needs cast
-dotnet_diagnostic.CS0252.severity = silent
+[*.sln]
+indent_style = tab
+indent_size = 2
-# CS8600: Converting null literal or possible null value to non-nullable type.
-dotnet_diagnostic.CS8600.severity = silent
+[*.{csproj,proj,projitems,shproj}]
+indent_size = 2
+
+[*.{json,slnf}]
+indent_size = 2
+end_of_line = lf
+
+[*.{props,targets}]
+indent_size = 2
+
+[*.xaml]
+indent_size = 2
+charset = utf-8-bom
+
+[*.xml]
+indent_size = 2
+end_of_line = lf
+
+[*.plist]
+indent_size = 2
+indent_style = tab
+end_of_line = lf
+
+[*.manifest]
+indent_size = 2
+
+[*.appxmanifest]
+indent_size = 2
+
+[*.{json,css,webmanifest}]
+indent_size = 2
+end_of_line = lf
+
+[web.config]
+indent_size = 2
+end_of_line = lf
+
+[*.sh]
+indent_size = 2
+end_of_line = lf
+
+[*.cs]
+# EOL should be normalized by Git. See https://github.com/dotnet/format/issues/1099
+end_of_line = unset
+
+# See https://github.com/dotnet/roslyn/issues/20356#issuecomment-310143926
+trim_trailing_whitespace = false
+
+tab_width = 4
+indent_size = 4
+
+# Sort using and Import directives with System.* appearing first
+dotnet_sort_system_directives_first = true
+
+# Avoid "this." and "Me." if not necessary
+dotnet_style_qualification_for_field = false:suggestion
+dotnet_style_qualification_for_property = false:suggestion
+dotnet_style_qualification_for_method = false:suggestion
+dotnet_style_qualification_for_event = false:suggestion
+
+#### Naming styles ####
+
+# Naming rules
+
+dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
+dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
+dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
+
+dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
+dotnet_naming_rule.types_should_be_pascal_case.symbols = types
+dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
+
+dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
+dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
+dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
+
+# Symbol specifications
+
+dotnet_naming_symbols.interface.applicable_kinds = interface
+dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
+dotnet_naming_symbols.interface.required_modifiers =
+
+dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
+dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
+dotnet_naming_symbols.types.required_modifiers =
+
+dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
+dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
+dotnet_naming_symbols.non_field_members.required_modifiers =
+
+# Naming styles
+
+dotnet_naming_style.begins_with_i.required_prefix = I
+dotnet_naming_style.begins_with_i.required_suffix =
+dotnet_naming_style.begins_with_i.word_separator =
+dotnet_naming_style.begins_with_i.capitalization = pascal_case
+
+dotnet_naming_style.pascal_case.required_prefix =
+dotnet_naming_style.pascal_case.required_suffix =
+dotnet_naming_style.pascal_case.word_separator =
+dotnet_naming_style.pascal_case.capitalization = pascal_case
+
+dotnet_naming_style.pascal_case.required_prefix =
+dotnet_naming_style.pascal_case.required_suffix =
+dotnet_naming_style.pascal_case.word_separator =
+dotnet_naming_style.pascal_case.capitalization = pascal_case
+dotnet_style_operator_placement_when_wrapping = beginning_of_line
+dotnet_style_coalesce_expression = true:suggestion
+dotnet_style_null_propagation = true:suggestion
+dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
+dotnet_style_prefer_auto_properties = true:silent
+dotnet_style_object_initializer = true:suggestion
+dotnet_style_collection_initializer = true:suggestion
+dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
+dotnet_style_prefer_conditional_expression_over_assignment = true:silent
+dotnet_style_prefer_conditional_expression_over_return = true:silent
+dotnet_style_explicit_tuple_names = true:suggestion
+dotnet_style_prefer_inferred_tuple_names = true:suggestion
+
+csharp_indent_labels = one_less_than_current
+csharp_using_directive_placement = outside_namespace:silent
+csharp_prefer_simple_using_statement = true:suggestion
+csharp_prefer_braces = true:silent
+csharp_style_namespace_declarations = file_scoped:warning
+csharp_style_prefer_method_group_conversion = true:silent
+csharp_style_prefer_top_level_statements = true:silent
+csharp_style_prefer_primary_constructors = true:suggestion
+csharp_style_expression_bodied_methods = false:silent
+csharp_style_expression_bodied_constructors = false:silent
+csharp_style_expression_bodied_operators = false:silent
+csharp_style_expression_bodied_properties = true:silent
+csharp_style_expression_bodied_indexers = true:silent
+csharp_style_expression_bodied_accessors = true:silent
+csharp_style_expression_bodied_lambdas = true:silent
+csharp_style_expression_bodied_local_functions = false:silent
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 76877e92..f0774448 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -1,52 +1,83 @@
-name: 🐛 Bug Report
-description: Create a bug report to help improve Emerald
-labels: [bug]
-title: "🐛 "
+name: 🐞 Bug
+title: '[BUG] '
+description: File a bug report
+labels: ["bug", "to verify"]
+assignees: []
body:
- - type: checkboxes
+ - type: markdown
attributes:
- label: ⏱️ Before you start...
- options:
- - label: Are you on the latest version of Emerald? You might be using an old version.
- required: true
- - label: Have you checked whether or not a similar issue has already been reported?
- required: true
- - type: textarea
- attributes:
- label: 🪟 What build of Windows is this issue present? (optional)
- description: Windows key + R > winver.exe
- placeholder: build 25174.1010
+ value: |
+ Thanks for taking the time to fill out this bug report! Please make sure to add as much detail as you can.
- type: textarea
+ id: description
attributes:
- label: 🔢 What version of Emerald are you on?
- description: Go to Emerald > Settings > About
+ label: Description
+ description: Please give a detailed description of the issue that you're seeing. You can add screenshots and videos as well.
+ placeholder: Tell us what you see!
validations:
required: true
- type: textarea
+ id: repro-steps
attributes:
- label: 📄 Description
- description: A clear and concise description of what the bug is.
+ label: Steps to Reproduce
+ description: Describe all the steps we need to take to show the behavior that you have observed. Also, include what you expected to happen and what did actually happen.
+ placeholder: |
+ 1. Create a File > New App
+ 2. Add a `Button` like so: ``
+ 3. Click the added button and observe the bug 🐞
+
+ Expected outcome: a bug was added
+ Actual outcome: a ladybug appeared
validations:
required: true
- - type: textarea
+ - type: dropdown
+ id: platform-with-bug
attributes:
- label: 🪜 Steps To Reproduce
- description: Steps to reproduce the behavior.
- placeholder: |
- 1. Go to '....'
- 2. Click on '....'
- 3. Scroll down to '....'
- 4. See the error
+ label: Platform with bug
+ description: What Platform is this bug affecting?
+ options:
+ - Core
+ - Android
+ - iOS
+ - MacCatalyst
+ - Windows
+ - Skia
+ - WebAssembly
+ - Other
validations:
- required: false
- - type: textarea
+ required: true
+
+ - type: dropdown
+ id: platforms-affected
attributes:
- label: 🤔 Expected behavior
- description: A clear and concise description of what you expected to happen.
+ label: Affected platforms
+ description: Select all or any platform that you see this issue on. This helps us determine if it's something platform-specific or in the core. If you were only able to test on 1 platform, please check the last option to inform us about that.
+ multiple: true
+ options:
+ - Android
+ - iOS
+ - MacOS
+ - MacCatalyst
+ - Windows
+ - GTK
+ - Linux Framebuffer
+ - WPF
+ - Skia Desktop
+ - WebAssembly
+ - Other
+ - I was *not* able test on other platforms
validations:
required: true
+
+ - type: textarea
+ id: workaround
+ attributes:
+ label: Did you find any workaround?
+ description: Did you find any workaround for this issue? This can unblock other people while waiting for this issue to be resolved or even give us a hint on how to fix this.
+
- type: textarea
+ id: logs
attributes:
- label: 📸 Assets
- description: |
- A list of assets (errors, screenshots) relevant to the bug.
+ label: Relevant log output
+ description: Please copy and paste any relevant log output. This will be auomatically formatted into code, so no need for back ticks.
+ render: shell
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
index 96fd262d..47b3fe78 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.yml
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -1,44 +1,39 @@
-name: ✨ Feature Request
-description: Request a new feature for Emerald
-labels: [feature request]
-title: "✨ "
+name: Feature Request
+description: Suggest an idea for this project
+labels: ["enhancement"]
+assignees: []
body:
- type: markdown
attributes:
value: |
- ##### ⏱️ Before you start...
- - [ ] Have you checked whether or not a similar feature request has already been reported?
+ Fill in this template with some detail. A detailed description, perhaps supported with some screenshots, mockups, and a (public) API design in pseudo-code.
- type: textarea
+ id: description
attributes:
- label: 📄 Description
- description: A clear and concise description of what your idea is. Include things like possible use cases, drawbacks, etc.
+ label: Description
+ description: Please give us a detailed description of the feature that you envision. Focus on _what_ this feature does, over the _why_ you want this feature. What would be the end-result when implemented? Feel free to add any diagrams, (mocked up) screenshots, or other materials that support your story.
+ placeholder: I would love to have a button that I can make shiny. This is something that is supported on all the underlaying platforms.
validations:
required: true
- type: textarea
+ id: api-changes
attributes:
- label: 🗃️ Alternative solutions
- description: Describe more ways this idea could be implemented.
- validations:
- required: false
- - type: textarea
- attributes:
- label: ✅ Tasks
- description: Give an overview of all the specific things you would like to be changed or implemented.
- value: |
- ```[tasklist]
- ### High Priority
- - [ ] Something
- - [ ] Another thing
- - [ ] https://github.com/link/to/an/issue
- ```
- ```[tasklist]
- ### Nice to have
- - [ ] Something
- - [ ] Another thing
- - [ ] https://github.com/link/to/an/issue
+ label: API Changes
+ description: Include a list of all API changes, additions, subtractions as would be required by your proposal. These APIs should be considered placeholders, so the naming is not as important as getting the concepts correct. If possible you should include some example (pseudo-)code of usage of your new API.
+ placeholder: |
+ ```csharp
+ var button = new Button ();
+ button.MakeShiny = true; // new API
```
+
+ The MakeShiny API works even if the button is already visible.
+ validations:
+ required: true
- type: textarea
+ id: use-case
attributes:
- label: 📸 Assets
- description: |
- A list of assets (screenshots, mockups) relevant to this feature request.
+ label: Intended Use-Case
+ description: Provide a detailed example of where your proposal would be used and for what purpose. Focus on _why_ you want this feature instead of _what_ the feature does.
+ placeholder: I have a situation where I would really want a shiny button to make it stand out from the rest of the plain and boring buttons.
+ validations:
+ required: true
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/sample/bug_report.yml b/.github/ISSUE_TEMPLATE/sample/bug_report.yml
new file mode 100644
index 00000000..f0774448
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/sample/bug_report.yml
@@ -0,0 +1,83 @@
+name: 🐞 Bug
+title: '[BUG] '
+description: File a bug report
+labels: ["bug", "to verify"]
+assignees: []
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Thanks for taking the time to fill out this bug report! Please make sure to add as much detail as you can.
+ - type: textarea
+ id: description
+ attributes:
+ label: Description
+ description: Please give a detailed description of the issue that you're seeing. You can add screenshots and videos as well.
+ placeholder: Tell us what you see!
+ validations:
+ required: true
+ - type: textarea
+ id: repro-steps
+ attributes:
+ label: Steps to Reproduce
+ description: Describe all the steps we need to take to show the behavior that you have observed. Also, include what you expected to happen and what did actually happen.
+ placeholder: |
+ 1. Create a File > New App
+ 2. Add a `Button` like so: ``
+ 3. Click the added button and observe the bug 🐞
+
+ Expected outcome: a bug was added
+ Actual outcome: a ladybug appeared
+ validations:
+ required: true
+ - type: dropdown
+ id: platform-with-bug
+ attributes:
+ label: Platform with bug
+ description: What Platform is this bug affecting?
+ options:
+ - Core
+ - Android
+ - iOS
+ - MacCatalyst
+ - Windows
+ - Skia
+ - WebAssembly
+ - Other
+ validations:
+ required: true
+
+ - type: dropdown
+ id: platforms-affected
+ attributes:
+ label: Affected platforms
+ description: Select all or any platform that you see this issue on. This helps us determine if it's something platform-specific or in the core. If you were only able to test on 1 platform, please check the last option to inform us about that.
+ multiple: true
+ options:
+ - Android
+ - iOS
+ - MacOS
+ - MacCatalyst
+ - Windows
+ - GTK
+ - Linux Framebuffer
+ - WPF
+ - Skia Desktop
+ - WebAssembly
+ - Other
+ - I was *not* able test on other platforms
+ validations:
+ required: true
+
+ - type: textarea
+ id: workaround
+ attributes:
+ label: Did you find any workaround?
+ description: Did you find any workaround for this issue? This can unblock other people while waiting for this issue to be resolved or even give us a hint on how to fix this.
+
+ - type: textarea
+ id: logs
+ attributes:
+ label: Relevant log output
+ description: Please copy and paste any relevant log output. This will be auomatically formatted into code, so no need for back ticks.
+ render: shell
diff --git a/.github/ISSUE_TEMPLATE/sample/config.yml b/.github/ISSUE_TEMPLATE/sample/config.yml
new file mode 100644
index 00000000..3ba13e0c
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/sample/config.yml
@@ -0,0 +1 @@
+blank_issues_enabled: false
diff --git a/.github/ISSUE_TEMPLATE/sample/feature_request.yml b/.github/ISSUE_TEMPLATE/sample/feature_request.yml
new file mode 100644
index 00000000..47b3fe78
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/sample/feature_request.yml
@@ -0,0 +1,39 @@
+name: Feature Request
+description: Suggest an idea for this project
+labels: ["enhancement"]
+assignees: []
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Fill in this template with some detail. A detailed description, perhaps supported with some screenshots, mockups, and a (public) API design in pseudo-code.
+ - type: textarea
+ id: description
+ attributes:
+ label: Description
+ description: Please give us a detailed description of the feature that you envision. Focus on _what_ this feature does, over the _why_ you want this feature. What would be the end-result when implemented? Feel free to add any diagrams, (mocked up) screenshots, or other materials that support your story.
+ placeholder: I would love to have a button that I can make shiny. This is something that is supported on all the underlaying platforms.
+ validations:
+ required: true
+ - type: textarea
+ id: api-changes
+ attributes:
+ label: API Changes
+ description: Include a list of all API changes, additions, subtractions as would be required by your proposal. These APIs should be considered placeholders, so the naming is not as important as getting the concepts correct. If possible you should include some example (pseudo-)code of usage of your new API.
+ placeholder: |
+ ```csharp
+ var button = new Button ();
+ button.MakeShiny = true; // new API
+ ```
+
+ The MakeShiny API works even if the button is already visible.
+ validations:
+ required: true
+ - type: textarea
+ id: use-case
+ attributes:
+ label: Intended Use-Case
+ description: Provide a detailed example of where your proposal would be used and for what purpose. Focus on _why_ you want this feature instead of _what_ the feature does.
+ placeholder: I have a situation where I would really want a shiny button to make it stand out from the rest of the plain and boring buttons.
+ validations:
+ required: true
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/sample/spec.yml b/.github/ISSUE_TEMPLATE/sample/spec.yml
new file mode 100644
index 00000000..6abc3944
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/sample/spec.yml
@@ -0,0 +1,80 @@
+name: Spec
+description: An official specification for enhancements.
+labels: ["enhancement"]
+assignees: []
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Thank you for taking the time to provide us with a detailed specification of your idea.
+
+ In a spec you will give a detailed and complete representation of the (public) APIs that are implemented as part of this change. Additionally please think about backwards compatibility, breaking changes, supported platforms and the difficulty.
+ - type: textarea
+ id: description
+ attributes:
+ label: Description
+ description: Provide a concise description of the feature and the motivation for adding it. This can be a modified version from the feature request prior to this.
+ validations:
+ required: true
+ - type: textarea
+ id: api-changes
+ attributes:
+ label: (Public) API Changes
+ description: Include a complete list of all API changes, additions, subtractions as would be required by your proposal.
+ value: |
+ # [ class ]
+
+ ## Properties
+
+ | API | Description |
+ | ------------- | ------------- |
+ | [name] | Gets or sets [description]. |
+
+ ## Events
+
+ | API | Description |
+ | ------------- | ------------- |
+ | [name] | [API documentation/description] |
+ validations:
+ required: true
+ - type: textarea
+ id: usage-scenarios
+ attributes:
+ label: Usage Scenarios
+ description: Give us a couple of scenarios that demonstrate how developers would consume the above APIs.
+ placeholder: |
+ # C# Example
+ ```csharp
+ var thing = new MyNewControl();
+ thing.BeAwesome = true;
+ thing.Color = Colors.Cornsilk;
+ ```
+
+ # XAML Example
+ ```xaml
+
+ ```
+ validations:
+ required: true
+ - type: textarea
+ id: backwards-compatibility
+ attributes:
+ label: Backward Compatibility
+ description: Please describe here anything in terms of backwards compatibility. Will there be breaking changes? Do we need to update dependencies to support this? What are the minimum supported API/OS levels? And lastly, are there any platforms that can't support this and why?
+ placeholder: |
+ Minimum API levels?
+ Breaking changes?
+ Unsupported platforms?
+ validations:
+ required: true
+ - type: dropdown
+ id: difficulty
+ attributes:
+ label: Difficulty
+ description: What do you feel will be the difficulty of this change all things considering? No exact science, just your gut feeling.
+ options:
+ - Low
+ - Medium
+ - High
+ validations:
+ required: true
\ No newline at end of file
diff --git a/.github/Install-WindowsSdkISO.ps1 b/.github/Install-WindowsSdkISO.ps1
new file mode 100644
index 00000000..f4964d23
--- /dev/null
+++ b/.github/Install-WindowsSdkISO.ps1
@@ -0,0 +1,314 @@
+[CmdletBinding()]
+param([Parameter(Mandatory=$true)]
+ [string]$buildNumber)
+
+# Ensure the error action preference is set to the default for PowerShell3, 'Stop'
+$ErrorActionPreference = 'Stop'
+
+# Constants
+$WindowsSDKOptions = @("OptionId.UWPCpp")
+$WindowsSDKRegPath = "HKLM:\Software\Microsoft\Windows Kits\Installed Roots"
+$WindowsSDKRegRootKey = "KitsRoot10"
+$WindowsSDKVersion = "10.0.$buildNumber.0"
+$WindowsSDKInstalledRegPath = "$WindowsSDKRegPath\$WindowsSDKVersion\Installed Options"
+$StrongNameRegPath = "HKLM:\SOFTWARE\Microsoft\StrongName\Verification"
+$PublicKeyTokens = @("31bf3856ad364e35")
+
+function Download-File
+{
+ param ([string] $outDir,
+ [string] $downloadUrl,
+ [string] $downloadName)
+
+ $downloadPath = Join-Path $outDir "$downloadName.download"
+ $downloadDest = Join-Path $outDir $downloadName
+ $downloadDestTemp = Join-Path $outDir "$downloadName.tmp"
+
+ Write-Host -NoNewline "Downloading $downloadName..."
+
+ try
+ {
+ $webclient = new-object System.Net.WebClient
+ $webclient.DownloadFile($downloadUrl, $downloadPath)
+ }
+ catch [System.Net.WebException]
+ {
+ Write-Host
+ Write-Warning "Failed to fetch updated file from $downloadUrl"
+ if (!(Test-Path $downloadDest))
+ {
+ throw "$downloadName was not found at $downloadDest"
+ }
+ else
+ {
+ Write-Warning "$downloadName may be out of date"
+ }
+ }
+
+ Unblock-File $downloadPath
+
+ $downloadDestTemp = $downloadPath;
+
+ # Delete and rename to final dest
+ if (Test-Path -PathType Container $downloadDest)
+ {
+ [System.IO.Directory]::Delete($downloadDest, $true)
+ }
+
+ Move-Item -Force $downloadDestTemp $downloadDest
+ Write-Host "Done"
+
+ return $downloadDest
+}
+
+function Get-ISODriveLetter
+{
+ param ([string] $isoPath)
+
+ $diskImage = Get-DiskImage -ImagePath $isoPath
+ if ($diskImage)
+ {
+ $volume = Get-Volume -DiskImage $diskImage
+
+ if ($volume)
+ {
+ $driveLetter = $volume.DriveLetter
+ if ($driveLetter)
+ {
+ $driveLetter += ":"
+ return $driveLetter
+ }
+ }
+ }
+
+ return $null
+}
+
+function Mount-ISO
+{
+ param ([string] $isoPath)
+
+ # Check if image is already mounted
+ $isoDrive = Get-ISODriveLetter $isoPath
+
+ if (!$isoDrive)
+ {
+ Mount-DiskImage -ImagePath $isoPath -StorageType ISO | Out-Null
+ }
+
+ $isoDrive = Get-ISODriveLetter $isoPath
+ Write-Verbose "$isoPath mounted to ${isoDrive}:"
+}
+
+function Dismount-ISO
+{
+ param ([string] $isoPath)
+
+ $isoDrive = (Get-DiskImage -ImagePath $isoPath | Get-Volume).DriveLetter
+
+ if ($isoDrive)
+ {
+ Write-Verbose "$isoPath dismounted"
+ Dismount-DiskImage -ImagePath $isoPath | Out-Null
+ }
+}
+
+function Disable-StrongName
+{
+ param ([string] $publicKeyToken = "*")
+
+ reg ADD "HKLM\SOFTWARE\Microsoft\StrongName\Verification\*,$publicKeyToken" /f | Out-Null
+ if ($env:PROCESSOR_ARCHITECTURE -eq "AMD64")
+ {
+ reg ADD "HKLM\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\*,$publicKeyToken" /f | Out-Null
+ }
+}
+
+function Test-Admin
+{
+ $identity = [Security.Principal.WindowsIdentity]::GetCurrent()
+ $principal = New-Object Security.Principal.WindowsPrincipal $identity
+ $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
+}
+
+function Test-RegistryPathAndValue
+{
+ param (
+ [parameter(Mandatory=$true)]
+ [ValidateNotNullOrEmpty()]
+ [string] $path,
+ [parameter(Mandatory=$true)]
+ [ValidateNotNullOrEmpty()]
+ [string] $value)
+
+ try
+ {
+ if (Test-Path $path)
+ {
+ Get-ItemProperty -Path $path | Select-Object -ExpandProperty $value -ErrorAction Stop | Out-Null
+ return $true
+ }
+ }
+ catch
+ {
+ }
+
+ return $false
+}
+
+function Test-InstallWindowsSDK
+{
+ $retval = $true
+
+ if (Test-RegistryPathAndValue -Path $WindowsSDKRegPath -Value $WindowsSDKRegRootKey)
+ {
+ # A Windows SDK is installed
+ # Is an SDK of our version installed with the options we need?
+ if (Test-RegistryPathAndValue -Path $WindowsSDKInstalledRegPath -Value "$WindowsSDKOptions")
+ {
+ # It appears we have what we need. Double check the disk
+ $sdkRoot = Get-ItemProperty -Path $WindowsSDKRegPath | Select-Object -ExpandProperty $WindowsSDKRegRootKey
+ if ($sdkRoot)
+ {
+ if (Test-Path $sdkRoot)
+ {
+ $refPath = Join-Path $sdkRoot "References\$WindowsSDKVersion"
+ if (Test-Path $refPath)
+ {
+ $umdPath = Join-Path $sdkRoot "UnionMetadata\$WindowsSDKVersion"
+ if (Test-Path $umdPath)
+ {
+ # Pretty sure we have what we need
+ $retval = $false
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return $retval
+}
+
+function Test-InstallStrongNameHijack
+{
+ foreach($publicKeyToken in $PublicKeyTokens)
+ {
+ $key = "$StrongNameRegPath\*,$publicKeyToken"
+ if (!(Test-Path $key))
+ {
+ return $true
+ }
+ }
+
+ return $false
+}
+
+Write-Host -NoNewline "Checking for installed Windows SDK $WindowsSDKVersion..."
+$InstallWindowsSDK = Test-InstallWindowsSDK
+if ($InstallWindowsSDK)
+{
+ Write-Host "Installation required"
+}
+else
+{
+ Write-Host "INSTALLED"
+}
+
+$StrongNameHijack = Test-InstallStrongNameHijack
+Write-Host -NoNewline "Checking if StrongName bypass required..."
+
+if ($StrongNameHijack)
+{
+ Write-Host "REQUIRED"
+}
+else
+{
+ Write-Host "Done"
+}
+
+if ($StrongNameHijack -or $InstallWindowsSDK)
+{
+ if (!(Test-Admin))
+ {
+ Write-Host
+ throw "ERROR: Elevation required"
+ }
+}
+
+if ($InstallWindowsSDK)
+{
+ # Static(ish) link for Windows SDK
+ # Note: there is a delay from Windows SDK announcements to availability via the static link
+ $uri = "https://go.microsoft.com/fwlink/?prd=11966&pver=1.0&plcid=0x409&clcid=0x409&ar=Flight&sar=Sdsurl&o1=$buildNumber"
+
+ if($buildNumber -eq 18362)
+ {
+ # Workaround for removed SDK
+ $uri = "https://go.microsoft.com/fwlink/?linkid=2083448";
+ }
+
+ if($buildNumber -eq 19041)
+ {
+ # Workaround for missing SDK
+ $uri = "https://software-download.microsoft.com/download/pr/19041.1.191206-1406.vb_release_WindowsSDK.iso";
+ }
+
+ if ($env:TEMP -eq $null)
+ {
+ $env:TEMP = Join-Path $env:SystemDrive 'temp'
+ }
+
+ $winsdkTempDir = Join-Path $env:TEMP "WindowsSDK"
+
+ if (![System.IO.Directory]::Exists($winsdkTempDir))
+ {
+ [void][System.IO.Directory]::CreateDirectory($winsdkTempDir)
+ }
+
+ $file = "winsdk_$buildNumber.iso"
+
+ Write-Verbose "Getting WinSDK from $uri"
+ $downloadFile = Download-File $winsdkTempDir $uri $file
+
+ # TODO Check if zip, exe, iso, etc.
+ try
+ {
+ Write-Host -NoNewline "Mounting ISO $file..."
+ Mount-ISO $downloadFile
+ Write-Host "Done"
+
+ $isoDrive = Get-ISODriveLetter $downloadFile
+
+ if (Test-Path $isoDrive)
+ {
+ Write-Host -NoNewLine "Installing WinSDK..."
+
+ $setupPath = Join-Path "$isoDrive" "WinSDKSetup.exe"
+ Start-Process -Wait $setupPath "/features $WindowsSDKOptions /q"
+ Write-Host "Done"
+ }
+ else
+ {
+ throw "Could not find mounted ISO at ${isoDrive}"
+ }
+ }
+ finally
+ {
+ Write-Host -NoNewline "Dismounting ISO $file..."
+ #Dismount-ISO $downloadFile
+ Write-Host "Done"
+ }
+}
+
+if ($StrongNameHijack)
+{
+ Write-Host -NoNewline "Disabling StrongName for Windows SDK..."
+
+ foreach($key in $PublicKeyTokens)
+ {
+ Disable-StrongName $key
+ }
+
+ Write-Host "Done"
+}
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 00000000..1147b3ac
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,11 @@
+version: 2
+updates:
+- package-ecosystem: nuget
+ directory: "/"
+ schedule:
+ interval: weekly
+ time: "10:00"
+ open-pull-requests-limit: 10
+ labels:
+ - kind/dependency
+ - do-not-merge/work-in-progress
diff --git a/.github/steps/install_dependencies/action.yml b/.github/steps/install_dependencies/action.yml
new file mode 100644
index 00000000..f8cd87b1
--- /dev/null
+++ b/.github/steps/install_dependencies/action.yml
@@ -0,0 +1,45 @@
+name: Install Dependencies
+description: ""
+
+inputs:
+ target-platform:
+ description: 'The platform to install dependencies for. #See available values at https://platform.uno/docs/articles/external/uno.check/doc/using-uno-check.html'
+ required: false
+ default: 'all'
+ dotnet-version:
+ description: 'Installs and sets the .NET SDK Version'
+ required: false
+ default: '8.0.x'
+ sdkVersion:
+ description: 'The version of the Windows Sdk'
+ required: false
+ default: '19041'
+
+runs:
+ using: "composite"
+ steps:
+ # Install .NET
+ - name: Setup .NET ${{ inputs.dotnet-version }}
+ uses: actions/setup-dotnet@v3
+ with:
+ dotnet-version: '${{ inputs.dotnet-version }}'
+
+ # Install Windows SDK
+ - name: Install Windows SDK ${{ inputs.sdkVersion }}
+ shell: pwsh
+ if: ${{ runner.os == 'Windows' }}
+ run: .\.github\Install-WindowsSdkISO.ps1 ${{ inputs.sdkVersion }}
+
+ # Run Uno.Check
+ - name: Install ${{ inputs.target-platform }} Workloads
+ shell: pwsh
+ run: |
+ dotnet tool install -g uno.check
+ ("${{ inputs.target-platform }} ".Split(' ') | ForEach-Object {
+ $target = $_.Replace("_win", "").Replace("_macos", "")
+ if (![string]::IsNullOrEmpty($target)) {
+ echo "target: $target"
+ uno-check -v --ci --non-interactive --fix --target $target --skip vswin --skip vsmac --skip xcode --skip vswinworkloads --skip androidemulator --skip dotnetnewunotemplates
+ echo "uno-check finished for target: $target "
+ }
+ })
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000..3796bf27
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,36 @@
+name: CI
+
+on:
+ push:
+ branches:
+ - main
+ - release/**
+
+ pull_request:
+ types: [opened, synchronize, reopened]
+ branches:
+ - main
+ - release/**
+env:
+ STEP_TIMEOUT_MINUTES: 60
+
+jobs:
+ smoke_test:
+ name: Smoke Test (Debug Build of Emerald)
+ runs-on: windows-latest
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
+ - name: Install Dependencies
+ timeout-minutes: ${{ fromJSON(env.STEP_TIMEOUT_MINUTES) }}
+ uses: "./.github/steps/install_dependencies"
+
+ # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
+ - name: Setup MSBuild
+ uses: microsoft/setup-msbuild@v1.3.1
+
+ - name: Build Emerald (Debug)
+ shell: pwsh
+ run: msbuild ./Emerald/Emerald.csproj /r
diff --git a/.gitignore b/.gitignore
index 163adce0..ef88c205 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,7 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
-## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
+## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
# User-specific files
*.rsuser
@@ -29,7 +29,6 @@ x86/
bld/
[Bb]in/
[Oo]bj/
-[Oo]ut/
[Ll]og/
[Ll]ogs/
@@ -91,6 +90,7 @@ StyleCopReport.xml
*.tmp_proj
*_wpftmp.csproj
*.log
+*.tlog
*.vspscc
*.vssscc
.builds
@@ -294,6 +294,17 @@ node_modules/
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
+# Visual Studio 6 auto-generated project file (contains which files were open etc.)
+*.vbp
+
+# Visual Studio 6 workspace and project file (working project files containing files to include in project)
+*.dsw
+*.dsp
+
+# Visual Studio 6 technical files
+*.ncb
+*.aps
+
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
@@ -350,6 +361,9 @@ ASALocalRun/
# Local History for Visual Studio
.localhistory/
+# Visual Studio History (VSHistory) files
+.vshistory/
+
# BeatPulse healthcheck temp database
healthchecksdb
@@ -361,6 +375,29 @@ MigrationBackup/
# Fody - auto-generated XML schema
FodyWeavers.xsd
-/Emerald.App/Emerald.App/MsalClientID.txt
-/Emerald.Core/MsalClientID.txt
-/Emerald.App/Emerald.App/GithubClientID.txt
+
+# VS Code files for those working on multiple tools
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+*.code-workspace
+
+# Local History for Visual Studio Code
+.history/
+
+# Windows Installer files from build outputs
+*.cab
+*.msi
+*.msix
+*.msm
+*.msp
+
+# JetBrains Rider
+*.sln.iml
+
+# Single Target Config
+solution-config.props
+# Publish Profiles
+!**/Properties/PublishProfiles/*.pubxml
\ No newline at end of file
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 00000000..a63ad400
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,5 @@
+{
+ "recommendations": [
+ "unoplatform.vscode"
+ ],
+}
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 00000000..1d6e6504
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,35 @@
+{
+ // Use IntelliSense to find out which attributes exist for C# debugging
+ // Use hover for the description of the existing attributes
+ // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "Uno Platform Mobile",
+ "type": "Uno",
+ "request": "launch",
+ // any Uno* task will do, this is simply to satisfy vscode requirement when a launch.json is present
+ "preLaunchTask": "Uno: android | Debug | android-x64"
+ },
+ {
+ // Use IntelliSense to find out which attributes exist for C# debugging
+ // Use hover for the description of the existing attributes
+ // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
+ "name": "Uno Platform Desktop (Debug)",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build-desktop",
+ // If you have changed target frameworks, make sure to update the program path.
+ "program": "${workspaceFolder}/Emerald/bin/Debug/net8.0-desktop/Emerald.dll",
+ "args": [],
+ "launchSettingsProfile": "Emerald (Desktop)",
+ "env": {
+ "DOTNET_MODIFIABLE_ASSEMBLIES": "debug"
+ },
+ "cwd": "${workspaceFolder}/Emerald",
+ // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
+ "console": "internalConsole",
+ "stopAtEntry": false
+ },
+ ]
+}
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 00000000..3405922d
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,10 @@
+{
+ "explorer.fileNesting.enabled": true,
+ "explorer.fileNesting.expand": false,
+ "explorer.fileNesting.patterns": {
+ "*.xaml": "$(capture).xaml.cs"
+ },
+ "files.associations": {
+ "global.json": "jsonc"
+ }
+}
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
new file mode 100644
index 00000000..ac5be062
--- /dev/null
+++ b/.vscode/tasks.json
@@ -0,0 +1,31 @@
+{
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "label": "build-desktop",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "build",
+ "${workspaceFolder}/Emerald/Emerald.csproj",
+ "/property:GenerateFullPaths=true",
+ "/property:TargetFramework=net8.0-desktop",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "publish-desktop",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "publish",
+ "${workspaceFolder}/Emerald/Emerald.csproj",
+ "/property:GenerateFullPaths=true",
+ "/property:TargetFramework=net8.0-desktop",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ }
+ ]
+}
diff --git a/.vsconfig b/.vsconfig
new file mode 100644
index 00000000..8e1dd5e5
--- /dev/null
+++ b/.vsconfig
@@ -0,0 +1,19 @@
+{
+ "version": "1.0",
+ "components": [
+ "Microsoft.VisualStudio.Component.CoreEditor",
+ "Microsoft.VisualStudio.Workload.CoreEditor",
+ "Microsoft.NetCore.Component.SDK",
+ "Microsoft.NetCore.Component.DevelopmentTools",
+ "Microsoft.Net.ComponentGroup.DevelopmentPrerequisites",
+ "Microsoft.VisualStudio.Component.TextTemplating",
+ "Microsoft.VisualStudio.ComponentGroup.MSIX.Packaging",
+ "Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites",
+ "Microsoft.VisualStudio.Component.Debugger.JustInTime",
+ "Microsoft.VisualStudio.Workload.ManagedDesktop",
+ "Microsoft.VisualStudio.Component.MonoDebugger",
+ "Microsoft.VisualStudio.ComponentGroup.Maui.All",
+ "Microsoft.VisualStudio.Workload.NetCrossPlat",
+ "Microsoft.VisualStudio.Workload.NetCoreTools"
+ ]
+}
diff --git a/Directory.Build.props b/Directory.Build.props
new file mode 100644
index 00000000..69a93b76
--- /dev/null
+++ b/Directory.Build.props
@@ -0,0 +1,23 @@
+
+
+ enable
+ enable
+ true
+
+
+ $(NoWarn);NU1507;NETSDK1201;PRI257
+
+
+
+
+ 4.1.24
+ 6.0.24
+ 5.0.13
+ 5.2.14
+
+
diff --git a/Directory.Build.targets b/Directory.Build.targets
new file mode 100644
index 00000000..f75adf7e
--- /dev/null
+++ b/Directory.Build.targets
@@ -0,0 +1,2 @@
+
+
diff --git a/Directory.Packages.props b/Directory.Packages.props
new file mode 100644
index 00000000..0cea764d
--- /dev/null
+++ b/Directory.Packages.props
@@ -0,0 +1,9 @@
+
+
+
+
+
diff --git a/Emerald.sln b/Emerald.sln
index d6e0b24a..c11b44ea 100644
--- a/Emerald.sln
+++ b/Emerald.sln
@@ -1,155 +1,36 @@
+
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
-VisualStudioVersion = 17.2.32602.215
+VisualStudioVersion = 17.11.35103.136
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Emerald.Core", "Emerald.Core\Emerald.Core.csproj", "{90389A34-9F42-4489-871A-DC726D74854D}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Emerald", "Emerald\Emerald.csproj", "{9D3213F4-E514-4E7D-872A-725DB4872436}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Emerald.App", "Emerald.App\Emerald.App\Emerald.App.csproj", "{F2065381-1265-4FEB-841A-E5798E62761D}"
-EndProject
-Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "Package.WinUI", "Emerald.App\Emerald.App.Package\Package.WinUI.wapproj", "{59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{2BB1A64C-5C5D-415D-B816-66E2152E2703}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3142BDF3-E95C-4F0F-8701-CF981F6EA3C0}"
ProjectSection(SolutionItems) = preProject
- .editorconfig = .editorconfig
- .gitattributes = .gitattributes
.gitignore = .gitignore
- .github\azp\azp.yml = .github\azp\azp.yml
- README.md = README.md
+ Directory.Build.props = Directory.Build.props
+ Directory.Build.targets = Directory.Build.targets
+ Directory.Packages.props = Directory.Packages.props
+ global.json = global.json
EndProjectSection
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CmlLib", "CMLLib\CmlLib\CmlLib.csproj", "{7FAC2A8B-C2EF-47FA-9598-FB2B414A7156}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Emerald.CoreX", "Emerald.CoreX\Emerald.CoreX.csproj", "{13795E09-8131-4716-9EBC-970952E9F360}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
- Debug|ARM = Debug|ARM
- Debug|ARM64 = Debug|ARM64
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
- Release|ARM = Release|ARM
- Release|ARM64 = Release|ARM64
- Release|x64 = Release|x64
- Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {90389A34-9F42-4489-871A-DC726D74854D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {90389A34-9F42-4489-871A-DC726D74854D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {90389A34-9F42-4489-871A-DC726D74854D}.Debug|ARM.ActiveCfg = Debug|Any CPU
- {90389A34-9F42-4489-871A-DC726D74854D}.Debug|ARM.Build.0 = Debug|Any CPU
- {90389A34-9F42-4489-871A-DC726D74854D}.Debug|ARM64.ActiveCfg = Debug|Any CPU
- {90389A34-9F42-4489-871A-DC726D74854D}.Debug|ARM64.Build.0 = Debug|Any CPU
- {90389A34-9F42-4489-871A-DC726D74854D}.Debug|x64.ActiveCfg = Debug|Any CPU
- {90389A34-9F42-4489-871A-DC726D74854D}.Debug|x64.Build.0 = Debug|Any CPU
- {90389A34-9F42-4489-871A-DC726D74854D}.Debug|x86.ActiveCfg = Debug|Any CPU
- {90389A34-9F42-4489-871A-DC726D74854D}.Debug|x86.Build.0 = Debug|Any CPU
- {90389A34-9F42-4489-871A-DC726D74854D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {90389A34-9F42-4489-871A-DC726D74854D}.Release|Any CPU.Build.0 = Release|Any CPU
- {90389A34-9F42-4489-871A-DC726D74854D}.Release|ARM.ActiveCfg = Release|Any CPU
- {90389A34-9F42-4489-871A-DC726D74854D}.Release|ARM.Build.0 = Release|Any CPU
- {90389A34-9F42-4489-871A-DC726D74854D}.Release|ARM64.ActiveCfg = Release|Any CPU
- {90389A34-9F42-4489-871A-DC726D74854D}.Release|ARM64.Build.0 = Release|Any CPU
- {90389A34-9F42-4489-871A-DC726D74854D}.Release|x64.ActiveCfg = Release|Any CPU
- {90389A34-9F42-4489-871A-DC726D74854D}.Release|x64.Build.0 = Release|Any CPU
- {90389A34-9F42-4489-871A-DC726D74854D}.Release|x86.ActiveCfg = Release|Any CPU
- {90389A34-9F42-4489-871A-DC726D74854D}.Release|x86.Build.0 = Release|Any CPU
- {F2065381-1265-4FEB-841A-E5798E62761D}.Debug|Any CPU.ActiveCfg = Debug|x64
- {F2065381-1265-4FEB-841A-E5798E62761D}.Debug|Any CPU.Build.0 = Debug|x64
- {F2065381-1265-4FEB-841A-E5798E62761D}.Debug|ARM.ActiveCfg = Debug|x86
- {F2065381-1265-4FEB-841A-E5798E62761D}.Debug|ARM.Build.0 = Debug|x86
- {F2065381-1265-4FEB-841A-E5798E62761D}.Debug|ARM64.ActiveCfg = Debug|arm64
- {F2065381-1265-4FEB-841A-E5798E62761D}.Debug|ARM64.Build.0 = Debug|arm64
- {F2065381-1265-4FEB-841A-E5798E62761D}.Debug|x64.ActiveCfg = Debug|x64
- {F2065381-1265-4FEB-841A-E5798E62761D}.Debug|x64.Build.0 = Debug|x64
- {F2065381-1265-4FEB-841A-E5798E62761D}.Debug|x86.ActiveCfg = Debug|x86
- {F2065381-1265-4FEB-841A-E5798E62761D}.Debug|x86.Build.0 = Debug|x86
- {F2065381-1265-4FEB-841A-E5798E62761D}.Release|Any CPU.ActiveCfg = Release|x64
- {F2065381-1265-4FEB-841A-E5798E62761D}.Release|Any CPU.Build.0 = Release|x64
- {F2065381-1265-4FEB-841A-E5798E62761D}.Release|ARM.ActiveCfg = Release|x64
- {F2065381-1265-4FEB-841A-E5798E62761D}.Release|ARM.Build.0 = Release|x64
- {F2065381-1265-4FEB-841A-E5798E62761D}.Release|ARM64.ActiveCfg = Release|arm64
- {F2065381-1265-4FEB-841A-E5798E62761D}.Release|ARM64.Build.0 = Release|arm64
- {F2065381-1265-4FEB-841A-E5798E62761D}.Release|x64.ActiveCfg = Release|x64
- {F2065381-1265-4FEB-841A-E5798E62761D}.Release|x64.Build.0 = Release|x64
- {F2065381-1265-4FEB-841A-E5798E62761D}.Release|x86.ActiveCfg = Release|x86
- {F2065381-1265-4FEB-841A-E5798E62761D}.Release|x86.Build.0 = Release|x86
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|Any CPU.ActiveCfg = Debug|x64
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|Any CPU.Build.0 = Debug|x64
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|Any CPU.Deploy.0 = Debug|x64
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|ARM.ActiveCfg = Debug|x86
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|ARM.Build.0 = Debug|x86
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|ARM.Deploy.0 = Debug|x86
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|ARM64.ActiveCfg = Debug|arm64
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|ARM64.Build.0 = Debug|arm64
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|ARM64.Deploy.0 = Debug|arm64
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|x64.ActiveCfg = Debug|x64
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|x64.Build.0 = Debug|x64
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|x64.Deploy.0 = Debug|x64
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|x86.ActiveCfg = Debug|x86
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|x86.Build.0 = Debug|x86
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|x86.Deploy.0 = Debug|x86
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|Any CPU.ActiveCfg = Release|x64
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|Any CPU.Build.0 = Release|x64
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|Any CPU.Deploy.0 = Release|x64
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|ARM.ActiveCfg = Release|x64
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|ARM.Build.0 = Release|x64
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|ARM.Deploy.0 = Release|x64
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|ARM64.ActiveCfg = Release|arm64
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|ARM64.Build.0 = Release|arm64
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|ARM64.Deploy.0 = Release|arm64
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|x64.ActiveCfg = Release|x64
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|x64.Build.0 = Release|x64
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|x64.Deploy.0 = Release|x64
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|x86.ActiveCfg = Release|x86
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|x86.Build.0 = Release|x86
- {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|x86.Deploy.0 = Release|x86
- {7FAC2A8B-C2EF-47FA-9598-FB2B414A7156}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7FAC2A8B-C2EF-47FA-9598-FB2B414A7156}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7FAC2A8B-C2EF-47FA-9598-FB2B414A7156}.Debug|ARM.ActiveCfg = Debug|Any CPU
- {7FAC2A8B-C2EF-47FA-9598-FB2B414A7156}.Debug|ARM.Build.0 = Debug|Any CPU
- {7FAC2A8B-C2EF-47FA-9598-FB2B414A7156}.Debug|ARM64.ActiveCfg = Debug|Any CPU
- {7FAC2A8B-C2EF-47FA-9598-FB2B414A7156}.Debug|ARM64.Build.0 = Debug|Any CPU
- {7FAC2A8B-C2EF-47FA-9598-FB2B414A7156}.Debug|x64.ActiveCfg = Debug|Any CPU
- {7FAC2A8B-C2EF-47FA-9598-FB2B414A7156}.Debug|x64.Build.0 = Debug|Any CPU
- {7FAC2A8B-C2EF-47FA-9598-FB2B414A7156}.Debug|x86.ActiveCfg = Debug|Any CPU
- {7FAC2A8B-C2EF-47FA-9598-FB2B414A7156}.Debug|x86.Build.0 = Debug|Any CPU
- {7FAC2A8B-C2EF-47FA-9598-FB2B414A7156}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7FAC2A8B-C2EF-47FA-9598-FB2B414A7156}.Release|Any CPU.Build.0 = Release|Any CPU
- {7FAC2A8B-C2EF-47FA-9598-FB2B414A7156}.Release|ARM.ActiveCfg = Release|Any CPU
- {7FAC2A8B-C2EF-47FA-9598-FB2B414A7156}.Release|ARM.Build.0 = Release|Any CPU
- {7FAC2A8B-C2EF-47FA-9598-FB2B414A7156}.Release|ARM64.ActiveCfg = Release|Any CPU
- {7FAC2A8B-C2EF-47FA-9598-FB2B414A7156}.Release|ARM64.Build.0 = Release|Any CPU
- {7FAC2A8B-C2EF-47FA-9598-FB2B414A7156}.Release|x64.ActiveCfg = Release|Any CPU
- {7FAC2A8B-C2EF-47FA-9598-FB2B414A7156}.Release|x64.Build.0 = Release|Any CPU
- {7FAC2A8B-C2EF-47FA-9598-FB2B414A7156}.Release|x86.ActiveCfg = Release|Any CPU
- {7FAC2A8B-C2EF-47FA-9598-FB2B414A7156}.Release|x86.Build.0 = Release|Any CPU
- {13795E09-8131-4716-9EBC-970952E9F360}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {13795E09-8131-4716-9EBC-970952E9F360}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {13795E09-8131-4716-9EBC-970952E9F360}.Debug|ARM.ActiveCfg = Debug|Any CPU
- {13795E09-8131-4716-9EBC-970952E9F360}.Debug|ARM.Build.0 = Debug|Any CPU
- {13795E09-8131-4716-9EBC-970952E9F360}.Debug|ARM64.ActiveCfg = Debug|Any CPU
- {13795E09-8131-4716-9EBC-970952E9F360}.Debug|ARM64.Build.0 = Debug|Any CPU
- {13795E09-8131-4716-9EBC-970952E9F360}.Debug|x64.ActiveCfg = Debug|Any CPU
- {13795E09-8131-4716-9EBC-970952E9F360}.Debug|x64.Build.0 = Debug|Any CPU
- {13795E09-8131-4716-9EBC-970952E9F360}.Debug|x86.ActiveCfg = Debug|Any CPU
- {13795E09-8131-4716-9EBC-970952E9F360}.Debug|x86.Build.0 = Debug|Any CPU
- {13795E09-8131-4716-9EBC-970952E9F360}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {13795E09-8131-4716-9EBC-970952E9F360}.Release|Any CPU.Build.0 = Release|Any CPU
- {13795E09-8131-4716-9EBC-970952E9F360}.Release|ARM.ActiveCfg = Release|Any CPU
- {13795E09-8131-4716-9EBC-970952E9F360}.Release|ARM.Build.0 = Release|Any CPU
- {13795E09-8131-4716-9EBC-970952E9F360}.Release|ARM64.ActiveCfg = Release|Any CPU
- {13795E09-8131-4716-9EBC-970952E9F360}.Release|ARM64.Build.0 = Release|Any CPU
- {13795E09-8131-4716-9EBC-970952E9F360}.Release|x64.ActiveCfg = Release|Any CPU
- {13795E09-8131-4716-9EBC-970952E9F360}.Release|x64.Build.0 = Release|Any CPU
- {13795E09-8131-4716-9EBC-970952E9F360}.Release|x86.ActiveCfg = Release|Any CPU
- {13795E09-8131-4716-9EBC-970952E9F360}.Release|x86.Build.0 = Release|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.Release|Any CPU.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {4830E5AF-9C61-4A32-B34F-82CF4072248B}
+ SolutionGuid = {4D769F43-A252-4DC4-B54B-055DBC12610B}
EndGlobalSection
EndGlobal
diff --git a/Emerald/App.xaml b/Emerald/App.xaml
new file mode 100644
index 00000000..eb80f398
--- /dev/null
+++ b/Emerald/App.xaml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Emerald/App.xaml.cs b/Emerald/App.xaml.cs
new file mode 100644
index 00000000..25e5d31b
--- /dev/null
+++ b/Emerald/App.xaml.cs
@@ -0,0 +1,62 @@
+using Uno.Resizetizer;
+
+namespace Emerald;
+public partial class App : Application
+{
+ ///
+ /// Initializes the singleton application object. This is the first line of authored code
+ /// executed, and as such is the logical equivalent of main() or WinMain().
+ ///
+ public App()
+ {
+ this.InitializeComponent();
+ }
+
+ protected Window? MainWindow { get; private set; }
+ protected IHost? Host { get; private set; }
+
+ protected override void OnLaunched(LaunchActivatedEventArgs args)
+ {
+ var builder = this.CreateBuilder(args)
+ .Configure(host => host
+#if DEBUG
+ // Switch to Development environment when running in DEBUG
+ .UseEnvironment(Environments.Development)
+#endif
+ .ConfigureServices((context, services) =>
+ {
+ // TODO: Register your services
+ //services.AddSingleton();
+ })
+ );
+ MainWindow = builder.Window;
+
+#if DEBUG
+ MainWindow.EnableHotReload();
+#endif
+ MainWindow.SetWindowIcon();
+
+ Host = builder.Build();
+
+ // Do not repeat app initialization when the Window already has content,
+ // just ensure that the window is active
+ if (MainWindow.Content is not Frame rootFrame)
+ {
+ // Create a Frame to act as the navigation context and navigate to the first page
+ rootFrame = new Frame();
+
+ // Place the frame in the current Window
+ MainWindow.Content = rootFrame;
+ }
+
+ if (rootFrame.Content == null)
+ {
+ // When the navigation stack isn't restored navigate to the first page,
+ // configuring the new page by passing required information as a navigation
+ // parameter
+ rootFrame.Navigate(typeof(MainPage), args.Arguments);
+ }
+ // Ensure the current window is active
+ MainWindow.Activate();
+ }
+}
diff --git a/Emerald/Assets/Icons/icon.svg b/Emerald/Assets/Icons/icon.svg
new file mode 100644
index 00000000..a15af53a
--- /dev/null
+++ b/Emerald/Assets/Icons/icon.svg
@@ -0,0 +1,42 @@
+
+
diff --git a/Emerald/Assets/Icons/icon_foreground.svg b/Emerald/Assets/Icons/icon_foreground.svg
new file mode 100644
index 00000000..8ffc41ae
--- /dev/null
+++ b/Emerald/Assets/Icons/icon_foreground.svg
@@ -0,0 +1,137 @@
+
+
diff --git a/Emerald/Assets/SharedAssets.md b/Emerald/Assets/SharedAssets.md
new file mode 100644
index 00000000..1b84a74a
--- /dev/null
+++ b/Emerald/Assets/SharedAssets.md
@@ -0,0 +1,32 @@
+# Shared Assets
+
+See documentation about assets here: https://github.com/unoplatform/uno/blob/master/doc/articles/features/working-with-assets.md
+
+## Here is a cheat sheet
+
+1. Add the image file to the `Assets` directory of a shared project.
+2. Set the build action to `Content`.
+3. (Recommended) Provide an asset for various scales/dpi
+
+### Examples
+
+```text
+\Assets\Images\logo.scale-100.png
+\Assets\Images\logo.scale-200.png
+\Assets\Images\logo.scale-400.png
+
+\Assets\Images\scale-100\logo.png
+\Assets\Images\scale-200\logo.png
+\Assets\Images\scale-400\logo.png
+```
+
+### Table of scales
+
+| Scale | WinUI | iOS/MacCatalyst | Android |
+|-------|:-----------:|:---------------:|:-------:|
+| `100` | scale-100 | @1x | mdpi |
+| `125` | scale-125 | N/A | N/A |
+| `150` | scale-150 | N/A | hdpi |
+| `200` | scale-200 | @2x | xhdpi |
+| `300` | scale-300 | @3x | xxhdpi |
+| `400` | scale-400 | N/A | xxxhdpi |
diff --git a/Emerald/Assets/Splash/splash_screen.svg b/Emerald/Assets/Splash/splash_screen.svg
new file mode 100644
index 00000000..8ffc41ae
--- /dev/null
+++ b/Emerald/Assets/Splash/splash_screen.svg
@@ -0,0 +1,137 @@
+
+
diff --git a/Emerald/Emerald.csproj b/Emerald/Emerald.csproj
new file mode 100644
index 00000000..5c40cad7
--- /dev/null
+++ b/Emerald/Emerald.csproj
@@ -0,0 +1,44 @@
+
+
+
+ net8.0-maccatalyst;
+ net8.0-windows10.0.19041;
+ net8.0-desktop;
+
+
+ Exe
+ true
+
+
+ Emerald
+
+ Riverside.Emerald
+
+ 1.0
+ 1
+
+
+
+
+
+ Lottie;
+ Hosting;
+ Toolkit;
+ Mvvm;
+ ThemeService;
+
+
+
+
diff --git a/Emerald/GlobalUsings.cs b/Emerald/GlobalUsings.cs
new file mode 100644
index 00000000..6b345c18
--- /dev/null
+++ b/Emerald/GlobalUsings.cs
@@ -0,0 +1,7 @@
+global using System.Collections.Immutable;
+global using CommunityToolkit.Mvvm.ComponentModel;
+global using CommunityToolkit.Mvvm.Input;
+global using Microsoft.Extensions.DependencyInjection;
+global using Microsoft.Extensions.Hosting;
+global using Microsoft.Extensions.Logging;
+global using ApplicationExecutionState = Windows.ApplicationModel.Activation.ApplicationExecutionState;
diff --git a/Emerald/MainPage.xaml b/Emerald/MainPage.xaml
new file mode 100644
index 00000000..7145924d
--- /dev/null
+++ b/Emerald/MainPage.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
diff --git a/Emerald/MainPage.xaml.cs b/Emerald/MainPage.xaml.cs
new file mode 100644
index 00000000..f7f1791c
--- /dev/null
+++ b/Emerald/MainPage.xaml.cs
@@ -0,0 +1,9 @@
+namespace Emerald;
+
+public sealed partial class MainPage : Page
+{
+ public MainPage()
+ {
+ this.InitializeComponent();
+ }
+}
diff --git a/Emerald/Package.appxmanifest b/Emerald/Package.appxmanifest
new file mode 100644
index 00000000..29558f1d
--- /dev/null
+++ b/Emerald/Package.appxmanifest
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+ Emerald
+ Emerald
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Emerald/Platforms/Desktop/Program.cs b/Emerald/Platforms/Desktop/Program.cs
new file mode 100644
index 00000000..505e2c1b
--- /dev/null
+++ b/Emerald/Platforms/Desktop/Program.cs
@@ -0,0 +1,19 @@
+using Uno.UI.Runtime.Skia;
+
+namespace Emerald;
+public class Program
+{
+ [STAThread]
+ public static void Main(string[] args)
+ {
+ var host = SkiaHostBuilder.Create()
+ .App(() => new App())
+ .UseX11()
+ .UseLinuxFrameBuffer()
+ .UseMacOS()
+ .UseWindows()
+ .Build();
+
+ host.Run();
+ }
+}
diff --git a/Emerald/Platforms/MacCatalyst/Entitlements.plist b/Emerald/Platforms/MacCatalyst/Entitlements.plist
new file mode 100644
index 00000000..24c31036
--- /dev/null
+++ b/Emerald/Platforms/MacCatalyst/Entitlements.plist
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/Emerald/Platforms/MacCatalyst/Info.plist b/Emerald/Platforms/MacCatalyst/Info.plist
new file mode 100644
index 00000000..1bb02ddc
--- /dev/null
+++ b/Emerald/Platforms/MacCatalyst/Info.plist
@@ -0,0 +1,26 @@
+
+
+
+
+ UIDeviceFamily
+
+ 2
+
+ LSApplicationCategoryType
+ public.app-category.utilities
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ XSAppIconAssets
+ Assets.xcassets/icon.appiconset
+
+
+
+
diff --git a/Emerald/Platforms/MacCatalyst/Main.maccatalyst.cs b/Emerald/Platforms/MacCatalyst/Main.maccatalyst.cs
new file mode 100644
index 00000000..d26d16e3
--- /dev/null
+++ b/Emerald/Platforms/MacCatalyst/Main.maccatalyst.cs
@@ -0,0 +1,13 @@
+using UIKit;
+
+namespace Emerald.MacCatalyst;
+public class EntryPoint
+{
+ // This is the main entry point of the application.
+ public static void Main(string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main(args, null, typeof(App));
+ }
+}
diff --git a/Emerald/Platforms/MacCatalyst/Media.xcassets/LaunchImages.launchimage/Contents.json b/Emerald/Platforms/MacCatalyst/Media.xcassets/LaunchImages.launchimage/Contents.json
new file mode 100644
index 00000000..69555e44
--- /dev/null
+++ b/Emerald/Platforms/MacCatalyst/Media.xcassets/LaunchImages.launchimage/Contents.json
@@ -0,0 +1,58 @@
+{
+ "images": [
+ {
+ "orientation": "portrait",
+ "extent": "full-screen",
+ "minimum-system-version": "7.0",
+ "scale": "2x",
+ "size": "640x960",
+ "idiom": "iphone"
+ },
+ {
+ "orientation": "portrait",
+ "extent": "full-screen",
+ "minimum-system-version": "7.0",
+ "subtype": "retina4",
+ "scale": "2x",
+ "size": "640x1136",
+ "idiom": "iphone"
+ },
+ {
+ "orientation": "portrait",
+ "extent": "full-screen",
+ "minimum-system-version": "7.0",
+ "scale": "1x",
+ "size": "768x1024",
+ "idiom": "ipad"
+ },
+ {
+ "orientation": "landscape",
+ "extent": "full-screen",
+ "minimum-system-version": "7.0",
+ "scale": "1x",
+ "size": "1024x768",
+ "idiom": "ipad"
+ },
+ {
+ "orientation": "portrait",
+ "extent": "full-screen",
+ "minimum-system-version": "7.0",
+ "scale": "2x",
+ "size": "1536x2048",
+ "idiom": "ipad"
+ },
+ {
+ "orientation": "landscape",
+ "extent": "full-screen",
+ "minimum-system-version": "7.0",
+ "scale": "2x",
+ "size": "2048x1536",
+ "idiom": "ipad"
+ }
+ ],
+ "properties": {},
+ "info": {
+ "version": 1,
+ "author": ""
+ }
+}
\ No newline at end of file
diff --git a/Emerald/Platforms/Windows/Properties/PublishProfiles/win-arm64.pubxml b/Emerald/Platforms/Windows/Properties/PublishProfiles/win-arm64.pubxml
new file mode 100644
index 00000000..d5147f10
--- /dev/null
+++ b/Emerald/Platforms/Windows/Properties/PublishProfiles/win-arm64.pubxml
@@ -0,0 +1,22 @@
+
+
+
+
+ FileSystem
+ arm64
+ win-arm64
+ bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\
+ true
+ False
+ False
+ True
+
+
+
+
diff --git a/Emerald/Platforms/Windows/Properties/PublishProfiles/win-x64.pubxml b/Emerald/Platforms/Windows/Properties/PublishProfiles/win-x64.pubxml
new file mode 100644
index 00000000..4fea954e
--- /dev/null
+++ b/Emerald/Platforms/Windows/Properties/PublishProfiles/win-x64.pubxml
@@ -0,0 +1,22 @@
+
+
+
+
+ FileSystem
+ x64
+ win-x64
+ bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\
+ true
+ False
+ False
+ True
+
+
+
+
diff --git a/Emerald/Platforms/Windows/Properties/PublishProfiles/win-x86.pubxml b/Emerald/Platforms/Windows/Properties/PublishProfiles/win-x86.pubxml
new file mode 100644
index 00000000..928cb25e
--- /dev/null
+++ b/Emerald/Platforms/Windows/Properties/PublishProfiles/win-x86.pubxml
@@ -0,0 +1,22 @@
+
+
+
+
+ FileSystem
+ x86
+ win-x86
+ bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\
+ true
+ False
+ False
+ True
+
+
+
+
diff --git a/Emerald/Properties/launchSettings.json b/Emerald/Properties/launchSettings.json
new file mode 100644
index 00000000..a8c8aed9
--- /dev/null
+++ b/Emerald/Properties/launchSettings.json
@@ -0,0 +1,31 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:8080",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ // Note: In order to select this profile, you'll need to comment the `Packaged` profile below until this is fixed: https://aka.platform.uno/wasdk-maui-debug-profile-issue
+ "Emerald (WinAppSDK Unpackaged)": {
+ "commandName": "Project",
+ "compatibleTargetFramework": "windows"
+ },
+ "Emerald (WinAppSDK Packaged)": {
+ "commandName": "MsixPackage",
+ "compatibleTargetFramework": "windows"
+ },
+ "Emerald (Desktop)": {
+ "commandName": "Project",
+ "compatibleTargetFramework": "desktop"
+ },
+ "Emerald (Desktop WSL2)": {
+ "commandName": "WSL2",
+ "commandLineArgs": "{ProjectDir}/bin/Debug/net8.0-desktop/Emerald.dll",
+ "distributionName": "",
+ "compatibleTargetFramework": "desktop"
+ }
+ }
+}
diff --git a/Emerald/ReadMe.md b/Emerald/ReadMe.md
new file mode 100644
index 00000000..93482da2
--- /dev/null
+++ b/Emerald/ReadMe.md
@@ -0,0 +1,7 @@
+# Getting Started
+
+Welcome to the Uno Platform!
+
+To discover how to get started with your new app: https://aka.platform.uno/get-started
+
+For more information on how to use the Uno.Sdk or upgrade Uno Platform packages in your solution: https://aka.platform.uno/using-uno-sdk
\ No newline at end of file
diff --git a/Emerald/Strings/en/Resources.resw b/Emerald/Strings/en/Resources.resw
new file mode 100644
index 00000000..a311865f
--- /dev/null
+++ b/Emerald/Strings/en/Resources.resw
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Emerald-en
+
+
diff --git a/Emerald/app.manifest b/Emerald/app.manifest
new file mode 100644
index 00000000..7c69768c
--- /dev/null
+++ b/Emerald/app.manifest
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true/PM
+ PerMonitorV2, PerMonitor
+
+
+
diff --git a/global.json b/global.json
new file mode 100644
index 00000000..ce7228cb
--- /dev/null
+++ b/global.json
@@ -0,0 +1,9 @@
+{
+ // To update the version of Uno please update the version of the Uno.Sdk here. See https://aka.platform.uno/upgrade-uno-packages for more information.
+ "msbuild-sdks": {
+ "Uno.Sdk": "5.2.175"
+ },
+ "sdk": {
+ "allowPrerelease": false
+ }
+}
From 4cce0a38c9f66265d6676befbfe1cd127cf248c8 Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Thu, 18 Jul 2024 17:53:06 +0100
Subject: [PATCH 21/61] Rename CI
Signed-off-by: Lamparter
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3796bf27..1e85087f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -16,7 +16,7 @@ env:
jobs:
smoke_test:
- name: Smoke Test (Debug Build of Emerald)
+ name: Emerald CI / Debug
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
From 3859bb109be491e1ed51702cc5c7a5c28633e631 Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Thu, 18 Jul 2024 17:58:29 +0100
Subject: [PATCH 22/61] Modify solution to include projects
---
Emerald.sln | 158 +++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 157 insertions(+), 1 deletion(-)
diff --git a/Emerald.sln b/Emerald.sln
index c11b44ea..bb5184e0 100644
--- a/Emerald.sln
+++ b/Emerald.sln
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.11.35103.136
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Emerald", "Emerald\Emerald.csproj", "{9D3213F4-E514-4E7D-872A-725DB4872436}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Emerald", "Emerald\Emerald.csproj", "{9D3213F4-E514-4E7D-872A-725DB4872436}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3142BDF3-E95C-4F0F-8701-CF981F6EA3C0}"
ProjectSection(SolutionItems) = preProject
@@ -14,18 +14,174 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
global.json = global.json
EndProjectSection
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Emerald.App", "Emerald.App\Emerald.App\Emerald.App.csproj", "{196FD412-FCBA-4266-A75E-5648F6AADDFB}"
+EndProject
+Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "Package.WinUI", "Emerald.App\Emerald.App.Package\Package.WinUI.wapproj", "{59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Emerald.Core", "Emerald.Core\Emerald.Core.csproj", "{BE4AEE6B-3F2E-4FFB-940D-3E4916EAE913}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Emerald.CoreX", "Emerald.CoreX\Emerald.CoreX.csproj", "{D103EFF9-90EA-49C7-9DD9-636E6056E9C3}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
+ Debug|arm64 = Debug|arm64
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
+ Release|arm64 = Release|arm64
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ SkipOld|Any CPU = SkipOld|Any CPU
+ SkipOld|arm64 = SkipOld|arm64
+ SkipOld|x64 = SkipOld|x64
+ SkipOld|x86 = SkipOld|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9D3213F4-E514-4E7D-872A-725DB4872436}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9D3213F4-E514-4E7D-872A-725DB4872436}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9D3213F4-E514-4E7D-872A-725DB4872436}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.Debug|arm64.ActiveCfg = Debug|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.Debug|arm64.Build.0 = Debug|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.Debug|arm64.Deploy.0 = Debug|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.Debug|x64.Build.0 = Debug|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.Debug|x64.Deploy.0 = Debug|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.Debug|x86.Build.0 = Debug|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.Debug|x86.Deploy.0 = Debug|Any CPU
{9D3213F4-E514-4E7D-872A-725DB4872436}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9D3213F4-E514-4E7D-872A-725DB4872436}.Release|Any CPU.Build.0 = Release|Any CPU
{9D3213F4-E514-4E7D-872A-725DB4872436}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.Release|arm64.ActiveCfg = Release|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.Release|arm64.Build.0 = Release|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.Release|arm64.Deploy.0 = Release|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.Release|x64.ActiveCfg = Release|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.Release|x64.Build.0 = Release|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.Release|x64.Deploy.0 = Release|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.Release|x86.ActiveCfg = Release|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.Release|x86.Build.0 = Release|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.Release|x86.Deploy.0 = Release|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.SkipOld|Any CPU.ActiveCfg = Release|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.SkipOld|Any CPU.Build.0 = Release|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.SkipOld|Any CPU.Deploy.0 = Release|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.SkipOld|arm64.ActiveCfg = Release|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.SkipOld|arm64.Build.0 = Release|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.SkipOld|arm64.Deploy.0 = Release|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.SkipOld|x64.ActiveCfg = Release|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.SkipOld|x64.Build.0 = Release|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.SkipOld|x64.Deploy.0 = Release|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.SkipOld|x86.ActiveCfg = Release|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.SkipOld|x86.Build.0 = Release|Any CPU
+ {9D3213F4-E514-4E7D-872A-725DB4872436}.SkipOld|x86.Deploy.0 = Release|Any CPU
+ {196FD412-FCBA-4266-A75E-5648F6AADDFB}.Debug|Any CPU.ActiveCfg = Debug|x64
+ {196FD412-FCBA-4266-A75E-5648F6AADDFB}.Debug|Any CPU.Build.0 = Debug|x64
+ {196FD412-FCBA-4266-A75E-5648F6AADDFB}.Debug|arm64.ActiveCfg = Debug|arm64
+ {196FD412-FCBA-4266-A75E-5648F6AADDFB}.Debug|arm64.Build.0 = Debug|arm64
+ {196FD412-FCBA-4266-A75E-5648F6AADDFB}.Debug|x64.ActiveCfg = Debug|x64
+ {196FD412-FCBA-4266-A75E-5648F6AADDFB}.Debug|x64.Build.0 = Debug|x64
+ {196FD412-FCBA-4266-A75E-5648F6AADDFB}.Debug|x86.ActiveCfg = Debug|x86
+ {196FD412-FCBA-4266-A75E-5648F6AADDFB}.Debug|x86.Build.0 = Debug|x86
+ {196FD412-FCBA-4266-A75E-5648F6AADDFB}.Release|Any CPU.ActiveCfg = Release|x64
+ {196FD412-FCBA-4266-A75E-5648F6AADDFB}.Release|Any CPU.Build.0 = Release|x64
+ {196FD412-FCBA-4266-A75E-5648F6AADDFB}.Release|arm64.ActiveCfg = Release|arm64
+ {196FD412-FCBA-4266-A75E-5648F6AADDFB}.Release|arm64.Build.0 = Release|arm64
+ {196FD412-FCBA-4266-A75E-5648F6AADDFB}.Release|x64.ActiveCfg = Release|x64
+ {196FD412-FCBA-4266-A75E-5648F6AADDFB}.Release|x64.Build.0 = Release|x64
+ {196FD412-FCBA-4266-A75E-5648F6AADDFB}.Release|x86.ActiveCfg = Release|x86
+ {196FD412-FCBA-4266-A75E-5648F6AADDFB}.Release|x86.Build.0 = Release|x86
+ {196FD412-FCBA-4266-A75E-5648F6AADDFB}.SkipOld|Any CPU.ActiveCfg = Debug|x64
+ {196FD412-FCBA-4266-A75E-5648F6AADDFB}.SkipOld|Any CPU.Build.0 = Debug|x64
+ {196FD412-FCBA-4266-A75E-5648F6AADDFB}.SkipOld|arm64.ActiveCfg = Debug|arm64
+ {196FD412-FCBA-4266-A75E-5648F6AADDFB}.SkipOld|arm64.Build.0 = Debug|arm64
+ {196FD412-FCBA-4266-A75E-5648F6AADDFB}.SkipOld|x64.ActiveCfg = Debug|x64
+ {196FD412-FCBA-4266-A75E-5648F6AADDFB}.SkipOld|x64.Build.0 = Debug|x64
+ {196FD412-FCBA-4266-A75E-5648F6AADDFB}.SkipOld|x86.ActiveCfg = Debug|x86
+ {196FD412-FCBA-4266-A75E-5648F6AADDFB}.SkipOld|x86.Build.0 = Debug|x86
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|Any CPU.ActiveCfg = Debug|x64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|Any CPU.Build.0 = Debug|x64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|Any CPU.Deploy.0 = Debug|x64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|arm64.ActiveCfg = Debug|arm64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|arm64.Build.0 = Debug|arm64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|arm64.Deploy.0 = Debug|arm64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|x64.ActiveCfg = Debug|x64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|x64.Build.0 = Debug|x64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|x64.Deploy.0 = Debug|x64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|x86.ActiveCfg = Debug|x86
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|x86.Build.0 = Debug|x86
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Debug|x86.Deploy.0 = Debug|x86
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|Any CPU.ActiveCfg = Release|x64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|Any CPU.Build.0 = Release|x64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|Any CPU.Deploy.0 = Release|x64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|arm64.ActiveCfg = Release|arm64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|arm64.Build.0 = Release|arm64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|arm64.Deploy.0 = Release|arm64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|x64.ActiveCfg = Release|x64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|x64.Build.0 = Release|x64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|x64.Deploy.0 = Release|x64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|x86.ActiveCfg = Release|x86
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|x86.Build.0 = Release|x86
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.Release|x86.Deploy.0 = Release|x86
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.SkipOld|Any CPU.ActiveCfg = SkipOld|x64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.SkipOld|Any CPU.Build.0 = SkipOld|x64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.SkipOld|Any CPU.Deploy.0 = SkipOld|x64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.SkipOld|arm64.ActiveCfg = SkipOld|arm64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.SkipOld|arm64.Build.0 = SkipOld|arm64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.SkipOld|arm64.Deploy.0 = SkipOld|arm64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.SkipOld|x64.ActiveCfg = SkipOld|x64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.SkipOld|x64.Build.0 = SkipOld|x64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.SkipOld|x64.Deploy.0 = SkipOld|x64
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.SkipOld|x86.ActiveCfg = SkipOld|x86
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.SkipOld|x86.Build.0 = SkipOld|x86
+ {59A6F3D1-B6E1-48AD-80D3-215DF2791AC1}.SkipOld|x86.Deploy.0 = SkipOld|x86
+ {BE4AEE6B-3F2E-4FFB-940D-3E4916EAE913}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BE4AEE6B-3F2E-4FFB-940D-3E4916EAE913}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BE4AEE6B-3F2E-4FFB-940D-3E4916EAE913}.Debug|arm64.ActiveCfg = Debug|Any CPU
+ {BE4AEE6B-3F2E-4FFB-940D-3E4916EAE913}.Debug|arm64.Build.0 = Debug|Any CPU
+ {BE4AEE6B-3F2E-4FFB-940D-3E4916EAE913}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {BE4AEE6B-3F2E-4FFB-940D-3E4916EAE913}.Debug|x64.Build.0 = Debug|Any CPU
+ {BE4AEE6B-3F2E-4FFB-940D-3E4916EAE913}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {BE4AEE6B-3F2E-4FFB-940D-3E4916EAE913}.Debug|x86.Build.0 = Debug|Any CPU
+ {BE4AEE6B-3F2E-4FFB-940D-3E4916EAE913}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BE4AEE6B-3F2E-4FFB-940D-3E4916EAE913}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BE4AEE6B-3F2E-4FFB-940D-3E4916EAE913}.Release|arm64.ActiveCfg = Release|Any CPU
+ {BE4AEE6B-3F2E-4FFB-940D-3E4916EAE913}.Release|arm64.Build.0 = Release|Any CPU
+ {BE4AEE6B-3F2E-4FFB-940D-3E4916EAE913}.Release|x64.ActiveCfg = Release|Any CPU
+ {BE4AEE6B-3F2E-4FFB-940D-3E4916EAE913}.Release|x64.Build.0 = Release|Any CPU
+ {BE4AEE6B-3F2E-4FFB-940D-3E4916EAE913}.Release|x86.ActiveCfg = Release|Any CPU
+ {BE4AEE6B-3F2E-4FFB-940D-3E4916EAE913}.Release|x86.Build.0 = Release|Any CPU
+ {BE4AEE6B-3F2E-4FFB-940D-3E4916EAE913}.SkipOld|Any CPU.ActiveCfg = Debug|Any CPU
+ {BE4AEE6B-3F2E-4FFB-940D-3E4916EAE913}.SkipOld|Any CPU.Build.0 = Debug|Any CPU
+ {BE4AEE6B-3F2E-4FFB-940D-3E4916EAE913}.SkipOld|arm64.ActiveCfg = Debug|Any CPU
+ {BE4AEE6B-3F2E-4FFB-940D-3E4916EAE913}.SkipOld|arm64.Build.0 = Debug|Any CPU
+ {BE4AEE6B-3F2E-4FFB-940D-3E4916EAE913}.SkipOld|x64.ActiveCfg = Debug|Any CPU
+ {BE4AEE6B-3F2E-4FFB-940D-3E4916EAE913}.SkipOld|x64.Build.0 = Debug|Any CPU
+ {BE4AEE6B-3F2E-4FFB-940D-3E4916EAE913}.SkipOld|x86.ActiveCfg = Debug|Any CPU
+ {BE4AEE6B-3F2E-4FFB-940D-3E4916EAE913}.SkipOld|x86.Build.0 = Debug|Any CPU
+ {D103EFF9-90EA-49C7-9DD9-636E6056E9C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D103EFF9-90EA-49C7-9DD9-636E6056E9C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D103EFF9-90EA-49C7-9DD9-636E6056E9C3}.Debug|arm64.ActiveCfg = Debug|Any CPU
+ {D103EFF9-90EA-49C7-9DD9-636E6056E9C3}.Debug|arm64.Build.0 = Debug|Any CPU
+ {D103EFF9-90EA-49C7-9DD9-636E6056E9C3}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {D103EFF9-90EA-49C7-9DD9-636E6056E9C3}.Debug|x64.Build.0 = Debug|Any CPU
+ {D103EFF9-90EA-49C7-9DD9-636E6056E9C3}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D103EFF9-90EA-49C7-9DD9-636E6056E9C3}.Debug|x86.Build.0 = Debug|Any CPU
+ {D103EFF9-90EA-49C7-9DD9-636E6056E9C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D103EFF9-90EA-49C7-9DD9-636E6056E9C3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D103EFF9-90EA-49C7-9DD9-636E6056E9C3}.Release|arm64.ActiveCfg = Release|Any CPU
+ {D103EFF9-90EA-49C7-9DD9-636E6056E9C3}.Release|arm64.Build.0 = Release|Any CPU
+ {D103EFF9-90EA-49C7-9DD9-636E6056E9C3}.Release|x64.ActiveCfg = Release|Any CPU
+ {D103EFF9-90EA-49C7-9DD9-636E6056E9C3}.Release|x64.Build.0 = Release|Any CPU
+ {D103EFF9-90EA-49C7-9DD9-636E6056E9C3}.Release|x86.ActiveCfg = Release|Any CPU
+ {D103EFF9-90EA-49C7-9DD9-636E6056E9C3}.Release|x86.Build.0 = Release|Any CPU
+ {D103EFF9-90EA-49C7-9DD9-636E6056E9C3}.SkipOld|Any CPU.ActiveCfg = Debug|Any CPU
+ {D103EFF9-90EA-49C7-9DD9-636E6056E9C3}.SkipOld|Any CPU.Build.0 = Debug|Any CPU
+ {D103EFF9-90EA-49C7-9DD9-636E6056E9C3}.SkipOld|arm64.ActiveCfg = Debug|Any CPU
+ {D103EFF9-90EA-49C7-9DD9-636E6056E9C3}.SkipOld|arm64.Build.0 = Debug|Any CPU
+ {D103EFF9-90EA-49C7-9DD9-636E6056E9C3}.SkipOld|x64.ActiveCfg = Debug|Any CPU
+ {D103EFF9-90EA-49C7-9DD9-636E6056E9C3}.SkipOld|x64.Build.0 = Debug|Any CPU
+ {D103EFF9-90EA-49C7-9DD9-636E6056E9C3}.SkipOld|x86.ActiveCfg = Debug|Any CPU
+ {D103EFF9-90EA-49C7-9DD9-636E6056E9C3}.SkipOld|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
From e5313a58c90bb1290322733a6ba621e90623fb83 Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Thu, 18 Jul 2024 18:03:25 +0100
Subject: [PATCH 23/61] Update gitignore
---
.gitignore | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index ef88c205..83a8eded 100644
--- a/.gitignore
+++ b/.gitignore
@@ -400,4 +400,11 @@ FodyWeavers.xsd
# Single Target Config
solution-config.props
# Publish Profiles
-!**/Properties/PublishProfiles/*.pubxml
\ No newline at end of file
+!**/Properties/PublishProfiles/*.pubxml
+
+# Azure Active Directory and GitHub OAUTH tokens
+/Emerald.App/Emerald.App/MsalClientID.txt
+/Emerald.Core/MsalClientID.txt
+/Emerald.App/Emerald.App/GithubClientID.txt
+Emerald.App/GithubClientID.txt
+Emerald.App/MsalClientID.txt
From 4a72c70ca9e0a5d641837c3c764d9ca33813ba84 Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Thu, 18 Jul 2024 18:04:49 +0100
Subject: [PATCH 24/61] Rename CI
(again)
Signed-off-by: Lamparter
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1e85087f..a210dd57 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -16,7 +16,7 @@ env:
jobs:
smoke_test:
- name: Emerald CI / Debug
+ name: Emerald CI / Uno (debug)
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
From e54b1964381bf971164e0d049fbb4e188939a4c0 Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Thu, 18 Jul 2024 18:05:49 +0100
Subject: [PATCH 25/61] Rename CI
(again again)
Signed-off-by: Lamparter
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a210dd57..2396a608 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -16,7 +16,7 @@ env:
jobs:
smoke_test:
- name: Emerald CI / Uno (debug)
+ name: Uno (debug)
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
From d0dd261a530cb83f2a73001677eda8c28ccbb990 Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Thu, 18 Jul 2024 18:06:52 +0100
Subject: [PATCH 26/61] Rename CI
(again again again)
Signed-off-by: Lamparter
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2396a608..7f5b9cbf 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -16,7 +16,7 @@ env:
jobs:
smoke_test:
- name: Uno (debug)
+ name: Uno
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
From 71bb783edb879c1442d64fa36aef9c138f086d8a Mon Sep 17 00:00:00 2001
From: NoobNotFound
Date: Thu, 8 Aug 2024 12:41:59 +0530
Subject: [PATCH 27/61] Completely modify the modrinth store managing system
---
Emerald.CoreX/Emerald.CoreX.csproj | 5 +-
.../Store/Modrinth/IMinecraftStore.cs | 18 ++
Emerald.CoreX/Store/Modrinth/JSON.cs | 211 ++++++++++++++++++
Emerald.CoreX/Store/Modrinth/ModrinthStore.cs | 188 ++++++++++++++++
.../Store/Modrinth/SearchSortOptions.cs | 15 ++
Emerald.CoreX/Store/Modrinth/Stores.cs | 148 ++++++++++++
6 files changed, 584 insertions(+), 1 deletion(-)
create mode 100644 Emerald.CoreX/Store/Modrinth/IMinecraftStore.cs
create mode 100644 Emerald.CoreX/Store/Modrinth/JSON.cs
create mode 100644 Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
create mode 100644 Emerald.CoreX/Store/Modrinth/SearchSortOptions.cs
create mode 100644 Emerald.CoreX/Store/Modrinth/Stores.cs
diff --git a/Emerald.CoreX/Emerald.CoreX.csproj b/Emerald.CoreX/Emerald.CoreX.csproj
index 367cd3d7..d875fd8b 100644
--- a/Emerald.CoreX/Emerald.CoreX.csproj
+++ b/Emerald.CoreX/Emerald.CoreX.csproj
@@ -1,4 +1,4 @@
-
+
net8.0
@@ -11,5 +11,8 @@
+
+
+
\ No newline at end of file
diff --git a/Emerald.CoreX/Store/Modrinth/IMinecraftStore.cs b/Emerald.CoreX/Store/Modrinth/IMinecraftStore.cs
new file mode 100644
index 00000000..678486af
--- /dev/null
+++ b/Emerald.CoreX/Store/Modrinth/IMinecraftStore.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Emerald.CoreX.Store.Modrinth.JSON;
+
+namespace Emerald.CoreX.Store.Modrinth;
+
+public interface IModrinthStore
+{
+ Task SearchAsync(string query, int limit = 15,
+ SearchSortOptions sortOptions = SearchSortOptions.Relevance, string[]? categories = null);
+
+ Task GetItemAsync(string id);
+ Task?> GetVersionsAsync(string id);
+ Task DownloadItemAsync(ItemFile file, string projectType);
+}
diff --git a/Emerald.CoreX/Store/Modrinth/JSON.cs b/Emerald.CoreX/Store/Modrinth/JSON.cs
new file mode 100644
index 00000000..fee9bfea
--- /dev/null
+++ b/Emerald.CoreX/Store/Modrinth/JSON.cs
@@ -0,0 +1,211 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Emerald.CoreX.Store.Modrinth.JSON;
+
+public class SearchResult
+{
+ [JsonProperty("hits")] public List Hits { get; set; }
+
+ [JsonProperty("offset")] public int Offset { get; set; }
+
+ [JsonProperty("limit")] public int Limit { get; set; }
+
+ [JsonProperty("total_hits")] public int TotalHits { get; set; }
+}
+
+public class Category
+{
+ public string icon { get; set; }
+ public string name { get; set; }
+ public string project_type { get; set; }
+ public string header { get; set; }
+}
+
+public class SearchHit
+{
+ [JsonProperty("slug")] public string Slug { get; set; }
+
+ [JsonProperty("title")] public string Title { get; set; }
+
+ [JsonProperty("description")] public string Description { get; set; }
+
+ [JsonProperty("categories")] public string[] Categories { get; set; }
+
+ [JsonProperty("client_side")] public string ClientSide { get; set; }
+
+ [JsonProperty("server_side")] public string ServerSide { get; set; }
+
+ [JsonProperty("project_type")] public string ProjectType { get; set; }
+
+ [JsonProperty("downloads")] public int Downloads { get; set; }
+
+ [JsonProperty("icon_url")] public string IconUrl { get; set; }
+
+ [JsonProperty("project_id")] public string ProjectId { get; set; }
+
+ [JsonProperty("author")] public string Author { get; set; }
+
+ [JsonProperty("versions")] public string[] Versions { get; set; }
+
+ [JsonProperty("follows")] public int Follows { get; set; }
+
+ [JsonProperty("date_created")] public DateTime DateCreated { get; set; }
+
+ [JsonProperty("date_modified")] public DateTime DateModified { get; set; }
+
+ [JsonProperty("latest_version")] public string LatestVersion { get; set; }
+
+ [JsonProperty("license")] public string License { get; set; }
+
+ [JsonProperty("gallery")] public string[] Gallery { get; set; }
+}
+
+public class StoreItem
+{
+ [JsonProperty("id")] public string ID { get; set; }
+
+ [JsonProperty("slug")] public string Slug { get; set; }
+
+ [JsonProperty("project_type")] public string ProjectType { get; set; }
+
+ [JsonProperty("team")] public string Team { get; set; }
+
+ [JsonProperty("title")] public string Title { get; set; }
+
+ [JsonProperty("description")] public string Description { get; set; }
+
+ [JsonProperty("body")] public string Body { get; set; }
+
+ [JsonProperty("body_url")] public string BodyUrl { get; set; }
+
+ [JsonProperty("published")] public DateTime PublishedDate { get; set; }
+
+ [JsonProperty("updated")] public DateTime UpdatedDate { get; set; }
+
+ [JsonProperty("status")] public string Status { get; set; }
+
+ [JsonProperty("moderator_message")] public object? ModeratorMessage { get; set; }
+
+ [JsonProperty("license")] public License License { get; set; }
+
+ [JsonProperty("client_side")] public string ClientSide { get; set; }
+
+ [JsonProperty("server_side")] public string ServerSide { get; set; }
+
+ [JsonProperty("downloads")] public int Downloads { get; set; }
+
+ [JsonProperty("followers")] public int Followers { get; set; }
+
+ [JsonProperty("categories")] public string[] Categories { get; set; }
+
+ [JsonProperty("versions")] public string[] Versions { get; set; }
+
+ [JsonProperty("icon_url")] public string IconUrl { get; set; }
+
+ [JsonProperty("issues_url")] public string IssuesUrl { get; set; }
+
+ [JsonProperty("source_url")] public string SourceUrl { get; set; }
+
+ [JsonProperty("wiki_url")] public object? WikiUrl { get; set; }
+
+ [JsonProperty("discord_url")] public string DiscordUrl { get; set; }
+
+ [JsonProperty("donation_urls")] public DonationUrls[] DonationUrls { get; set; }
+
+ [JsonProperty("gallery")] public object[] Gallery { get; set; }
+}
+
+public class ItemVersion : INotifyPropertyChanged
+{
+ public bool IsDetailsVisible { get; set; } = false;
+ public string? FileName => Files.FirstOrDefault(x => x.Primary)?.Filename;
+
+ [JsonProperty("id")] public string ID { get; set; }
+
+ [JsonProperty("project_id")] public string ProjectId { get; set; }
+
+ [JsonProperty("author_id")] public string AuthorId { get; set; }
+
+ [JsonProperty("featured")] public bool Featured { get; set; }
+
+ [JsonProperty("name")] public string Name { get; set; }
+
+ [JsonProperty("version_number")] public string VersionNumber { get; set; }
+
+ [JsonProperty("changelog")] public string Changelog { get; set; }
+
+ [JsonProperty("changelog_url")] public string? ChangelogUrl { get; set; }
+
+ [JsonProperty("date_published")] public DateTime DatePublished { get; set; }
+
+ [JsonProperty("downloads")] public int Downloads { get; set; }
+
+ [JsonProperty("version_type")] public string VersionType { get; set; }
+
+ [JsonProperty("files")] public ItemFile[] Files { get; set; }
+
+ [JsonProperty("dependencies")] public Dependency[] Dependencies { get; set; }
+
+ [JsonProperty("game_versions")] public string[] GameVersions { get; set; }
+
+ [JsonProperty("loaders")] public string[] Loaders { get; set; }
+
+ public event PropertyChangedEventHandler? PropertyChanged;
+
+ public void InvokePropertyChanged(string? propertyName = null) =>
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+}
+
+public class Dependency
+{
+ [JsonProperty("version_id")] public string VersionId { get; set; }
+
+ [JsonProperty("project_id")] public string ProjectId { get; set; }
+
+ [JsonProperty("file_name")] public string FileName { get; set; }
+
+ [JsonProperty("dependency_type")] public string DependencyType { get; set; }
+}
+
+public class ItemFile
+{
+ [JsonProperty("hashes")] public Hashes Hashes { get; set; }
+
+ [JsonProperty("url")] public string Url { get; set; }
+
+ [JsonProperty("filename")] public string Filename { get; set; }
+
+ [JsonProperty("primary")] public bool Primary { get; set; }
+
+ [JsonProperty("size")] public int Size { get; set; }
+}
+
+public class Hashes
+{
+ [JsonProperty("sha512")] public string Sha512 { get; set; }
+
+ [JsonProperty("sha1")] public string Sha1 { get; set; }
+}
+
+public class License
+{
+ [JsonProperty("id")] public string ID { get; set; }
+
+ [JsonProperty("name")] public string Name { get; set; }
+
+ [JsonProperty("url")] public string Url { get; set; }
+}
+
+public class DonationUrls
+{
+ [JsonProperty("id")] public string ID { get; set; }
+
+ [JsonProperty("platform")] public string Platform { get; set; }
+
+ [JsonProperty("url")] public string Url { get; set; }
+}
diff --git a/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs b/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
new file mode 100644
index 00000000..9f1b16e3
--- /dev/null
+++ b/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
@@ -0,0 +1,188 @@
+using CmlLib.Core;
+using Newtonsoft.Json;
+using RestSharp;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.Extensions.Logging;
+using Emerald.CoreX.Store.Modrinth.JSON;
+
+namespace Emerald.CoreX.Store.Modrinth;
+
+public abstract class ModrinthStore : IMinecraftStore
+{
+ protected readonly RestClient _client;
+ public MinecraftPath MCPath { get; }
+ protected readonly ILogger _logger;
+ protected readonly string _projectType;
+ protected Category[] Categories;
+ protected ModrinthStore(MinecraftPath path, ILogger logger, string projectType)
+ {
+ _client = new RestClient("https://api.modrinth.com/v2/");
+ _client.AddDefaultHeader("Accept", "application/json");
+ MCPath = path;
+ _logger = logger;
+ _projectType = projectType;
+ }
+
+
+ protected async Task LoadCategoriesAsync()
+ {
+ var request = new RestRequest("tag/category");
+
+ try
+ {
+ var response = await _client.ExecuteAsync(request);
+ if (response.IsSuccessful)
+ {
+ var all = JsonConvert.DeserializeObject>(response.Content);
+
+ var _categories = all
+ .Where(i => i.header == "categories"
+ && i.project_type == _projectType
+ && !string.IsNullOrWhiteSpace(i.icon)
+ && !string.IsNullOrWhiteSpace(i.name))
+ .ToList();
+ Categories = _categories.ToArray();
+ _logger.LogInformation($"Loaded {_categories.Count} {_projectType} categories.");
+ }
+ else
+ {
+ _logger.LogError($"Failed to load {_projectType} categories. Status code: {response.StatusCode}");
+ }
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, $"Error occurred while loading {_projectType} categories.");
+ }
+ }
+ public virtual async Task SearchAsync(string query, int limit = 15,
+ SearchSortOptions sortOptions = SearchSortOptions.Relevance, string[]? categories = null)
+ {
+ _logger.LogInformation($"Searching store for {_projectType}s with query: {query}");
+
+ try
+ {
+ string categoriesString = (categories != null && categories.Any())
+ ? $"[\"categories:{string.Join("\"],[\"categories:", categories)}]\"],"
+ : "";
+
+ var request = new RestRequest("search")
+ .AddParameter("index", sortOptions.ToString().ToLowerInvariant())
+ .AddParameter("facets", $"[{categoriesString}[\"project_type:{_projectType}\"]]")
+ .AddParameter("limit", limit);
+
+ if (!string.IsNullOrEmpty(query))
+ {
+ request.AddParameter("query", query);
+ }
+
+ var response = await _client.ExecuteAsync(request);
+ if (response.IsSuccessful)
+ {
+ var result = JsonConvert.DeserializeObject(response.Content);
+ _logger.LogInformation($"Search completed successfully. Found {result.TotalHits} {_projectType}s.");
+ return result;
+ }
+ else
+ {
+ _logger.LogError($"API request failed: {response.ErrorMessage}");
+ throw new Exception($"API request failed: {response.ErrorMessage}");
+ }
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, $"Error occurred while searching for {_projectType}s");
+ return null;
+ }
+ }
+
+ public virtual async Task GetItemAsync(string id)
+ {
+ _logger.LogInformation($"Fetching {_projectType} with ID: {id}");
+
+ try
+ {
+ var request = new RestRequest($"project/{id}");
+ var response = await _client.ExecuteAsync(request);
+
+ if (response.IsSuccessful)
+ {
+ var item = JsonConvert.DeserializeObject(response.Content);
+ _logger.LogInformation($"Successfully fetched {_projectType} with ID: {id}");
+ return item;
+ }
+ else
+ {
+ _logger.LogError($"API request failed: {response.ErrorMessage}");
+ throw new Exception($"API request failed: {response.ErrorMessage}");
+ }
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, $"Error occurred while fetching {_projectType} with ID: {id}");
+ return null;
+ }
+ }
+
+ public virtual async Task?> GetVersionsAsync(string id)
+ {
+ _logger.LogInformation($"Fetching versions for {_projectType} with ID: {id}");
+
+ try
+ {
+ var request = new RestRequest($"project/{id}/version");
+ var response = await _client.ExecuteAsync(request);
+
+ if (response.IsSuccessful)
+ {
+ var versions = JsonConvert.DeserializeObject>(response.Content);
+ _logger.LogInformation($"Successfully fetched versions for {_projectType} with ID: {id}");
+ return versions;
+ }
+ else
+ {
+ _logger.LogError($"API request failed: {response.ErrorMessage}");
+ throw new Exception($"API request failed: {response.ErrorMessage}");
+ }
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, $"Error occurred while fetching versions for {_projectType} with ID: {id}");
+ return null;
+ }
+ }
+
+ public virtual async Task DownloadItemAsync(ItemFile file, string projectType)
+ {
+ _logger.LogInformation($"Downloading {projectType} file from URL: {file.Url}");
+
+ try
+ {
+ var request = new RestRequest(file.Url);
+ var response = await _client.ExecuteAsync(request);
+
+ if (response.IsSuccessful)
+ {
+ var filePath = Path.Combine(MCPath.BasePath, projectType, file.Filename);
+ Directory.CreateDirectory(Path.GetDirectoryName(filePath));
+ await File.WriteAllBytesAsync(filePath, response.RawBytes);
+
+ _logger.LogInformation($"Successfully downloaded {projectType} file to: {filePath}");
+ }
+ else
+ {
+ _logger.LogError($"File download failed: {response.ErrorMessage}");
+ throw new Exception($"File download failed: {response.ErrorMessage}");
+ }
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, $"Error occurred while downloading {projectType} file from URL: {file.Url}");
+ throw;
+ }
+ }
+}
diff --git a/Emerald.CoreX/Store/Modrinth/SearchSortOptions.cs b/Emerald.CoreX/Store/Modrinth/SearchSortOptions.cs
new file mode 100644
index 00000000..416e8af9
--- /dev/null
+++ b/Emerald.CoreX/Store/Modrinth/SearchSortOptions.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Emerald.CoreX.Store.Modrinth;
+public enum SearchSortOptions
+{
+ Relevance,
+ Downloads,
+ Follows,
+ Updated,
+ Newest
+}
diff --git a/Emerald.CoreX/Store/Modrinth/Stores.cs b/Emerald.CoreX/Store/Modrinth/Stores.cs
new file mode 100644
index 00000000..d9172302
--- /dev/null
+++ b/Emerald.CoreX/Store/Modrinth/Stores.cs
@@ -0,0 +1,148 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Emerald.CoreX.Store.Modrinth.JSON;
+using Microsoft.Extensions.Logging;
+using CMLLib.Core;
+namespace Emerald.CoreX.Store.Modrinth;
+
+public class ModStore : ModrinthStore
+{
+ public ModStore(MinecraftPath path, ILogger logger) : base(path, logger, "mod")
+ {
+ }
+
+ public ModStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOSDefaultPath()), logger)
+ {
+ }
+
+ public override async Task GetItemAsync(string id)
+ {
+ // Implement mod-specific logic if needed
+ return await base.GetItemAsync(id);
+ }
+
+ public override async Task?> GetVersionsAsync(string id)
+ {
+ // Implement mod-specific logic if needed
+ return await base.GetVersionsAsync(id);
+ }
+
+ public override async Task DownloadItemAsync(ItemFile file, string projectType)
+ {
+ // Implement mod-specific download logic
+ await base.DownloadItemAsync(file, "mods");
+ }
+}
+
+public class PluginStore : ModrinthStore
+{
+ public PluginStore(MinecraftPath path, ILogger logger) : base(path, logger, "plugin")
+ {
+ }
+
+ public PluginStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOSDefaultPath()), logger)
+ {
+ }
+
+ public override async Task GetItemAsync(string id)
+ {
+ return await base.GetItemAsync(id);
+ }
+
+ public override async Task?> GetVersionsAsync(string id)
+ {
+ return await base.GetVersionsAsync(id);
+ }
+
+ public override async Task DownloadItemAsync(ItemFile file, string projectType)
+ {
+ await base.DownloadItemAsync(file, "mods");
+ }
+}
+
+public class ResourcePackStore : ModrinthStore
+{
+ public ResourcePackStore(MinecraftPath path, ILogger logger) : base(path, logger, "resourcepack")
+ {
+ }
+
+ public ResourcePackStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOSDefaultPath()), logger)
+ {
+ }
+
+ public override async Task GetItemAsync(string id)
+ {
+ return await base.GetItemAsync(id);
+ }
+
+ public override async Task?> GetVersionsAsync(string id)
+ {
+ return await base.GetVersionsAsync(id);
+ }
+
+ public override async Task DownloadItemAsync(ItemFile file, string projectType)
+ {
+ await base.DownloadItemAsync(file, "resourcepacks");
+ }
+}
+
+public class ShaderStore : ModrinthStore
+{
+ public ShaderStore(MinecraftPath path, ILogger logger) : base(path, logger, "shader")
+ {
+ }
+
+ public ShaderStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOSDefaultPath()), logger)
+ {
+ }
+
+ public override async Task GetItemAsync(string id)
+ {
+ // Implement shader-specific logic if needed
+ return await base.GetItemAsync(id);
+ }
+
+ public override async Task?> GetVersionsAsync(string id)
+ {
+ // Implement shader-specific logic if needed
+ return await base.GetVersionsAsync(id);
+ }
+
+ public override async Task DownloadItemAsync(ItemFile file, string projectType)
+ {
+ // Implement shader-specific download logic
+ await base.DownloadItemAsync(file, "shaders");
+ }
+}
+
+public class ModpackStore : ModrinthStore
+{
+ public ModpackStore(MinecraftPath path, ILogger logger) : base(path, logger, "modpack")
+ {
+ }
+
+ public ModpackStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOSDefaultPath()), logger)
+ {
+ }
+
+ public override async Task GetItemAsync(string id)
+ {
+ // Implement modpack-specific logic if needed
+ return await base.GetItemAsync(id);
+ }
+
+ public override async Task?> GetVersionsAsync(string id)
+ {
+ // Implement modpack-specific logic if needed
+ return await base.GetVersionsAsync(id);
+ }
+
+ public override async Task DownloadItemAsync(ItemFile file, string projectType)
+ {
+ // Implement modpack-specific download logic
+ await base.DownloadItemAsync(file, "modpacks");
+ }
+}
From 6b9caab1a419722b3caa94a3a20c80523cdd6d3a Mon Sep 17 00:00:00 2001
From: codefactor-io
Date: Thu, 8 Aug 2024 07:13:36 +0000
Subject: [PATCH 28/61] [CodeFactor] Apply fixes
---
Emerald.CoreX/Store/Modrinth/ModrinthStore.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs b/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
index 9f1b16e3..a533b3f3 100644
--- a/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
+++ b/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
@@ -66,7 +66,7 @@ protected async Task LoadCategoriesAsync()
try
{
- string categoriesString = (categories != null && categories.Any())
+ string categoriesString = (categories != null && categories.Length != 0)
? $"[\"categories:{string.Join("\"],[\"categories:", categories)}]\"],"
: "";
From e7d8b845e53e35b0c34268abe68c1d9ab696d3d5 Mon Sep 17 00:00:00 2001
From: NoobNotFound
Date: Thu, 8 Aug 2024 19:48:48 +0530
Subject: [PATCH 29/61] add suppport for loading different categories to
different types in store
---
.../Store/Modrinth/IMinecraftStore.cs | 3 +-
Emerald.CoreX/Store/Modrinth/ModrinthStore.cs | 306 ++++++++----------
2 files changed, 137 insertions(+), 172 deletions(-)
diff --git a/Emerald.CoreX/Store/Modrinth/IMinecraftStore.cs b/Emerald.CoreX/Store/Modrinth/IMinecraftStore.cs
index 678486af..9d61bcea 100644
--- a/Emerald.CoreX/Store/Modrinth/IMinecraftStore.cs
+++ b/Emerald.CoreX/Store/Modrinth/IMinecraftStore.cs
@@ -7,7 +7,7 @@
namespace Emerald.CoreX.Store.Modrinth;
-public interface IModrinthStore
+public interface IMinecraftStore
{
Task SearchAsync(string query, int limit = 15,
SearchSortOptions sortOptions = SearchSortOptions.Relevance, string[]? categories = null);
@@ -15,4 +15,5 @@ public interface IModrinthStore
Task GetItemAsync(string id);
Task?> GetVersionsAsync(string id);
Task DownloadItemAsync(ItemFile file, string projectType);
+ public Category[] Categories { get; }
}
diff --git a/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs b/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
index 9f1b16e3..3e8bc85f 100644
--- a/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
+++ b/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
@@ -12,177 +12,141 @@
namespace Emerald.CoreX.Store.Modrinth;
-public abstract class ModrinthStore : IMinecraftStore
+public class ModStore : ModrinthStore
{
- protected readonly RestClient _client;
- public MinecraftPath MCPath { get; }
- protected readonly ILogger _logger;
- protected readonly string _projectType;
- protected Category[] Categories;
- protected ModrinthStore(MinecraftPath path, ILogger logger, string projectType)
- {
- _client = new RestClient("https://api.modrinth.com/v2/");
- _client.AddDefaultHeader("Accept", "application/json");
- MCPath = path;
- _logger = logger;
- _projectType = projectType;
- }
-
-
- protected async Task LoadCategoriesAsync()
- {
- var request = new RestRequest("tag/category");
-
- try
- {
- var response = await _client.ExecuteAsync(request);
- if (response.IsSuccessful)
- {
- var all = JsonConvert.DeserializeObject>(response.Content);
-
- var _categories = all
- .Where(i => i.header == "categories"
- && i.project_type == _projectType
- && !string.IsNullOrWhiteSpace(i.icon)
- && !string.IsNullOrWhiteSpace(i.name))
- .ToList();
- Categories = _categories.ToArray();
- _logger.LogInformation($"Loaded {_categories.Count} {_projectType} categories.");
- }
- else
- {
- _logger.LogError($"Failed to load {_projectType} categories. Status code: {response.StatusCode}");
- }
- }
- catch (Exception ex)
- {
- _logger.LogError(ex, $"Error occurred while loading {_projectType} categories.");
- }
- }
- public virtual async Task SearchAsync(string query, int limit = 15,
- SearchSortOptions sortOptions = SearchSortOptions.Relevance, string[]? categories = null)
- {
- _logger.LogInformation($"Searching store for {_projectType}s with query: {query}");
-
- try
- {
- string categoriesString = (categories != null && categories.Any())
- ? $"[\"categories:{string.Join("\"],[\"categories:", categories)}]\"],"
- : "";
-
- var request = new RestRequest("search")
- .AddParameter("index", sortOptions.ToString().ToLowerInvariant())
- .AddParameter("facets", $"[{categoriesString}[\"project_type:{_projectType}\"]]")
- .AddParameter("limit", limit);
-
- if (!string.IsNullOrEmpty(query))
- {
- request.AddParameter("query", query);
- }
-
- var response = await _client.ExecuteAsync(request);
- if (response.IsSuccessful)
- {
- var result = JsonConvert.DeserializeObject(response.Content);
- _logger.LogInformation($"Search completed successfully. Found {result.TotalHits} {_projectType}s.");
- return result;
- }
- else
- {
- _logger.LogError($"API request failed: {response.ErrorMessage}");
- throw new Exception($"API request failed: {response.ErrorMessage}");
- }
- }
- catch (Exception ex)
- {
- _logger.LogError(ex, $"Error occurred while searching for {_projectType}s");
- return null;
- }
- }
-
- public virtual async Task GetItemAsync(string id)
- {
- _logger.LogInformation($"Fetching {_projectType} with ID: {id}");
-
- try
- {
- var request = new RestRequest($"project/{id}");
- var response = await _client.ExecuteAsync(request);
-
- if (response.IsSuccessful)
- {
- var item = JsonConvert.DeserializeObject(response.Content);
- _logger.LogInformation($"Successfully fetched {_projectType} with ID: {id}");
- return item;
- }
- else
- {
- _logger.LogError($"API request failed: {response.ErrorMessage}");
- throw new Exception($"API request failed: {response.ErrorMessage}");
- }
- }
- catch (Exception ex)
- {
- _logger.LogError(ex, $"Error occurred while fetching {_projectType} with ID: {id}");
- return null;
- }
- }
-
- public virtual async Task?> GetVersionsAsync(string id)
- {
- _logger.LogInformation($"Fetching versions for {_projectType} with ID: {id}");
-
- try
- {
- var request = new RestRequest($"project/{id}/version");
- var response = await _client.ExecuteAsync(request);
-
- if (response.IsSuccessful)
- {
- var versions = JsonConvert.DeserializeObject>(response.Content);
- _logger.LogInformation($"Successfully fetched versions for {_projectType} with ID: {id}");
- return versions;
- }
- else
- {
- _logger.LogError($"API request failed: {response.ErrorMessage}");
- throw new Exception($"API request failed: {response.ErrorMessage}");
- }
- }
- catch (Exception ex)
- {
- _logger.LogError(ex, $"Error occurred while fetching versions for {_projectType} with ID: {id}");
- return null;
- }
- }
-
- public virtual async Task DownloadItemAsync(ItemFile file, string projectType)
- {
- _logger.LogInformation($"Downloading {projectType} file from URL: {file.Url}");
-
- try
- {
- var request = new RestRequest(file.Url);
- var response = await _client.ExecuteAsync(request);
-
- if (response.IsSuccessful)
- {
- var filePath = Path.Combine(MCPath.BasePath, projectType, file.Filename);
- Directory.CreateDirectory(Path.GetDirectoryName(filePath));
- await File.WriteAllBytesAsync(filePath, response.RawBytes);
-
- _logger.LogInformation($"Successfully downloaded {projectType} file to: {filePath}");
- }
- else
- {
- _logger.LogError($"File download failed: {response.ErrorMessage}");
- throw new Exception($"File download failed: {response.ErrorMessage}");
- }
- }
- catch (Exception ex)
- {
- _logger.LogError(ex, $"Error occurred while downloading {projectType} file from URL: {file.Url}");
- throw;
- }
+ public ModStore(MinecraftPath path, ILogger logger) : base(path, logger, "mod")
+ {
+ }
+
+ public ModStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOSDefaultPath()), logger)
+ {
+ }
+
+ public override async Task GetItemAsync(string id)
+ {
+ // Implement mod-specific logic if needed
+ return await base.GetItemAsync(id);
+ }
+
+ public override async Task?> GetVersionsAsync(string id)
+ {
+ // Implement mod-specific logic if needed
+ return await base.GetVersionsAsync(id);
+ }
+
+ public override async Task DownloadItemAsync(ItemFile file, string projectType)
+ {
+ // Implement mod-specific download logic
+ await base.DownloadItemAsync(file, "mods");
+ }
+}
+
+public class PluginStore : ModrinthStore
+{
+ public PluginStore(MinecraftPath path, ILogger logger) : base(path, logger, "plugin")
+ {
+ }
+
+ public PluginStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOSDefaultPath()), logger)
+ {
+ }
+
+ public override async Task GetItemAsync(string id)
+ {
+ return await base.GetItemAsync(id);
+ }
+
+ public override async Task?> GetVersionsAsync(string id)
+ {
+ return await base.GetVersionsAsync(id);
+ }
+
+ public override async Task DownloadItemAsync(ItemFile file, string projectType)
+ {
+ await base.DownloadItemAsync(file, "mods");
+ }
+}
+
+public class ResourcePackStore : ModrinthStore
+{
+ public ResourcePackStore(MinecraftPath path, ILogger logger) : base(path, logger, "resourcepack")
+ {
+ }
+
+ public ResourcePackStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOSDefaultPath()), logger)
+ {
+ }
+
+ public override async Task GetItemAsync(string id)
+ {
+ return await base.GetItemAsync(id);
+ }
+
+ public override async Task?> GetVersionsAsync(string id)
+ {
+ return await base.GetVersionsAsync(id);
+ }
+
+ public override async Task DownloadItemAsync(ItemFile file, string projectType)
+ {
+ await base.DownloadItemAsync(file, "resourcepacks");
+ }
+}
+
+public class ShaderStore : ModrinthStore
+{
+ public ShaderStore(MinecraftPath path, ILogger logger) : base(path, logger, "shader")
+ {
+ }
+
+ public ShaderStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOSDefaultPath()), logger)
+ {
+ }
+
+ public override async Task GetItemAsync(string id)
+ {
+ // Implement shader-specific logic if needed
+ return await base.GetItemAsync(id);
+ }
+
+ public override async Task?> GetVersionsAsync(string id)
+ {
+ // Implement shader-specific logic if needed
+ return await base.GetVersionsAsync(id);
+ }
+
+ public override async Task DownloadItemAsync(ItemFile file, string projectType)
+ {
+ // Implement shader-specific download logic
+ await base.DownloadItemAsync(file, "shaders");
+ }
+}
+
+public class ModpackStore : ModrinthStore
+{
+ public ModpackStore(MinecraftPath path, ILogger logger) : base(path, logger, "modpack")
+ {
+ }
+
+ public ModpackStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOSDefaultPath()), logger)
+ {
+ }
+
+ public override async Task GetItemAsync(string id)
+ {
+ // Implement modpack-specific logic if needed
+ return await base.GetItemAsync(id);
+ }
+
+ public override async Task?> GetVersionsAsync(string id)
+ {
+ // Implement modpack-specific logic if needed
+ return await base.GetVersionsAsync(id);
+ }
+
+ public override async Task DownloadItemAsync(ItemFile file, string projectType)
+ {
+ // Implement modpack-specific download logic
+ await base.DownloadItemAsync(file, "modpacks");
}
}
From 5e1476f153569a9897d615f44665d171657e1d8f Mon Sep 17 00:00:00 2001
From: NoobNotFound
Date: Thu, 8 Aug 2024 20:06:11 +0530
Subject: [PATCH 30/61] undo 1 change
---
Emerald.CoreX/Store/Modrinth/ModrinthStore.cs | 308 ++++++++++--------
1 file changed, 174 insertions(+), 134 deletions(-)
diff --git a/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs b/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
index 3e8bc85f..d978c353 100644
--- a/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
+++ b/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
@@ -12,141 +12,181 @@
namespace Emerald.CoreX.Store.Modrinth;
-public class ModStore : ModrinthStore
+public abstract class ModrinthStore : IMinecraftStore
{
- public ModStore(MinecraftPath path, ILogger logger) : base(path, logger, "mod")
- {
- }
-
- public ModStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOSDefaultPath()), logger)
- {
- }
-
- public override async Task GetItemAsync(string id)
- {
- // Implement mod-specific logic if needed
- return await base.GetItemAsync(id);
- }
-
- public override async Task?> GetVersionsAsync(string id)
- {
- // Implement mod-specific logic if needed
- return await base.GetVersionsAsync(id);
- }
-
- public override async Task DownloadItemAsync(ItemFile file, string projectType)
- {
- // Implement mod-specific download logic
- await base.DownloadItemAsync(file, "mods");
- }
-}
-
-public class PluginStore : ModrinthStore
-{
- public PluginStore(MinecraftPath path, ILogger logger) : base(path, logger, "plugin")
- {
- }
-
- public PluginStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOSDefaultPath()), logger)
- {
- }
-
- public override async Task GetItemAsync(string id)
- {
- return await base.GetItemAsync(id);
- }
-
- public override async Task?> GetVersionsAsync(string id)
- {
- return await base.GetVersionsAsync(id);
- }
-
- public override async Task DownloadItemAsync(ItemFile file, string projectType)
- {
- await base.DownloadItemAsync(file, "mods");
- }
-}
-
-public class ResourcePackStore : ModrinthStore
-{
- public ResourcePackStore(MinecraftPath path, ILogger logger) : base(path, logger, "resourcepack")
- {
- }
-
- public ResourcePackStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOSDefaultPath()), logger)
- {
- }
-
- public override async Task GetItemAsync(string id)
- {
- return await base.GetItemAsync(id);
- }
-
- public override async Task?> GetVersionsAsync(string id)
- {
- return await base.GetVersionsAsync(id);
- }
-
- public override async Task DownloadItemAsync(ItemFile file, string projectType)
- {
- await base.DownloadItemAsync(file, "resourcepacks");
- }
-}
-
-public class ShaderStore : ModrinthStore
-{
- public ShaderStore(MinecraftPath path, ILogger logger) : base(path, logger, "shader")
- {
- }
-
- public ShaderStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOSDefaultPath()), logger)
- {
- }
-
- public override async Task GetItemAsync(string id)
- {
- // Implement shader-specific logic if needed
- return await base.GetItemAsync(id);
- }
-
- public override async Task?> GetVersionsAsync(string id)
- {
- // Implement shader-specific logic if needed
- return await base.GetVersionsAsync(id);
- }
-
- public override async Task DownloadItemAsync(ItemFile file, string projectType)
- {
- // Implement shader-specific download logic
- await base.DownloadItemAsync(file, "shaders");
- }
-}
-
-public class ModpackStore : ModrinthStore
-{
- public ModpackStore(MinecraftPath path, ILogger logger) : base(path, logger, "modpack")
- {
- }
-
- public ModpackStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOSDefaultPath()), logger)
- {
- }
-
- public override async Task GetItemAsync(string id)
- {
- // Implement modpack-specific logic if needed
- return await base.GetItemAsync(id);
+ protected readonly RestClient _client;
+ public MinecraftPath MCPath { get; }
+ protected readonly ILogger _logger;
+ protected readonly string _projectType;
+ public Category[] Categories { get; private set; } = [];
+ protected ModrinthStore(MinecraftPath path, ILogger logger, string projectType)
+ {
+ _client = new RestClient("https://api.modrinth.com/v2/");
+ _client.AddDefaultHeader("Accept", "application/json");
+ MCPath = path;
+ _logger = logger;
+ _projectType = projectType;
+ }
+
+ public async Task LoadCategoriesAsync()
+ {
+ var request = new RestRequest("tag/category");
+
+ try
+ {
+ var response = await _client.ExecuteAsync(request);
+ if (response.IsSuccessful)
+ {
+ var all = JsonConvert.DeserializeObject>(response.Content);
+
+ var _categories = all
+ .Where(i => i.header == "categories"
+ && i.project_type == _projectType
+ && !string.IsNullOrWhiteSpace(i.icon)
+ && !string.IsNullOrWhiteSpace(i.name))
+ .ToList();
+ Categories = _categories.ToArray();
+ _logger.LogInformation($"Loaded {_categories.Count} {_projectType} categories.");
+ }
+ else
+ {
+ _logger.LogError($"Failed to load {_projectType} categories. Status code: {response.StatusCode}");
+ }
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, $"Error occurred while loading {_projectType} categories.");
+ }
+ }
+ public virtual async Task SearchAsync(string query, int limit = 15,
+ SearchSortOptions sortOptions = SearchSortOptions.Relevance, string[]? categories = null)
+ {
+ _logger.LogInformation($"Searching store for {_projectType}s with query: {query}");
+
+ try
+ {
+ // Prepare the facets parameter correctly
+ string facets = "[[\"project_type:" + _projectType + "\"]";
+ if (categories != null && categories.Any())
+ {
+ var categoryFacets = categories.Select(cat => $"\"categories:{cat}\"");
+ facets += ",[" + string.Join(",", categoryFacets) + "]";
+ }
+ facets += "]";
+
+ var request = new RestRequest("search")
+ .AddParameter("index", sortOptions.ToString().ToLowerInvariant())
+ .AddParameter("facets", facets)
+ .AddParameter("limit", limit);
+
+ if (!string.IsNullOrEmpty(query))
+ {
+ request.AddParameter("query", query);
+ }
+
+ var response = await _client.ExecuteAsync(request);
+ if (response.IsSuccessful)
+ {
+ var result = JsonConvert.DeserializeObject(response.Content);
+ _logger.LogInformation($"Search completed successfully. Found {result.TotalHits} {_projectType}s.");
+ return result;
+ }
+ else
+ {
+ _logger.LogError($"API request failed: {response.ErrorMessage}");
+ throw new Exception($"API request failed: {response.ErrorMessage}");
+ }
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, $"Error occurred while searching for {_projectType}s");
+ return null;
+ }
+ }
+
+ public virtual async Task GetItemAsync(string id)
+ {
+ _logger.LogInformation($"Fetching {_projectType} with ID: {id}");
+
+ try
+ {
+ var request = new RestRequest($"project/{id}");
+ var response = await _client.ExecuteAsync(request);
+
+ if (response.IsSuccessful)
+ {
+ var item = JsonConvert.DeserializeObject(response.Content);
+ _logger.LogInformation($"Successfully fetched {_projectType} with ID: {id}");
+ return item;
+ }
+ else
+ {
+ _logger.LogError($"API request failed: {response.ErrorMessage}");
+ throw new Exception($"API request failed: {response.ErrorMessage}");
+ }
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, $"Error occurred while fetching {_projectType} with ID: {id}");
+ return null;
+ }
+ }
+
+ public virtual async Task?> GetVersionsAsync(string id)
+ {
+ _logger.LogInformation($"Fetching versions for {_projectType} with ID: {id}");
+
+ try
+ {
+ var request = new RestRequest($"project/{id}/version");
+ var response = await _client.ExecuteAsync(request);
+
+ if (response.IsSuccessful)
+ {
+ var versions = JsonConvert.DeserializeObject>(response.Content);
+ _logger.LogInformation($"Successfully fetched versions for {_projectType} with ID: {id}");
+ return versions;
+ }
+ else
+ {
+ _logger.LogError($"API request failed: {response.ErrorMessage}");
+ throw new Exception($"API request failed: {response.ErrorMessage}");
+ }
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, $"Error occurred while fetching versions for {_projectType} with ID: {id}");
+ return null;
+ }
+ }
+
+ public virtual async Task DownloadItemAsync(ItemFile file, string projectType)
+ {
+ _logger.LogInformation($"Downloading {projectType} file from URL: {file.Url}");
+
+ try
+ {
+ var request = new RestRequest(file.Url);
+ var response = await _client.ExecuteAsync(request);
+ if (response.IsSuccessful)
+ {
+ var filePath = Path.Combine(MCPath.BasePath, projectType, file.Filename);
+ Directory.CreateDirectory(Path.GetDirectoryName(filePath));
+ await File.WriteAllBytesAsync(filePath, response.RawBytes);
+
+ _logger.LogInformation($"Successfully downloaded {projectType} file to: {filePath}");
+ }
+ else
+ {
+ _logger.LogError($"File download failed: {response.ErrorMessage}");
+ throw new Exception($"File download failed: {response.ErrorMessage}");
+ }
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, $"Error occurred while downloading {projectType} file from URL: {file.Url}");
+ throw;
+ }
}
- public override async Task?> GetVersionsAsync(string id)
- {
- // Implement modpack-specific logic if needed
- return await base.GetVersionsAsync(id);
- }
-
- public override async Task DownloadItemAsync(ItemFile file, string projectType)
- {
- // Implement modpack-specific download logic
- await base.DownloadItemAsync(file, "modpacks");
- }
}
From 05b9a094741892f60eba0d13fa3473d252dd0d0b Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Thu, 22 Aug 2024 14:51:12 +0200
Subject: [PATCH 31/61] =?UTF-8?q?=F0=9F=91=B7=20Implement=20central=20pack?=
=?UTF-8?q?age=20management=20(#42)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* ⚰ Remove Nuget package references from Emerald.App.csproj
* ⚰ Remove Nuget package references from Emerald.Core.csproj
* ⚰ Remove Nuget package references from Emerald.CoreX.csproj
* 📌 Add dependencies to Directory.Packages.props
* 👷 Implement central package management in packaging project
* 📌 Disable central package management for Emerald.Core
* 💡 Remove dependency placeholder for Emerald.Core in central package management
---
Directory.Packages.props | 17 ++++++++++++++++
.../Emerald.App.Package/Package.WinUI.wapproj | 4 ++--
Emerald.App/Emerald.App/Emerald.App.csproj | 20 +++++++++----------
Emerald.Core/Emerald.Core.csproj | 3 ++-
Emerald.CoreX/Emerald.CoreX.csproj | 14 ++++++-------
5 files changed, 38 insertions(+), 20 deletions(-)
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 0cea764d..9c44b086 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -5,5 +5,22 @@
See https://aka.platform.uno/using-uno-sdk for more information.
-->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Emerald.App/Emerald.App.Package/Package.WinUI.wapproj b/Emerald.App/Emerald.App.Package/Package.WinUI.wapproj
index c76b14af..d886be42 100644
--- a/Emerald.App/Emerald.App.Package/Package.WinUI.wapproj
+++ b/Emerald.App/Emerald.App.Package/Package.WinUI.wapproj
@@ -158,10 +158,10 @@
-
+
build
-
+
build
diff --git a/Emerald.App/Emerald.App/Emerald.App.csproj b/Emerald.App/Emerald.App/Emerald.App.csproj
index c7306220..0532650a 100644
--- a/Emerald.App/Emerald.App/Emerald.App.csproj
+++ b/Emerald.App/Emerald.App/Emerald.App.csproj
@@ -38,16 +38,16 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/Emerald.Core/Emerald.Core.csproj b/Emerald.Core/Emerald.Core.csproj
index d143325d..710a97c8 100644
--- a/Emerald.Core/Emerald.Core.csproj
+++ b/Emerald.Core/Emerald.Core.csproj
@@ -4,10 +4,11 @@
net8.0
enable
enable
+ false
-
+
diff --git a/Emerald.CoreX/Emerald.CoreX.csproj b/Emerald.CoreX/Emerald.CoreX.csproj
index d875fd8b..8f192bc8 100644
--- a/Emerald.CoreX/Emerald.CoreX.csproj
+++ b/Emerald.CoreX/Emerald.CoreX.csproj
@@ -7,12 +7,12 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
\ No newline at end of file
From da23505ca2e02c5aca378c1e5c1544ad021ce2c0 Mon Sep 17 00:00:00 2001
From: NoobNotFound
Date: Thu, 22 Aug 2024 18:26:36 +0530
Subject: [PATCH 32/61] declare verison in InstallerPage
---
Emerald.App/Emerald.App/Views/Store/InstallerPage.xaml.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Emerald.App/Emerald.App/Views/Store/InstallerPage.xaml.cs b/Emerald.App/Emerald.App/Views/Store/InstallerPage.xaml.cs
index a72cf7a9..1f580601 100644
--- a/Emerald.App/Emerald.App/Views/Store/InstallerPage.xaml.cs
+++ b/Emerald.App/Emerald.App/Views/Store/InstallerPage.xaml.cs
@@ -9,7 +9,7 @@ namespace Emerald.WinUI.Views.Store
public sealed partial class InstallerPage : Page
{
public StoreItem Item { get; set; }
- private ObservableCollection Versions = new();
+ private ObservableCollection Versions = new();
public InstallerPage()
{
InitializeComponent();
From e38d23a715f0676e6d37403acaa28923860b4dd8 Mon Sep 17 00:00:00 2001
From: NoobNotFound
Date: Thu, 22 Aug 2024 18:30:36 +0530
Subject: [PATCH 33/61] remove the need of `GithubClientID`
---
.gitignore | 4 +---
Emerald.App/Emerald.App/Emerald.App.csproj | 9 +--------
Emerald.App/Emerald.App/Helpers/Updater/Updater.cs | 8 +++-----
3 files changed, 5 insertions(+), 16 deletions(-)
diff --git a/.gitignore b/.gitignore
index 83a8eded..d65e71a2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -402,9 +402,7 @@ solution-config.props
# Publish Profiles
!**/Properties/PublishProfiles/*.pubxml
-# Azure Active Directory and GitHub OAUTH tokens
+# Azure Active Directory tokens
/Emerald.App/Emerald.App/MsalClientID.txt
/Emerald.Core/MsalClientID.txt
-/Emerald.App/Emerald.App/GithubClientID.txt
-Emerald.App/GithubClientID.txt
Emerald.App/MsalClientID.txt
diff --git a/Emerald.App/Emerald.App/Emerald.App.csproj b/Emerald.App/Emerald.App/Emerald.App.csproj
index 0532650a..9bb28fb5 100644
--- a/Emerald.App/Emerald.App/Emerald.App.csproj
+++ b/Emerald.App/Emerald.App/Emerald.App.csproj
@@ -1,4 +1,4 @@
-
+
WinExe
@@ -15,19 +15,12 @@
-
-
-
- Always
-
-
-
Always
diff --git a/Emerald.App/Emerald.App/Helpers/Updater/Updater.cs b/Emerald.App/Emerald.App/Helpers/Updater/Updater.cs
index 246642bb..b11ab1fe 100644
--- a/Emerald.App/Emerald.App/Helpers/Updater/Updater.cs
+++ b/Emerald.App/Emerald.App/Helpers/Updater/Updater.cs
@@ -1,4 +1,4 @@
-using CmlLib.Core;
+using CmlLib.Core;
using CommunityToolkit.WinUI.Helpers;
using Emerald.Core;
using Emerald.Core.Tasks;
@@ -39,9 +39,7 @@ public Updater()
bool IsInitialized = false;
public async System.Threading.Tasks.Task Initialize()
{
- var cId = await FileIO.ReadTextAsync(await StorageFile.GetFileFromPathAsync($"{Windows.ApplicationModel.Package.Current.InstalledPath}\\GithubClientID.txt"));
-
- Client = new GitHubClient(new Octokit.ProductHeaderValue(cId));
+ Client = new GitHubClient(new Octokit.ProductHeaderValue("Reverside.Emerald"));
IsInitialized = true;
}
private bool isRunning = false;
@@ -164,4 +162,4 @@ private async void Install(string path)
Process.Start(startInfo);
}
}
-}
\ No newline at end of file
+}
From ae1f893b68b02e16e6a3659d0bb7b3ef1ef697ee Mon Sep 17 00:00:00 2001
From: NoobNotFound <8273016+NoobNotFound@users.noreply.github.com>
Date: Thu, 22 Aug 2024 18:46:32 +0530
Subject: [PATCH 34/61] fix some typos in mod downloader, update some
dependencies
---
Directory.Packages.props | 6 +++---
Emerald.CoreX/Store/Modrinth/JSON.cs | 1 +
Emerald.CoreX/Store/Modrinth/Stores.cs | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 9c44b086..33ac9a87 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -17,10 +17,10 @@
-
-
+
+
-
+
\ No newline at end of file
diff --git a/Emerald.CoreX/Store/Modrinth/JSON.cs b/Emerald.CoreX/Store/Modrinth/JSON.cs
index fee9bfea..53753575 100644
--- a/Emerald.CoreX/Store/Modrinth/JSON.cs
+++ b/Emerald.CoreX/Store/Modrinth/JSON.cs
@@ -4,6 +4,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Newtonsoft.Json;
namespace Emerald.CoreX.Store.Modrinth.JSON;
diff --git a/Emerald.CoreX/Store/Modrinth/Stores.cs b/Emerald.CoreX/Store/Modrinth/Stores.cs
index d9172302..ae3c7605 100644
--- a/Emerald.CoreX/Store/Modrinth/Stores.cs
+++ b/Emerald.CoreX/Store/Modrinth/Stores.cs
@@ -5,7 +5,7 @@
using System.Threading.Tasks;
using Emerald.CoreX.Store.Modrinth.JSON;
using Microsoft.Extensions.Logging;
-using CMLLib.Core;
+using CmlLib.Core;
namespace Emerald.CoreX.Store.Modrinth;
public class ModStore : ModrinthStore
From 2e9e7a486704d4c21c6819252eeed762519afffd Mon Sep 17 00:00:00 2001
From: codefactor-io
Date: Thu, 22 Aug 2024 13:21:02 +0000
Subject: [PATCH 35/61] [CodeFactor] Apply fixes
---
Emerald.CoreX/Store/Modrinth/ModrinthStore.cs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs b/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
index d978c353..93320a78 100644
--- a/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
+++ b/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
@@ -67,7 +67,7 @@ public async Task LoadCategoriesAsync()
{
// Prepare the facets parameter correctly
string facets = "[[\"project_type:" + _projectType + "\"]";
- if (categories != null && categories.Any())
+ if (categories != null && categories.Length != 0)
{
var categoryFacets = categories.Select(cat => $"\"categories:{cat}\"");
facets += ",[" + string.Join(",", categoryFacets) + "]";
@@ -188,5 +188,4 @@ public virtual async Task DownloadItemAsync(ItemFile file, string projectType)
throw;
}
}
-
}
From 6f9843c002fe7a38d9be1b4e3e5792f6022cc3ae Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Sat, 24 Aug 2024 10:27:40 +0200
Subject: [PATCH 36/61] =?UTF-8?q?=F0=9F=91=94=20Fix=20header=20identity=20?=
=?UTF-8?q?typo?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Lamparter
---
Emerald.App/Emerald.App/Helpers/Updater/Updater.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Emerald.App/Emerald.App/Helpers/Updater/Updater.cs b/Emerald.App/Emerald.App/Helpers/Updater/Updater.cs
index b11ab1fe..aa8b6086 100644
--- a/Emerald.App/Emerald.App/Helpers/Updater/Updater.cs
+++ b/Emerald.App/Emerald.App/Helpers/Updater/Updater.cs
@@ -39,7 +39,7 @@ public Updater()
bool IsInitialized = false;
public async System.Threading.Tasks.Task Initialize()
{
- Client = new GitHubClient(new Octokit.ProductHeaderValue("Reverside.Emerald"));
+ Client = new GitHubClient(new Octokit.ProductHeaderValue("Riverside.Emerald"));
IsInitialized = true;
}
private bool isRunning = false;
From 8dc48d7b5c1b79c1f4f68541a7b6f5e6d8a8c0bc Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Sun, 25 Aug 2024 09:46:26 +0100
Subject: [PATCH 37/61] =?UTF-8?q?=F0=9F=93=84=20Implement=20MIT=20licence?=
=?UTF-8?q?=20(#44)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
LICENSE.md | 53 +++++++++--------------------------------------------
1 file changed, 9 insertions(+), 44 deletions(-)
diff --git a/LICENSE.md b/LICENSE.md
index f28a54a9..b5afa333 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,56 +1,21 @@
-**Nightshade Vexillum License**
+MIT License
-```
-Emoji are used within this document to outwardly express conventions of easy-to-read documents, and/or help others understand the text at their convenience, if some words may be unclear to them.
-The Emoji contained within these documents may not wholly convey the associated meaning, and the First Party does not warrant the misunderstanding of such.
-```
+Copyright (c) 2021-2024 Riverside Valley Corporation
-## 📖 Definitions
-
-#### **SOFTWARE**
-
-The Software is the source-code, executable files, documentation and all associated documents, usually found within this repository.
-
-#### **FIRST PARTY**
-
-The First Party are the Copyright Holders of the Software, as defined in **1️⃣ Section I: Parties**.
-
-#### **THIRD PARTY**
-
-The Third Party is any party that is **not** the First Party - see the **📖 Oxford English Dictionary** for details.
-
-#### **Eligible Party**
-
-An Eligible Party is a party that has been accepted by the First Party. By default manner, the First Party automatically accepts any party that wishes to use the software with no medium of communication other than this license required. The First Party may restrict this license for a Third Party, under any period of time, per their discretion.
-
-
----
-
-### 1️⃣ Section I: Parties
-
-Copyright (c) 2021-2024 Riverside Valley (the "First Party")
-
-Licensed to any Eligible Party.
-
-
-### 2️⃣ Section II: Licensing
-
-
-
-Permission is hereby granted, free of charge, to any Eligible Party obtaining a substantial portion
-of this Software, to deal in the Software without restriction, including without limitation the rights
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
-THE FIRST PARTY ASSERTS THE MORAL RIGHT TO BE IDENTIFIED AS THE DEVELOPER OR PRODUCER OF THIS SOFTWARE.
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
-**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.**
-
-**IF A THIRD PARTY CONTRADICTS THIS LICENSE, WITHOUT PERMISSION BY MEDIUM OF OFFICIAL COMMUNICATION, THE FIRST PARTY RESERVES THE RIGHT, IN THE NAME OF THE LAW TO CLAIM OR SEIZE THE CONTRADICTING SOFTWARE RIGHTFULLY AND SHOULD NOT BE HINDERED TO DO SO, PER THE FIRST PARTY'S DISCRETION.**
+SOFTWARE.
From 6fec37591dc2ee2321c35fe03579f1853b08a972 Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Sun, 25 Aug 2024 09:53:54 +0100
Subject: [PATCH 38/61] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Remov?=
=?UTF-8?q?e=20contributor=20section=20from=20README?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Lamparter
---
README.md | 6 ------
1 file changed, 6 deletions(-)
diff --git a/README.md b/README.md
index e3e19bd1..5f12a41c 100644
--- a/README.md
+++ b/README.md
@@ -64,12 +64,6 @@ There are multiple ways to participate in the community:
└──Emerald.Core // Emerald core code (such as code related to launching and modifying Minecraft
```
-### 🗃️ Contributors
-
-
-
-
-
## 🔨 Building the Code
### 1️⃣ Prerequisites
From bbbba853cc956ba6918200834ef38a48e2cf2c91 Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Sun, 25 Aug 2024 10:23:29 +0100
Subject: [PATCH 39/61] =?UTF-8?q?=E2=9E=95=20Upgrade=20from=20Newtonsoft.J?=
=?UTF-8?q?son=20to=20System.Text.Json=20(#45)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Directory.Packages.props | 1 +
.../Emerald.App.Package/Package.WinUI.wapproj | 1 +
Emerald.App/Emerald.App/Emerald.App.csproj | 1 +
.../Emerald.App/Helpers/Settings/JSON.cs | 9 +-
.../Helpers/Settings/SettingsSystem.cs | 20 +--
.../Emerald.App/Helpers/Updater/Updater.cs | 2 +-
Emerald.Core/Emerald.Core.csproj | 1 +
Emerald.Core/News/NewsHelper.cs | 4 +-
Emerald.Core/Optifine.cs | 4 +-
Emerald.Core/Store/Labrinth.cs | 8 +-
Emerald.CoreX/Emerald.CoreX.csproj | 1 +
Emerald.CoreX/Store/Modrinth/JSON.cs | 163 +++++++++---------
Emerald.CoreX/Store/Modrinth/ModrinthStore.cs | 10 +-
Emerald/Emerald.csproj | 3 +
14 files changed, 119 insertions(+), 109 deletions(-)
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 33ac9a87..f986da2a 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -14,6 +14,7 @@
+
diff --git a/Emerald.App/Emerald.App.Package/Package.WinUI.wapproj b/Emerald.App/Emerald.App.Package/Package.WinUI.wapproj
index d886be42..9920f1a8 100644
--- a/Emerald.App/Emerald.App.Package/Package.WinUI.wapproj
+++ b/Emerald.App/Emerald.App.Package/Package.WinUI.wapproj
@@ -164,6 +164,7 @@
build
+
diff --git a/Emerald.App/Emerald.App/Emerald.App.csproj b/Emerald.App/Emerald.App/Emerald.App.csproj
index 9bb28fb5..30fc8280 100644
--- a/Emerald.App/Emerald.App/Emerald.App.csproj
+++ b/Emerald.App/Emerald.App/Emerald.App.csproj
@@ -39,6 +39,7 @@
+
diff --git a/Emerald.App/Emerald.App/Helpers/Settings/JSON.cs b/Emerald.App/Emerald.App/Helpers/Settings/JSON.cs
index 19f0dc87..8122d468 100644
--- a/Emerald.App/Emerald.App/Helpers/Settings/JSON.cs
+++ b/Emerald.App/Emerald.App/Helpers/Settings/JSON.cs
@@ -1,10 +1,11 @@
-using CmlLib.Core;
+using CmlLib.Core;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.WinUI.Helpers;
using Emerald.Core.Store.Enums;
using Microsoft.UI;
using Microsoft.UI.Xaml;
-using Newtonsoft.Json;
+using System.Text.Json;
+using System.Text.Json.Serialization;
using System;
using System.Collections.Generic;
using Windows.UI;
@@ -13,7 +14,7 @@ namespace Emerald.WinUI.Helpers.Settings.JSON
public class JSON : Models.Model
{
public string Serialize()
- => JsonConvert.SerializeObject(this, Formatting.Indented);
+ => JsonSerializer.Serialize(this, new JsonSerializerOptions { WriteIndented = true });
}
public class SettingsBackup : JSON
@@ -21,7 +22,7 @@ public class SettingsBackup : JSON
public string Backup { get; set; }
public string Name { get; set; }
public DateTime Time { get; set; }
- //ik there is Time.ToString() lol
+ // ik there is Time.ToString() lol
public string DateString => $"{Time.ToLongDateString()} {Time.ToShortTimeString()}";
}
diff --git a/Emerald.App/Emerald.App/Helpers/Settings/SettingsSystem.cs b/Emerald.App/Emerald.App/Helpers/Settings/SettingsSystem.cs
index e083f7d2..4e62fd6e 100644
--- a/Emerald.App/Emerald.App/Helpers/Settings/SettingsSystem.cs
+++ b/Emerald.App/Emerald.App/Helpers/Settings/SettingsSystem.cs
@@ -1,5 +1,5 @@
using Emerald.WinUI.Helpers.Settings.JSON;
-using Newtonsoft.Json;
+using System.Text.Json;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -21,11 +21,11 @@ public static T GetSerializedFromSettings(string key, T def)
{
json = ApplicationData.Current.RoamingSettings.Values[key] as string;
- return JsonConvert.DeserializeObject(json);
+ return JsonSerializer.Deserialize(json);
}
catch
{
- json = JsonConvert.SerializeObject(def);
+ json = JsonSerializer.Serialize(def);
ApplicationData.Current.RoamingSettings.Values[key] = json;
return def;
}
@@ -39,14 +39,14 @@ public static void LoadData()
{
APINoMatch?.Invoke(null, ApplicationData.Current.RoamingSettings.Values["Settings"] as string);
ApplicationData.Current.RoamingSettings.Values["Settings"] = JSON.Settings.CreateNew().Serialize();
- Settings = JsonConvert.DeserializeObject(ApplicationData.Current.RoamingSettings.Values["Settings"] as string);
+ Settings = JsonSerializer.Deserialize(ApplicationData.Current.RoamingSettings.Values["Settings"] as string);
}
}
public static async Task CreateBackup(string system)
{
string json = await FileIO.ReadTextAsync(await ApplicationData.Current.LocalFolder.CreateFileAsync("backups.json", CreationCollisionOption.OpenIfExists));
- var l = json.IsNullEmptyOrWhiteSpace() ? new Backups() : JsonConvert.DeserializeObject(json);
+ var l = json.IsNullEmptyOrWhiteSpace() ? new Backups() : JsonSerializer.Deserialize(json);
var bl = l.AllBackups == null ? new List() : l.AllBackups.ToList();
bl.Add(new SettingsBackup() { Time = DateTime.Now, Backup = system });
@@ -59,7 +59,7 @@ public static async Task CreateBackup(string system)
public static async Task DeleteBackup(int Index)
{
string json = await FileIO.ReadTextAsync(await ApplicationData.Current.LocalFolder.CreateFileAsync("backups.json", CreationCollisionOption.OpenIfExists));
- var l = json.IsNullEmptyOrWhiteSpace() ? new Backups() : JsonConvert.DeserializeObject(json);
+ var l = json.IsNullEmptyOrWhiteSpace() ? new Backups() : JsonSerializer.Deserialize(json);
var bl = l.AllBackups == null ? new List() : l.AllBackups.ToList();
bl.RemoveAt(Index);
@@ -72,7 +72,7 @@ public static async Task DeleteBackup(int Index)
public static async Task DeleteBackup(DateTime time)
{
string json = await FileIO.ReadTextAsync(await ApplicationData.Current.LocalFolder.CreateFileAsync("backups.json", CreationCollisionOption.OpenIfExists));
- var l = json.IsNullEmptyOrWhiteSpace() ? new Backups() : JsonConvert.DeserializeObject(json);
+ var l = json.IsNullEmptyOrWhiteSpace() ? new Backups() : JsonSerializer.Deserialize(json);
var bl = l.AllBackups == null ? new List() : l.AllBackups.ToList();
bl.Remove(x => x.Time == time);
@@ -84,7 +84,7 @@ public static async Task DeleteBackup(DateTime time)
public static async Task RenameBackup(DateTime time, string name)
{
string json = await FileIO.ReadTextAsync(await ApplicationData.Current.LocalFolder.CreateFileAsync("backups.json", CreationCollisionOption.OpenIfExists));
- var l = json.IsNullEmptyOrWhiteSpace() ? new Backups() : JsonConvert.DeserializeObject(json);
+ var l = json.IsNullEmptyOrWhiteSpace() ? new Backups() : JsonSerializer.Deserialize(json);
var bl = l.AllBackups == null ? new List() : l.AllBackups.ToList();
bl.FirstOrDefault(x => x.Time == time).Name = name;
@@ -97,7 +97,7 @@ public static async Task RenameBackup(DateTime time, string name)
public static async Task> GetBackups()
{
string json = await FileIO.ReadTextAsync(await ApplicationData.Current.LocalFolder.CreateFileAsync("backups.json", CreationCollisionOption.OpenIfExists));
- var l = json.IsNullEmptyOrWhiteSpace() ? new Backups() : JsonConvert.DeserializeObject(json);
+ var l = json.IsNullEmptyOrWhiteSpace() ? new Backups() : JsonSerializer.Deserialize(json);
return l.AllBackups == null ? new List() : l.AllBackups.ToList();
}
@@ -106,7 +106,7 @@ public static void SaveData()
{
Settings.LastSaved = DateTime.Now;
ApplicationData.Current.RoamingSettings.Values["Settings"] = Settings.Serialize();
- ApplicationData.Current.RoamingSettings.Values["Accounts"] = JsonConvert.SerializeObject(Accounts);
+ ApplicationData.Current.RoamingSettings.Values["Accounts"] = JsonSerializer.Serialize(Accounts);
}
}
}
\ No newline at end of file
diff --git a/Emerald.App/Emerald.App/Helpers/Updater/Updater.cs b/Emerald.App/Emerald.App/Helpers/Updater/Updater.cs
index aa8b6086..02181bfe 100644
--- a/Emerald.App/Emerald.App/Helpers/Updater/Updater.cs
+++ b/Emerald.App/Emerald.App/Helpers/Updater/Updater.cs
@@ -5,7 +5,7 @@
using Emerald.WinUI.Models;
using Microsoft.Extensions.Logging;
using Microsoft.UI.Xaml.Shapes;
-using Newtonsoft.Json;
+using System.Text.Json;
using Octokit;
using ProjBobcat.Class.Model;
using System;
diff --git a/Emerald.Core/Emerald.Core.csproj b/Emerald.Core/Emerald.Core.csproj
index 710a97c8..a39329ab 100644
--- a/Emerald.Core/Emerald.Core.csproj
+++ b/Emerald.Core/Emerald.Core.csproj
@@ -11,6 +11,7 @@
+
\ No newline at end of file
diff --git a/Emerald.Core/News/NewsHelper.cs b/Emerald.Core/News/NewsHelper.cs
index 09718ca9..dc90f61c 100644
--- a/Emerald.Core/News/NewsHelper.cs
+++ b/Emerald.Core/News/NewsHelper.cs
@@ -1,4 +1,4 @@
-using Newtonsoft.Json;
+using System.Text.Json;
using System.Collections.ObjectModel;
using System.ComponentModel;
@@ -77,7 +77,7 @@ public ObservableCollection Entries
response = await wc.GetStringAsync(url);
}
- var json = JsonConvert.DeserializeObject(response);
+ var json = JsonSerializer.Deserialize(response);
AllEntries = json?.entries != null ? new(json.entries.ToList()) : new();
Entries.Clear();
diff --git a/Emerald.Core/Optifine.cs b/Emerald.Core/Optifine.cs
index 77eceba3..0cf9d52a 100644
--- a/Emerald.Core/Optifine.cs
+++ b/Emerald.Core/Optifine.cs
@@ -1,5 +1,5 @@
using CmlLib.Core;
-using Newtonsoft.Json;
+using System.Text.Json;
using ProjBobcat.Class.Helper;
using ProjBobcat.Class.Model.Optifine;
using ProjBobcat.DefaultComponent.Installer;
@@ -27,7 +27,7 @@ public async Task> GetOptifineVersions()
c.Dispose();
- return JsonConvert.DeserializeObject>(json);
+ return JsonSerializer.Deserialize>(json);
}
catch
{
diff --git a/Emerald.Core/Store/Labrinth.cs b/Emerald.Core/Store/Labrinth.cs
index 8a1cc2e5..41ceff86 100644
--- a/Emerald.Core/Store/Labrinth.cs
+++ b/Emerald.Core/Store/Labrinth.cs
@@ -1,6 +1,6 @@
using CmlLib.Core;
using Emerald.Core.Tasks;
-using Newtonsoft.Json;
+using System.Text.Json;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Net.Http.Headers;
@@ -84,7 +84,7 @@ private async void ModrinthDownload(string link, string folderdir, string fileNa
var fn = string.IsNullOrEmpty(name) ? "" : $"query={name}";
var url = $"search?{fn}&index={sortOptions.ToString().ToLower()}&facets=[{categouriesString}[\"project_type:mod\"]]&limit={limit}";
var json = await Get(url);
- s = JsonConvert.DeserializeObject(json);
+ s = JsonSerializer.Deserialize(json);
Tasks.TasksHelper.CompleteTask(taskID, true, name);
return s;
@@ -104,7 +104,7 @@ private async void ModrinthDownload(string link, string folderdir, string fileNa
try
{
var json = await Get("project/" + id);
- s = JsonConvert.DeserializeObject(json);
+ s = JsonSerializer.Deserialize(json);
Tasks.TasksHelper.CompleteTask(taskID, true, name);
return s;
}
@@ -123,7 +123,7 @@ private async void ModrinthDownload(string link, string folderdir, string fileNa
try
{
var json = await Get("project/" + id + "/version");
- s = JsonConvert.DeserializeObject>(json);
+ s = JsonSerializer.Deserialize>(json);
Tasks.TasksHelper.CompleteTask(taskID, true);
return s;
}
diff --git a/Emerald.CoreX/Emerald.CoreX.csproj b/Emerald.CoreX/Emerald.CoreX.csproj
index 8f192bc8..60f221b0 100644
--- a/Emerald.CoreX/Emerald.CoreX.csproj
+++ b/Emerald.CoreX/Emerald.CoreX.csproj
@@ -14,5 +14,6 @@
+
\ No newline at end of file
diff --git a/Emerald.CoreX/Store/Modrinth/JSON.cs b/Emerald.CoreX/Store/Modrinth/JSON.cs
index 53753575..27d7d789 100644
--- a/Emerald.CoreX/Store/Modrinth/JSON.cs
+++ b/Emerald.CoreX/Store/Modrinth/JSON.cs
@@ -4,19 +4,20 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
-using Newtonsoft.Json;
+using System.Text.Json;
+using System.Text.Json.Serialization;
namespace Emerald.CoreX.Store.Modrinth.JSON;
public class SearchResult
{
- [JsonProperty("hits")] public List Hits { get; set; }
+ [JsonPropertyName("hits")] public List Hits { get; set; }
- [JsonProperty("offset")] public int Offset { get; set; }
+ [JsonPropertyName("offset")] public int Offset { get; set; }
- [JsonProperty("limit")] public int Limit { get; set; }
+ [JsonPropertyName("limit")] public int Limit { get; set; }
- [JsonProperty("total_hits")] public int TotalHits { get; set; }
+ [JsonPropertyName("total_hits")] public int TotalHits { get; set; }
}
public class Category
@@ -29,96 +30,96 @@ public class Category
public class SearchHit
{
- [JsonProperty("slug")] public string Slug { get; set; }
+ [JsonPropertyName("slug")] public string Slug { get; set; }
- [JsonProperty("title")] public string Title { get; set; }
+ [JsonPropertyName("title")] public string Title { get; set; }
- [JsonProperty("description")] public string Description { get; set; }
+ [JsonPropertyName("description")] public string Description { get; set; }
- [JsonProperty("categories")] public string[] Categories { get; set; }
+ [JsonPropertyName("categories")] public string[] Categories { get; set; }
- [JsonProperty("client_side")] public string ClientSide { get; set; }
+ [JsonPropertyName("client_side")] public string ClientSide { get; set; }
- [JsonProperty("server_side")] public string ServerSide { get; set; }
+ [JsonPropertyName("server_side")] public string ServerSide { get; set; }
- [JsonProperty("project_type")] public string ProjectType { get; set; }
+ [JsonPropertyName("project_type")] public string ProjectType { get; set; }
- [JsonProperty("downloads")] public int Downloads { get; set; }
+ [JsonPropertyName("downloads")] public int Downloads { get; set; }
- [JsonProperty("icon_url")] public string IconUrl { get; set; }
+ [JsonPropertyName("icon_url")] public string IconUrl { get; set; }
- [JsonProperty("project_id")] public string ProjectId { get; set; }
+ [JsonPropertyName("project_id")] public string ProjectId { get; set; }
- [JsonProperty("author")] public string Author { get; set; }
+ [JsonPropertyName("author")] public string Author { get; set; }
- [JsonProperty("versions")] public string[] Versions { get; set; }
+ [JsonPropertyName("versions")] public string[] Versions { get; set; }
- [JsonProperty("follows")] public int Follows { get; set; }
+ [JsonPropertyName("follows")] public int Follows { get; set; }
- [JsonProperty("date_created")] public DateTime DateCreated { get; set; }
+ [JsonPropertyName("date_created")] public DateTime DateCreated { get; set; }
- [JsonProperty("date_modified")] public DateTime DateModified { get; set; }
+ [JsonPropertyName("date_modified")] public DateTime DateModified { get; set; }
- [JsonProperty("latest_version")] public string LatestVersion { get; set; }
+ [JsonPropertyName("latest_version")] public string LatestVersion { get; set; }
- [JsonProperty("license")] public string License { get; set; }
+ [JsonPropertyName("license")] public string License { get; set; }
- [JsonProperty("gallery")] public string[] Gallery { get; set; }
+ [JsonPropertyName("gallery")] public string[] Gallery { get; set; }
}
public class StoreItem
{
- [JsonProperty("id")] public string ID { get; set; }
+ [JsonPropertyName("id")] public string ID { get; set; }
- [JsonProperty("slug")] public string Slug { get; set; }
+ [JsonPropertyName("slug")] public string Slug { get; set; }
- [JsonProperty("project_type")] public string ProjectType { get; set; }
+ [JsonPropertyName("project_type")] public string ProjectType { get; set; }
- [JsonProperty("team")] public string Team { get; set; }
+ [JsonPropertyName("team")] public string Team { get; set; }
- [JsonProperty("title")] public string Title { get; set; }
+ [JsonPropertyName("title")] public string Title { get; set; }
- [JsonProperty("description")] public string Description { get; set; }
+ [JsonPropertyName("description")] public string Description { get; set; }
- [JsonProperty("body")] public string Body { get; set; }
+ [JsonPropertyName("body")] public string Body { get; set; }
- [JsonProperty("body_url")] public string BodyUrl { get; set; }
+ [JsonPropertyName("body_url")] public string BodyUrl { get; set; }
- [JsonProperty("published")] public DateTime PublishedDate { get; set; }
+ [JsonPropertyName("published")] public DateTime PublishedDate { get; set; }
- [JsonProperty("updated")] public DateTime UpdatedDate { get; set; }
+ [JsonPropertyName("updated")] public DateTime UpdatedDate { get; set; }
- [JsonProperty("status")] public string Status { get; set; }
+ [JsonPropertyName("status")] public string Status { get; set; }
- [JsonProperty("moderator_message")] public object? ModeratorMessage { get; set; }
+ [JsonPropertyName("moderator_message")] public object? ModeratorMessage { get; set; }
- [JsonProperty("license")] public License License { get; set; }
+ [JsonPropertyName("license")] public License License { get; set; }
- [JsonProperty("client_side")] public string ClientSide { get; set; }
+ [JsonPropertyName("client_side")] public string ClientSide { get; set; }
- [JsonProperty("server_side")] public string ServerSide { get; set; }
+ [JsonPropertyName("server_side")] public string ServerSide { get; set; }
- [JsonProperty("downloads")] public int Downloads { get; set; }
+ [JsonPropertyName("downloads")] public int Downloads { get; set; }
- [JsonProperty("followers")] public int Followers { get; set; }
+ [JsonPropertyName("followers")] public int Followers { get; set; }
- [JsonProperty("categories")] public string[] Categories { get; set; }
+ [JsonPropertyName("categories")] public string[] Categories { get; set; }
- [JsonProperty("versions")] public string[] Versions { get; set; }
+ [JsonPropertyName("versions")] public string[] Versions { get; set; }
- [JsonProperty("icon_url")] public string IconUrl { get; set; }
+ [JsonPropertyName("icon_url")] public string IconUrl { get; set; }
- [JsonProperty("issues_url")] public string IssuesUrl { get; set; }
+ [JsonPropertyName("issues_url")] public string IssuesUrl { get; set; }
- [JsonProperty("source_url")] public string SourceUrl { get; set; }
+ [JsonPropertyName("source_url")] public string SourceUrl { get; set; }
- [JsonProperty("wiki_url")] public object? WikiUrl { get; set; }
+ [JsonPropertyName("wiki_url")] public object? WikiUrl { get; set; }
- [JsonProperty("discord_url")] public string DiscordUrl { get; set; }
+ [JsonPropertyName("discord_url")] public string DiscordUrl { get; set; }
- [JsonProperty("donation_urls")] public DonationUrls[] DonationUrls { get; set; }
+ [JsonPropertyName("donation_urls")] public DonationUrls[] DonationUrls { get; set; }
- [JsonProperty("gallery")] public object[] Gallery { get; set; }
+ [JsonPropertyName("gallery")] public object[] Gallery { get; set; }
}
public class ItemVersion : INotifyPropertyChanged
@@ -126,35 +127,35 @@ public class ItemVersion : INotifyPropertyChanged
public bool IsDetailsVisible { get; set; } = false;
public string? FileName => Files.FirstOrDefault(x => x.Primary)?.Filename;
- [JsonProperty("id")] public string ID { get; set; }
+ [JsonPropertyName("id")] public string ID { get; set; }
- [JsonProperty("project_id")] public string ProjectId { get; set; }
+ [JsonPropertyName("project_id")] public string ProjectId { get; set; }
- [JsonProperty("author_id")] public string AuthorId { get; set; }
+ [JsonPropertyName("author_id")] public string AuthorId { get; set; }
- [JsonProperty("featured")] public bool Featured { get; set; }
+ [JsonPropertyName("featured")] public bool Featured { get; set; }
- [JsonProperty("name")] public string Name { get; set; }
+ [JsonPropertyName("name")] public string Name { get; set; }
- [JsonProperty("version_number")] public string VersionNumber { get; set; }
+ [JsonPropertyName("version_number")] public string VersionNumber { get; set; }
- [JsonProperty("changelog")] public string Changelog { get; set; }
+ [JsonPropertyName("changelog")] public string Changelog { get; set; }
- [JsonProperty("changelog_url")] public string? ChangelogUrl { get; set; }
+ [JsonPropertyName("changelog_url")] public string? ChangelogUrl { get; set; }
- [JsonProperty("date_published")] public DateTime DatePublished { get; set; }
+ [JsonPropertyName("date_published")] public DateTime DatePublished { get; set; }
- [JsonProperty("downloads")] public int Downloads { get; set; }
+ [JsonPropertyName("downloads")] public int Downloads { get; set; }
- [JsonProperty("version_type")] public string VersionType { get; set; }
+ [JsonPropertyName("version_type")] public string VersionType { get; set; }
- [JsonProperty("files")] public ItemFile[] Files { get; set; }
+ [JsonPropertyName("files")] public ItemFile[] Files { get; set; }
- [JsonProperty("dependencies")] public Dependency[] Dependencies { get; set; }
+ [JsonPropertyName("dependencies")] public Dependency[] Dependencies { get; set; }
- [JsonProperty("game_versions")] public string[] GameVersions { get; set; }
+ [JsonPropertyName("game_versions")] public string[] GameVersions { get; set; }
- [JsonProperty("loaders")] public string[] Loaders { get; set; }
+ [JsonPropertyName("loaders")] public string[] Loaders { get; set; }
public event PropertyChangedEventHandler? PropertyChanged;
@@ -164,49 +165,49 @@ public void InvokePropertyChanged(string? propertyName = null) =>
public class Dependency
{
- [JsonProperty("version_id")] public string VersionId { get; set; }
+ [JsonPropertyName("version_id")] public string VersionId { get; set; }
- [JsonProperty("project_id")] public string ProjectId { get; set; }
+ [JsonPropertyName("project_id")] public string ProjectId { get; set; }
- [JsonProperty("file_name")] public string FileName { get; set; }
+ [JsonPropertyName("file_name")] public string FileName { get; set; }
- [JsonProperty("dependency_type")] public string DependencyType { get; set; }
+ [JsonPropertyName("dependency_type")] public string DependencyType { get; set; }
}
public class ItemFile
{
- [JsonProperty("hashes")] public Hashes Hashes { get; set; }
+ [JsonPropertyName("hashes")] public Hashes Hashes { get; set; }
- [JsonProperty("url")] public string Url { get; set; }
+ [JsonPropertyName("url")] public string Url { get; set; }
- [JsonProperty("filename")] public string Filename { get; set; }
+ [JsonPropertyName("filename")] public string Filename { get; set; }
- [JsonProperty("primary")] public bool Primary { get; set; }
+ [JsonPropertyName("primary")] public bool Primary { get; set; }
- [JsonProperty("size")] public int Size { get; set; }
+ [JsonPropertyName("size")] public int Size { get; set; }
}
public class Hashes
{
- [JsonProperty("sha512")] public string Sha512 { get; set; }
+ [JsonPropertyName("sha512")] public string Sha512 { get; set; }
- [JsonProperty("sha1")] public string Sha1 { get; set; }
+ [JsonPropertyName("sha1")] public string Sha1 { get; set; }
}
public class License
{
- [JsonProperty("id")] public string ID { get; set; }
+ [JsonPropertyName("id")] public string ID { get; set; }
- [JsonProperty("name")] public string Name { get; set; }
+ [JsonPropertyName("name")] public string Name { get; set; }
- [JsonProperty("url")] public string Url { get; set; }
+ [JsonPropertyName("url")] public string Url { get; set; }
}
public class DonationUrls
{
- [JsonProperty("id")] public string ID { get; set; }
+ [JsonPropertyName("id")] public string ID { get; set; }
- [JsonProperty("platform")] public string Platform { get; set; }
+ [JsonPropertyName("platform")] public string Platform { get; set; }
- [JsonProperty("url")] public string Url { get; set; }
+ [JsonPropertyName("url")] public string Url { get; set; }
}
diff --git a/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs b/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
index 93320a78..5d09be8a 100644
--- a/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
+++ b/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
@@ -1,5 +1,5 @@
using CmlLib.Core;
-using Newtonsoft.Json;
+using System.Text.Json;
using RestSharp;
using System;
using System.Collections.Generic;
@@ -37,7 +37,7 @@ public async Task LoadCategoriesAsync()
var response = await _client.ExecuteAsync(request);
if (response.IsSuccessful)
{
- var all = JsonConvert.DeserializeObject>(response.Content);
+ var all = JsonSerializer.Deserialize>(response.Content);
var _categories = all
.Where(i => i.header == "categories"
@@ -87,7 +87,7 @@ public async Task LoadCategoriesAsync()
var response = await _client.ExecuteAsync(request);
if (response.IsSuccessful)
{
- var result = JsonConvert.DeserializeObject(response.Content);
+ var result = JsonSerializer.Deserialize(response.Content);
_logger.LogInformation($"Search completed successfully. Found {result.TotalHits} {_projectType}s.");
return result;
}
@@ -115,7 +115,7 @@ public async Task LoadCategoriesAsync()
if (response.IsSuccessful)
{
- var item = JsonConvert.DeserializeObject(response.Content);
+ var item = JsonSerializer.Deserialize(response.Content);
_logger.LogInformation($"Successfully fetched {_projectType} with ID: {id}");
return item;
}
@@ -143,7 +143,7 @@ public async Task LoadCategoriesAsync()
if (response.IsSuccessful)
{
- var versions = JsonConvert.DeserializeObject>(response.Content);
+ var versions = JsonSerializer.Deserialize>(response.Content);
_logger.LogInformation($"Successfully fetched versions for {_projectType} with ID: {id}");
return versions;
}
diff --git a/Emerald/Emerald.csproj b/Emerald/Emerald.csproj
index 5c40cad7..5e96e83c 100644
--- a/Emerald/Emerald.csproj
+++ b/Emerald/Emerald.csproj
@@ -40,5 +40,8 @@
ThemeService;
+
+
+
From a5737dcad11fb8f130e4695888a7d469a7b10e46 Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Wed, 28 Aug 2024 17:24:31 +0100
Subject: [PATCH 40/61] =?UTF-8?q?=F0=9F=93=B8=20Add=20new=20screenshot?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Lamparter
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 5f12a41c..05d16b5b 100644
--- a/README.md
+++ b/README.md
@@ -43,7 +43,7 @@ See [this section](#-building-the-code)
### 📸 Screenshots
-[![Emerald screenshot](https://user-images.githubusercontent.com/71598437/212673147-54e79843-76aa-44ff-9db3-60b025334f07.png)](https://github.com/RiversideValley/Emerald)
+[![emerald-screenshot](https://github.com/user-attachments/assets/eb65ec6e-3dce-46a9-8f0a-1ffaf9dc43c3)](https://github.com/RiversideValley/Emerald)
## 🦜 Contributing & Feedback
From 4744f3ebfae87ed59fe7b7d142caf9a80f60a6a0 Mon Sep 17 00:00:00 2001
From: NoobNotFound <8273016+NoobNotFound@users.noreply.github.com>
Date: Fri, 30 Aug 2024 23:06:03 +0530
Subject: [PATCH 41/61] add summaries to Mod stores methods
---
Emerald.CoreX/Store/Modrinth/ModrinthStore.cs | 37 +++++++++++++++
Emerald.CoreX/Store/Modrinth/Stores.cs | 45 +++++++++++++++++++
2 files changed, 82 insertions(+)
diff --git a/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs b/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
index 93320a78..a6132d57 100644
--- a/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
+++ b/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
@@ -19,6 +19,13 @@ public abstract class ModrinthStore : IMinecraftStore
protected readonly ILogger _logger;
protected readonly string _projectType;
public Category[] Categories { get; private set; } = [];
+
+ ///
+ /// Initializes a new instance of the ModrinthStore class.
+ ///
+ /// The Minecraft path.
+ /// The logger instance.
+ /// The type of project (e.g., mod, plugin, resourcepack).
protected ModrinthStore(MinecraftPath path, ILogger logger, string projectType)
{
_client = new RestClient("https://api.modrinth.com/v2/");
@@ -28,6 +35,11 @@ protected ModrinthStore(MinecraftPath path, ILogger logger, string projectType)
_projectType = projectType;
}
+
+ ///
+ /// Loads categories for the specified project type from the Modrinth API.
+ ///
+ /// A task representing the asynchronous operation.
public async Task LoadCategoriesAsync()
{
var request = new RestRequest("tag/category");
@@ -58,6 +70,15 @@ public async Task LoadCategoriesAsync()
_logger.LogError(ex, $"Error occurred while loading {_projectType} categories.");
}
}
+
+ ///
+ /// Searches for items in the Modrinth store based on the provided query and options.
+ ///
+ /// The search query string.
+ /// The maximum number of results to return (default is 15).
+ /// The sorting options for the search results.
+ /// An optional array of category names to filter the results.
+ /// A task that represents the asynchronous operation. The task result contains the search results or null if an error occurred.
public virtual async Task SearchAsync(string query, int limit = 15,
SearchSortOptions sortOptions = SearchSortOptions.Relevance, string[]? categories = null)
{
@@ -104,6 +125,11 @@ public async Task LoadCategoriesAsync()
}
}
+ ///
+ /// Retrieves detailed information about a specific item from the Modrinth store.
+ ///
+ /// The unique identifier of the item.
+ /// A task that represents the asynchronous operation. The task result contains the item details or null if an error occurred.
public virtual async Task GetItemAsync(string id)
{
_logger.LogInformation($"Fetching {_projectType} with ID: {id}");
@@ -132,6 +158,11 @@ public async Task LoadCategoriesAsync()
}
}
+ ///
+ /// Retrieves all versions of a specific item from the Modrinth store.
+ ///
+ /// The unique identifier of the item.
+ /// A task that represents the asynchronous operation. The task result contains a list of item versions or null if an error occurred.
public virtual async Task?> GetVersionsAsync(string id)
{
_logger.LogInformation($"Fetching versions for {_projectType} with ID: {id}");
@@ -160,6 +191,12 @@ public async Task LoadCategoriesAsync()
}
}
+ ///
+ /// Downloads a specific file for an item from the Modrinth store.
+ ///
+ /// The file information object containing download details.
+ /// The type of project being downloaded (e.g., "mods", "resourcepacks").
+ /// A task that represents the asynchronous download operation.
public virtual async Task DownloadItemAsync(ItemFile file, string projectType)
{
_logger.LogInformation($"Downloading {projectType} file from URL: {file.Url}");
diff --git a/Emerald.CoreX/Store/Modrinth/Stores.cs b/Emerald.CoreX/Store/Modrinth/Stores.cs
index ae3c7605..4b1deaae 100644
--- a/Emerald.CoreX/Store/Modrinth/Stores.cs
+++ b/Emerald.CoreX/Store/Modrinth/Stores.cs
@@ -10,10 +10,19 @@ namespace Emerald.CoreX.Store.Modrinth;
public class ModStore : ModrinthStore
{
+ ///
+ /// Initializes a new instance of the ModStore class with a custom Minecraft path.
+ ///
+ /// The custom Minecraft path.
+ /// The logger instance.
public ModStore(MinecraftPath path, ILogger logger) : base(path, logger, "mod")
{
}
+ ///
+ /// Initializes a new instance of the ModStore class with the default Minecraft path.
+ ///
+ /// The logger instance.
public ModStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOSDefaultPath()), logger)
{
}
@@ -39,10 +48,19 @@ public override async Task DownloadItemAsync(ItemFile file, string projectType)
public class PluginStore : ModrinthStore
{
+ ///
+ /// Initializes a new instance of the PluginStore class with a custom Minecraft path.
+ ///
+ /// The custom Minecraft path.
+ /// The logger instance.
public PluginStore(MinecraftPath path, ILogger logger) : base(path, logger, "plugin")
{
}
+ ///
+ /// Initializes a new instance of the PluginStore class with the default Minecraft path.
+ ///
+ /// The logger instance.
public PluginStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOSDefaultPath()), logger)
{
}
@@ -65,10 +83,19 @@ public override async Task DownloadItemAsync(ItemFile file, string projectType)
public class ResourcePackStore : ModrinthStore
{
+ ///
+ /// Initializes a new instance of the ResourcePackStore class with a custom Minecraft path.
+ ///
+ /// The custom Minecraft path.
+ /// The logger instance.
public ResourcePackStore(MinecraftPath path, ILogger logger) : base(path, logger, "resourcepack")
{
}
+ ///
+ /// Initializes a new instance of the ResourcePackStore class with the default Minecraft path.
+ ///
+ /// The logger instance.
public ResourcePackStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOSDefaultPath()), logger)
{
}
@@ -91,10 +118,19 @@ public override async Task DownloadItemAsync(ItemFile file, string projectType)
public class ShaderStore : ModrinthStore
{
+ ///
+ /// Initializes a new instance of the ShaderStore class with a custom Minecraft path.
+ ///
+ /// The custom Minecraft path.
+ /// The logger instance.
public ShaderStore(MinecraftPath path, ILogger logger) : base(path, logger, "shader")
{
}
+ ///
+ /// Initializes a new instance of the ShaderStore class with the default Minecraft path.
+ ///
+ /// The logger instance.
public ShaderStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOSDefaultPath()), logger)
{
}
@@ -120,10 +156,19 @@ public override async Task DownloadItemAsync(ItemFile file, string projectType)
public class ModpackStore : ModrinthStore
{
+ ///
+ /// Initializes a new instance of the ModpackStore class with a custom Minecraft path.
+ ///
+ /// The custom Minecraft path.
+ /// The logger instance.
public ModpackStore(MinecraftPath path, ILogger logger) : base(path, logger, "modpack")
{
}
+ ///
+ /// Initializes a new instance of the ModpackStore class with the default Minecraft path.
+ ///
+ /// The logger instance.
public ModpackStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOSDefaultPath()), logger)
{
}
From 00254c1068d94d7e0db065aa25e5c04607b33819 Mon Sep 17 00:00:00 2001
From: NoobNotFound
Date: Fri, 30 Aug 2024 23:20:06 +0530
Subject: [PATCH 42/61] update dependencies
---
Directory.Packages.props | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Directory.Packages.props b/Directory.Packages.props
index f986da2a..19f6fe46 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -11,7 +11,7 @@
-
+
@@ -20,8 +20,8 @@
-
+
-
+
\ No newline at end of file
From 2f8a808d5d1ffdcf54a4be76788ab10d0eae5c81 Mon Sep 17 00:00:00 2001
From: NoobNotFound
Date: Sat, 31 Aug 2024 00:07:11 +0530
Subject: [PATCH 43/61] improve the stability of the mod downloader by creating
a helper file downloader.
---
Emerald.CoreX/Helpers/FileDownloader.cs | 99 +++++++++++++++++++
.../Store/Modrinth/IMinecraftStore.cs | 2 +-
Emerald.CoreX/Store/Modrinth/JSON.cs | 8 +-
Emerald.CoreX/Store/Modrinth/ModrinthStore.cs | 37 ++-----
Emerald.CoreX/Store/Modrinth/Stores.cs | 14 ++-
5 files changed, 120 insertions(+), 40 deletions(-)
create mode 100644 Emerald.CoreX/Helpers/FileDownloader.cs
diff --git a/Emerald.CoreX/Helpers/FileDownloader.cs b/Emerald.CoreX/Helpers/FileDownloader.cs
new file mode 100644
index 00000000..4a2cbd47
--- /dev/null
+++ b/Emerald.CoreX/Helpers/FileDownloader.cs
@@ -0,0 +1,99 @@
+using System;
+using System.IO;
+using System.Net.Http;
+using System.Security.Cryptography;
+using System.Text.Json.Serialization;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.Extensions.Logging;
+
+namespace Emerald.CoreX.Helpers;
+
+public class FileDownloader
+{
+ private readonly ILogger _logger;
+ private readonly HttpClient _httpClient;
+
+ public FileDownloader(ILogger logger, HttpClient httpClient)
+ {
+ _logger = logger;
+ _httpClient = httpClient;
+ }
+
+ ///
+ /// Downloads a file from the specified URL to the given file path.
+ ///
+ /// The URL of the file to download.
+ /// The path where the file should be saved.
+ /// Optional. The expected hashes for file integrity verification.
+ /// Optional. An IProgress{double} to report download progress.
+ /// Optional. A CancellationToken to support cancellation of the download.
+ /// A task representing the asynchronous download operation.
+ public async Task DownloadFileAsync(string url, string filePath, Hashes? expectedHashes = null,
+ IProgress? progress = null, CancellationToken cancellationToken = default)
+ {
+ _logger.LogInformation($"Downloading file from URL: {url}");
+
+ try
+ {
+ Directory.CreateDirectory(Path.GetDirectoryName(filePath));
+
+ using var response = await _httpClient.GetAsync(url, HttpCompletionOption.ResponseHeadersRead, cancellationToken);
+ response.EnsureSuccessStatusCode();
+
+ var totalBytes = response.Content.Headers.ContentLength ?? -1L;
+ using var contentStream = await response.Content.ReadAsStreamAsync(cancellationToken);
+ using var fileStream = new FileStream(filePath, FileMode.Create, FileAccess.Write, FileShare.None, 8192, true);
+
+ var buffer = new byte[8192];
+ long totalBytesRead = 0;
+ int bytesRead;
+
+ while ((bytesRead = await contentStream.ReadAsync(buffer, cancellationToken)) > 0)
+ {
+ await fileStream.WriteAsync(buffer.AsMemory(0, bytesRead), cancellationToken);
+ totalBytesRead += bytesRead;
+ progress?.Report(totalBytes > 0 ? (double)totalBytesRead / totalBytes : 0);
+ }
+
+ _logger.LogInformation($"Successfully downloaded file to: {filePath}");
+
+ if (expectedHashes != null && !await VerifyFileIntegrityAsync(filePath, expectedHashes))
+ {
+ throw new Exception("Downloaded file failed integrity check");
+ }
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, $"Error occurred while downloading file from URL: {url}");
+ throw;
+ }
+ }
+
+ ///
+ /// Verifies the integrity of a file against expected hashes.
+ ///
+ /// The path of the file to verify.
+ /// The expected hashes for the file.
+ /// True if the file integrity is verified, false otherwise.
+ private async Task VerifyFileIntegrityAsync(string filePath, Hashes expectedHashes)
+ {
+ using var sha1 = SHA1.Create();
+ using var sha512 = SHA512.Create();
+ using var stream = File.OpenRead(filePath);
+
+ var sha1Hash = BitConverter.ToString(await sha1.ComputeHashAsync(stream)).Replace("-", "").ToLowerInvariant();
+ stream.Position = 0;
+ var sha512Hash = BitConverter.ToString(await sha512.ComputeHashAsync(stream)).Replace("-", "").ToLowerInvariant();
+
+ return sha1Hash == expectedHashes.Sha1 && sha512Hash == expectedHashes.Sha512;
+ }
+}
+
+
+public class Hashes
+{
+ [JsonPropertyName("sha512")] public string Sha512 { get; set; }
+
+ [JsonPropertyName("sha1")] public string Sha1 { get; set; }
+}
diff --git a/Emerald.CoreX/Store/Modrinth/IMinecraftStore.cs b/Emerald.CoreX/Store/Modrinth/IMinecraftStore.cs
index 9d61bcea..64f17360 100644
--- a/Emerald.CoreX/Store/Modrinth/IMinecraftStore.cs
+++ b/Emerald.CoreX/Store/Modrinth/IMinecraftStore.cs
@@ -14,6 +14,6 @@ public interface IMinecraftStore
Task GetItemAsync(string id);
Task?> GetVersionsAsync(string id);
- Task DownloadItemAsync(ItemFile file, string projectType);
+ Task DownloadItemAsync(ItemFile file, string projectType, IProgress? progress = null, CancellationToken cancellationToken = default);
public Category[] Categories { get; }
}
diff --git a/Emerald.CoreX/Store/Modrinth/JSON.cs b/Emerald.CoreX/Store/Modrinth/JSON.cs
index 27d7d789..42bde2e5 100644
--- a/Emerald.CoreX/Store/Modrinth/JSON.cs
+++ b/Emerald.CoreX/Store/Modrinth/JSON.cs
@@ -6,6 +6,7 @@
using System.Threading.Tasks;
using System.Text.Json;
using System.Text.Json.Serialization;
+using Emerald.CoreX.Helpers;
namespace Emerald.CoreX.Store.Modrinth.JSON;
@@ -187,13 +188,6 @@ public class ItemFile
[JsonPropertyName("size")] public int Size { get; set; }
}
-public class Hashes
-{
- [JsonPropertyName("sha512")] public string Sha512 { get; set; }
-
- [JsonPropertyName("sha1")] public string Sha1 { get; set; }
-}
-
public class License
{
[JsonPropertyName("id")] public string ID { get; set; }
diff --git a/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs b/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
index dd13d418..74ff009f 100644
--- a/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
+++ b/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
@@ -9,15 +9,17 @@
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Emerald.CoreX.Store.Modrinth.JSON;
+using Emerald.CoreX.Helpers;
namespace Emerald.CoreX.Store.Modrinth;
public abstract class ModrinthStore : IMinecraftStore
{
protected readonly RestClient _client;
- public MinecraftPath MCPath { get; }
protected readonly ILogger _logger;
protected readonly string _projectType;
+ protected readonly FileDownloader _fileDownloader;
+ public MinecraftPath MCPath { get; }
public Category[] Categories { get; private set; } = [];
///
@@ -33,6 +35,7 @@ protected ModrinthStore(MinecraftPath path, ILogger logger, string projectType)
MCPath = path;
_logger = logger;
_projectType = projectType;
+ _fileDownloader = new FileDownloader(logger, new());
}
@@ -196,33 +199,13 @@ public async Task LoadCategoriesAsync()
///
/// The file information object containing download details.
/// The type of project being downloaded (e.g., "mods", "resourcepacks").
+ /// Optional. An IProgress{double} to report download progress.
+ /// Optional. A CancellationToken to support cancellation of the download.
/// A task that represents the asynchronous download operation.
- public virtual async Task DownloadItemAsync(ItemFile file, string projectType)
+ public virtual async Task DownloadItemAsync(ItemFile file, string projectType,
+ IProgress? progress = null, CancellationToken cancellationToken = default)
{
- _logger.LogInformation($"Downloading {projectType} file from URL: {file.Url}");
-
- try
- {
- var request = new RestRequest(file.Url);
- var response = await _client.ExecuteAsync(request);
- if (response.IsSuccessful)
- {
- var filePath = Path.Combine(MCPath.BasePath, projectType, file.Filename);
- Directory.CreateDirectory(Path.GetDirectoryName(filePath));
- await File.WriteAllBytesAsync(filePath, response.RawBytes);
-
- _logger.LogInformation($"Successfully downloaded {projectType} file to: {filePath}");
- }
- else
- {
- _logger.LogError($"File download failed: {response.ErrorMessage}");
- throw new Exception($"File download failed: {response.ErrorMessage}");
- }
- }
- catch (Exception ex)
- {
- _logger.LogError(ex, $"Error occurred while downloading {projectType} file from URL: {file.Url}");
- throw;
- }
+ var filePath = Path.Combine(MCPath.BasePath, projectType, file.Filename);
+ await _fileDownloader.DownloadFileAsync(file.Url, filePath, file.Hashes, progress, cancellationToken);
}
}
diff --git a/Emerald.CoreX/Store/Modrinth/Stores.cs b/Emerald.CoreX/Store/Modrinth/Stores.cs
index 4b1deaae..58e30be4 100644
--- a/Emerald.CoreX/Store/Modrinth/Stores.cs
+++ b/Emerald.CoreX/Store/Modrinth/Stores.cs
@@ -39,7 +39,7 @@ public ModStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOSDefa
return await base.GetVersionsAsync(id);
}
- public override async Task DownloadItemAsync(ItemFile file, string projectType)
+ public override async Task DownloadItemAsync(ItemFile file, string projectType, IProgress? progress = null, CancellationToken cancellationToken = default)
{
// Implement mod-specific download logic
await base.DownloadItemAsync(file, "mods");
@@ -75,7 +75,8 @@ public PluginStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOSD
return await base.GetVersionsAsync(id);
}
- public override async Task DownloadItemAsync(ItemFile file, string projectType)
+ public override async Task DownloadItemAsync(ItemFile file, string projectType,
+ IProgress? progress = null, CancellationToken cancellationToken = default)
{
await base.DownloadItemAsync(file, "mods");
}
@@ -110,7 +111,8 @@ public ResourcePackStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.
return await base.GetVersionsAsync(id);
}
- public override async Task DownloadItemAsync(ItemFile file, string projectType)
+ public override async Task DownloadItemAsync(ItemFile file, string projectType,
+ IProgress? progress = null, CancellationToken cancellationToken = default)
{
await base.DownloadItemAsync(file, "resourcepacks");
}
@@ -147,7 +149,8 @@ public ShaderStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOSD
return await base.GetVersionsAsync(id);
}
- public override async Task DownloadItemAsync(ItemFile file, string projectType)
+ public override async Task DownloadItemAsync(ItemFile file, string projectType,
+ IProgress? progress = null, CancellationToken cancellationToken = default)
{
// Implement shader-specific download logic
await base.DownloadItemAsync(file, "shaders");
@@ -185,7 +188,8 @@ public ModpackStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOS
return await base.GetVersionsAsync(id);
}
- public override async Task DownloadItemAsync(ItemFile file, string projectType)
+ public override async Task DownloadItemAsync(ItemFile file, string projectType,
+ IProgress? progress = null, CancellationToken cancellationToken = default)
{
// Implement modpack-specific download logic
await base.DownloadItemAsync(file, "modpacks");
From 6bb99fcf8c8ea69dd5d550a9ba9babb663f0b99d Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Sat, 31 Aug 2024 22:48:04 +0100
Subject: [PATCH 44/61] =?UTF-8?q?=F0=9F=93=9D=20Fix=20grammar=20mistake=20?=
=?UTF-8?q?in=20README?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Lamparter
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 05d16b5b..7b206fed 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# 💎 Emerald
-#### A swift Minecraft launcher made using WinUI technologies in the fast C# language really pushes the boundary of the platform.
+#### A swift Minecraft launcher made using WinUI technologies in the fast C# language that really pushes the boundary of the platform.
From a41cb824d38df353e1c048552b90a28f2a702e07 Mon Sep 17 00:00:00 2001
From: "codefactor-io[bot]"
<47775046+codefactor-io[bot]@users.noreply.github.com>
Date: Sun, 1 Sep 2024 17:44:50 +0530
Subject: [PATCH 45/61] [CodeFactor] Apply fixes (#49)
Co-authored-by: codefactor-io
---
Emerald.App/Emerald.App/Helpers/Extensions.cs | 12 ++++--------
Emerald.App/Emerald.App/Helpers/Settings/JSON.cs | 5 -----
.../Emerald.App/Helpers/Settings/SettingsSystem.cs | 3 +--
Emerald.App/Emerald.App/Helpers/Updater/Updater.cs | 3 ---
Emerald.App/Emerald.App/Helpers/WindowManager.cs | 4 +---
Emerald.App/Emerald.App/MainWindow.xaml.cs | 4 +---
Emerald.App/Emerald.App/Models/Account.cs | 3 +--
Emerald.App/Emerald.App/Models/NavViewHeader.cs | 3 +--
.../UserControls/AdaptiveItemPane.xaml.cs | 2 --
.../Emerald.App/UserControls/ExpanderItem.xaml.cs | 2 --
.../Emerald.App/Views/Home/AccountsPage.xaml.cs | 5 +----
Emerald.App/Emerald.App/Views/Home/HomePage.xaml.cs | 7 +------
Emerald.App/Emerald.App/Views/Home/NewsPage.xaml.cs | 1 -
.../Emerald.App/Views/Settings/AboutPage.xaml.cs | 3 +--
.../Views/Settings/AppearancePage.xaml.cs | 3 +--
.../Emerald.App/Views/Settings/GeneralPage.xaml.cs | 6 +-----
Emerald.Core/Launcher.cs | 6 +++---
Emerald.Core/News/JSON/Dimensions.cs | 1 -
Emerald.Core/News/JSON/Entry.cs | 1 -
Emerald.Core/News/NewsHelper.cs | 3 +--
Emerald.Core/Optifine.cs | 4 ++--
Emerald.Core/Store/Labrinth.cs | 12 ++----------
Emerald.Core/Util.cs | 4 ++--
23 files changed, 24 insertions(+), 73 deletions(-)
diff --git a/Emerald.App/Emerald.App/Helpers/Extensions.cs b/Emerald.App/Emerald.App/Helpers/Extensions.cs
index 2d61c177..5f0a94d0 100644
--- a/Emerald.App/Emerald.App/Helpers/Extensions.cs
+++ b/Emerald.App/Emerald.App/Helpers/Extensions.cs
@@ -1,4 +1,4 @@
-using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.Windows.ApplicationModel.Resources;
using System;
@@ -112,15 +112,11 @@ public static string ToBinaryString(this string str)
public static string ToMD5(this string s)
{
StringBuilder sb = new();
+ byte[] hashValue = MD5.HashData(Encoding.UTF8.GetBytes(s));
- using (MD5 md5 = MD5.Create())
+ foreach (byte b in hashValue)
{
- byte[] hashValue = md5.ComputeHash(Encoding.UTF8.GetBytes(s));
-
- foreach (byte b in hashValue)
- {
- sb.Append($"{b:X2}");
- }
+ sb.Append($"{b:X2}");
}
return sb.ToString();
diff --git a/Emerald.App/Emerald.App/Helpers/Settings/JSON.cs b/Emerald.App/Emerald.App/Helpers/Settings/JSON.cs
index 8122d468..b639a0c1 100644
--- a/Emerald.App/Emerald.App/Helpers/Settings/JSON.cs
+++ b/Emerald.App/Emerald.App/Helpers/Settings/JSON.cs
@@ -114,7 +114,6 @@ public class Account : JSON
public partial class Downloader : JSON
{
-
[ObservableProperty]
private bool _HashCheck;
@@ -154,7 +153,6 @@ public JVM()
[JsonIgnore]
public bool SetSize => !(ScreenSizeStatus == "FullScreen".Localize() || ScreenSizeStatus == "Default".Localize());
-
}
public class App : JSON
@@ -168,11 +166,9 @@ public class App : JSON
public bool AutoClose { get; set; }
public bool HideOnLaunch { get; set; }
public bool WindowsHello { get; set; }
-
}
public class Updates : JSON
{
-
public bool CheckAtStartup { get; set; } = true;
public bool AutoDownload { get; set; }
public bool IncludePreReleases { get; set; }
@@ -297,7 +293,6 @@ public class Store : JSON
public partial class StoreSortOptions : JSON
{
-
[ObservableProperty]
private bool _Relevance = true;
diff --git a/Emerald.App/Emerald.App/Helpers/Settings/SettingsSystem.cs b/Emerald.App/Emerald.App/Helpers/Settings/SettingsSystem.cs
index 4e62fd6e..d47d9054 100644
--- a/Emerald.App/Emerald.App/Helpers/Settings/SettingsSystem.cs
+++ b/Emerald.App/Emerald.App/Helpers/Settings/SettingsSystem.cs
@@ -1,4 +1,4 @@
-using Emerald.WinUI.Helpers.Settings.JSON;
+using Emerald.WinUI.Helpers.Settings.JSON;
using System.Text.Json;
using System;
using System.Collections.Generic;
@@ -19,7 +19,6 @@ public static T GetSerializedFromSettings(string key, T def)
string json;
try
{
-
json = ApplicationData.Current.RoamingSettings.Values[key] as string;
return JsonSerializer.Deserialize(json);
}
diff --git a/Emerald.App/Emerald.App/Helpers/Updater/Updater.cs b/Emerald.App/Emerald.App/Helpers/Updater/Updater.cs
index 02181bfe..fc74e220 100644
--- a/Emerald.App/Emerald.App/Helpers/Updater/Updater.cs
+++ b/Emerald.App/Emerald.App/Helpers/Updater/Updater.cs
@@ -93,7 +93,6 @@ public async void CheckForUpdates(bool OnlyInformifHigherAvailable = false)
var msg = await MessageBox.Show("UpdateAvailable".Localize(), "## Version: " + ver.ToString() + "\n\n###ReleaseNotes".Localize() + "\n\n " + rel.Body,Enums.MessageBoxButtons.CustomWithCancel, "UpdateNow".Localize());
if(msg == Enums.MessageBoxResults.Cancel)
goto Return;
-
}
else if(ver < currentver)
{
@@ -104,8 +103,6 @@ public async void CheckForUpdates(bool OnlyInformifHigherAvailable = false)
var msg = await MessageBox.Show("DowngradeAvailable".Localize(), "DowngradeDescription".Localize(),Enums.MessageBoxButtons.Ok);
goto Return;
-
-
}
else if(ver == currentver)
{
diff --git a/Emerald.App/Emerald.App/Helpers/WindowManager.cs b/Emerald.App/Emerald.App/Helpers/WindowManager.cs
index 52cbc0ef..0519e1e3 100644
--- a/Emerald.App/Emerald.App/Helpers/WindowManager.cs
+++ b/Emerald.App/Emerald.App/Helpers/WindowManager.cs
@@ -1,4 +1,4 @@
-using CommunityToolkit.WinUI.Helpers;
+using CommunityToolkit.WinUI.Helpers;
using Microsoft.UI;
using Microsoft.UI.Composition;
using Microsoft.UI.Composition.SystemBackdrops;
@@ -48,7 +48,6 @@ public static MicaBackground IntializeWindow(Window window)
///
public static void SetTitleBar(Window window, UIElement AppTitleBar)
{
-
FrameworkElement RootUI = (FrameworkElement)window.Content;
if (AppWindowTitleBar.IsCustomizationSupported())
{
@@ -168,7 +167,6 @@ private void MicaBackground_ActualThemeChanged(FrameworkElement sender, object a
{
SetConfigurationSourceTheme();
}
-
}
private void SetConfigurationSourceTheme()
diff --git a/Emerald.App/Emerald.App/MainWindow.xaml.cs b/Emerald.App/Emerald.App/MainWindow.xaml.cs
index 7147aef9..080ee662 100644
--- a/Emerald.App/Emerald.App/MainWindow.xaml.cs
+++ b/Emerald.App/Emerald.App/MainWindow.xaml.cs
@@ -1,4 +1,4 @@
-using Emerald.Core;
+using Emerald.Core;
using Emerald.Core.Tasks;
using Emerald.WinUI.Helpers;
using Emerald.WinUI.Helpers.Settings.JSON;
@@ -87,7 +87,6 @@ public async void Initialize(object s, RoutedEventArgs e)
if (BackupState.WantBackup)
{
-
var r = await MessageBox.Show(
Localized.Error.Localize(),
Localized.LoadSettingsFailed.Localize(),
@@ -156,7 +155,6 @@ void Tasks()
TaskView.ChangeDescription(e.ID, string.Join(" ", (e.Message ?? "").Split(" ").Select(s => s.Localize())));
TaskView.ChangeSeverty(e.ID, e.Success ? InfoBarSeverity.Success : InfoBarSeverity.Error);
ShowMiniTask(c, string.Join(" ", (e.Message ?? "").Split(" ").Select(s => s.Localize())), e.Success ? InfoBarSeverity.Success : InfoBarSeverity.Error);
-
};
}
diff --git a/Emerald.App/Emerald.App/Models/Account.cs b/Emerald.App/Emerald.App/Models/Account.cs
index 9c09afdb..5efae4e5 100644
--- a/Emerald.App/Emerald.App/Models/Account.cs
+++ b/Emerald.App/Emerald.App/Models/Account.cs
@@ -1,4 +1,4 @@
-using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.ComponentModel;
using Emerald.Core;
using Emerald.WinUI.Enums;
using Emerald.WinUI.Helpers;
@@ -7,7 +7,6 @@ namespace Emerald.WinUI.Models
{
public partial class Account : Model
{
-
[ObservableProperty]
private string _UserName;
diff --git a/Emerald.App/Emerald.App/Models/NavViewHeader.cs b/Emerald.App/Emerald.App/Models/NavViewHeader.cs
index e725700e..a2fdde70 100644
--- a/Emerald.App/Emerald.App/Models/NavViewHeader.cs
+++ b/Emerald.App/Emerald.App/Models/NavViewHeader.cs
@@ -1,11 +1,10 @@
-using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.ComponentModel;
using Microsoft.UI.Xaml;
namespace Emerald.WinUI.Models
{
public partial class NavViewHeader : Model
{
-
[ObservableProperty]
private string _HeaderText;
diff --git a/Emerald.App/Emerald.App/UserControls/AdaptiveItemPane.xaml.cs b/Emerald.App/Emerald.App/UserControls/AdaptiveItemPane.xaml.cs
index 84ef0769..8aa58e65 100644
--- a/Emerald.App/Emerald.App/UserControls/AdaptiveItemPane.xaml.cs
+++ b/Emerald.App/Emerald.App/UserControls/AdaptiveItemPane.xaml.cs
@@ -4,13 +4,11 @@
namespace Emerald.WinUI.UserControls
{
-
///
/// A nice control from the RiseMP
///
public sealed partial class AdaptiveItemPane : UserControl
{
-
public static DependencyProperty LeftPaneProperty =
DependencyProperty.Register("LeftPane", typeof(object),
typeof(AdaptiveItemPane), new PropertyMetadata(null));
diff --git a/Emerald.App/Emerald.App/UserControls/ExpanderItem.xaml.cs b/Emerald.App/Emerald.App/UserControls/ExpanderItem.xaml.cs
index 8933a8c1..2d219a94 100644
--- a/Emerald.App/Emerald.App/UserControls/ExpanderItem.xaml.cs
+++ b/Emerald.App/Emerald.App/UserControls/ExpanderItem.xaml.cs
@@ -64,7 +64,5 @@ public Visibility BorderVisibility
// Using a DependencyProperty as the backing store for BorderVisibility. This enables animation, styling, binding, etc...
public static readonly DependencyProperty BorderVisibilityProperty =
DependencyProperty.Register("BorderVisibility", typeof(Visibility), typeof(ExpanderItem), new PropertyMetadata(null));
-
-
}
}
diff --git a/Emerald.App/Emerald.App/Views/Home/AccountsPage.xaml.cs b/Emerald.App/Emerald.App/Views/Home/AccountsPage.xaml.cs
index e21a2308..84f7669c 100644
--- a/Emerald.App/Emerald.App/Views/Home/AccountsPage.xaml.cs
+++ b/Emerald.App/Emerald.App/Views/Home/AccountsPage.xaml.cs
@@ -1,4 +1,4 @@
-using CmlLib.Core.Auth;
+using CmlLib.Core.Auth;
using Emerald.Core;
using Emerald.WinUI.Helpers;
using Emerald.WinUI.Models;
@@ -122,7 +122,6 @@ private void btnSelectAll_Click(object sender, RoutedEventArgs e)
item.IsChecked = val;
}
UpdateAll();
-
}
private void RemoveSelected() =>
Accounts.Remove(x => x.IsChecked);
@@ -161,7 +160,6 @@ private void CancelLogin_Click(object sender, RoutedEventArgs e)
var a = (sender as Button).DataContext as Account;
SetEditor(null);
Accounts.Add(a);
-
}
public void UpdateMainSource() =>
SS.Accounts = Accounts.Select(x =>
@@ -244,7 +242,6 @@ private async void mitMicrosoftAdd_Click(object sender, RoutedEventArgs e)
}
catch (Exception ex)
{
-
Core.Tasks.TasksHelper.CompleteTask(taskID, false, ex.Message);
}
}
diff --git a/Emerald.App/Emerald.App/Views/Home/HomePage.xaml.cs b/Emerald.App/Emerald.App/Views/Home/HomePage.xaml.cs
index ab24c351..f2c077a4 100644
--- a/Emerald.App/Emerald.App/Views/Home/HomePage.xaml.cs
+++ b/Emerald.App/Emerald.App/Views/Home/HomePage.xaml.cs
@@ -1,4 +1,4 @@
-using CmlLib.Core;
+using CmlLib.Core;
using CmlLib.Core.Auth;
using CmlLib.Core.Downloader;
using CommunityToolkit.WinUI.Helpers;
@@ -92,7 +92,6 @@ public async void Initialize()
var r = await MessageBox.Show("Error".Localize(), "MCPathFailed".Localize().Replace("{Path}", SS.Settings.Minecraft.Path), MessageBoxButtons.CustomWithCancel, "Yes".Localize(), "SetDifMCPath".Localize());
if (r == MessageBoxResults.Cancel)
Process.GetCurrentProcess().Kill(); // Application.Current.Exit() didn't kill the process
-
else if (r == MessageBoxResults.CustomResult2)
{
var fop = new FolderPicker
@@ -106,7 +105,6 @@ public async void Initialize()
SS.Settings.Minecraft.Path = f.Path;
}
}
-
}
App.Current.Launcher.InitializeLauncher(new MinecraftPath(SS.Settings.Minecraft.Path));
@@ -152,7 +150,6 @@ public async void Initialize()
if (SystemInformation.Instance.IsFirstRun)
ShowTips();
-
}
public void ShowTips()
@@ -262,7 +259,6 @@ void FindSubVers(MinecraftVersion ver)
var found = splitText.All((key) => v.Version.ToLower().Contains(key));
if (found)
suitableItems.Add(v);
-
}
}
@@ -463,7 +459,6 @@ private void AdaptiveItemPane_OnStretched(object sender, EventArgs e)
s.Children.OfType().ToList().ForEach(x => x.HorizontalAlignment = HorizontalAlignment.Left);
NewsButton.HorizontalContentAlignment = ChangelogsButton.HorizontalContentAlignment = HorizontalAlignment.Left;
-
}
}
}
diff --git a/Emerald.App/Emerald.App/Views/Home/NewsPage.xaml.cs b/Emerald.App/Emerald.App/Views/Home/NewsPage.xaml.cs
index 0bafae92..0298ea6f 100644
--- a/Emerald.App/Emerald.App/Views/Home/NewsPage.xaml.cs
+++ b/Emerald.App/Emerald.App/Views/Home/NewsPage.xaml.cs
@@ -27,7 +27,6 @@ public NewsPage()
await Task.Delay(300);
pnlEmpty.Visibility = App.Current.Launcher.News.Entries.Any() ? Visibility.Collapsed : Visibility.Visible;
};
-
}
private void BackButton_Click(object sender, RoutedEventArgs e) =>
BackRequested?.Invoke(this, new EventArgs());
diff --git a/Emerald.App/Emerald.App/Views/Settings/AboutPage.xaml.cs b/Emerald.App/Emerald.App/Views/Settings/AboutPage.xaml.cs
index 3632cc60..32cb10d4 100644
--- a/Emerald.App/Emerald.App/Views/Settings/AboutPage.xaml.cs
+++ b/Emerald.App/Emerald.App/Views/Settings/AboutPage.xaml.cs
@@ -1,4 +1,4 @@
-using CommunityToolkit.WinUI.UI.Controls;
+using CommunityToolkit.WinUI.UI.Controls;
using Emerald.Core;
using Emerald.WinUI.Enums;
using Emerald.WinUI.Helpers;
@@ -102,7 +102,6 @@ private async void ToggleSwitch_Toggled(object sender, RoutedEventArgs e)
{
SS.Settings.App.WindowsHello = true;
}
-
}
private async void DeleteBackup_Click(object sender, RoutedEventArgs e)
diff --git a/Emerald.App/Emerald.App/Views/Settings/AppearancePage.xaml.cs b/Emerald.App/Emerald.App/Views/Settings/AppearancePage.xaml.cs
index b2d95df1..189fda80 100644
--- a/Emerald.App/Emerald.App/Views/Settings/AppearancePage.xaml.cs
+++ b/Emerald.App/Emerald.App/Views/Settings/AppearancePage.xaml.cs
@@ -1,4 +1,4 @@
-using Emerald.Core;
+using Emerald.Core;
using Emerald.WinUI.Helpers;
using Microsoft.UI.Xaml.Controls;
using System.Collections.ObjectModel;
@@ -93,7 +93,6 @@ private void GVColorList_SelectionChanged(object sender, SelectionChangedEventAr
private void CustomTintColor_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
{
-
var c = SS.Settings.App.Appearance.CustomMicaTintColor;
var cp = new ColorPicker()
{
diff --git a/Emerald.App/Emerald.App/Views/Settings/GeneralPage.xaml.cs b/Emerald.App/Emerald.App/Views/Settings/GeneralPage.xaml.cs
index 1fe2010a..be703784 100644
--- a/Emerald.App/Emerald.App/Views/Settings/GeneralPage.xaml.cs
+++ b/Emerald.App/Emerald.App/Views/Settings/GeneralPage.xaml.cs
@@ -1,4 +1,4 @@
-using CmlLib.Core;
+using CmlLib.Core;
using Emerald.WinUI.Enums;
using Emerald.WinUI.Helpers;
using Microsoft.UI.Xaml;
@@ -54,10 +54,8 @@ async void Try()
Try();
else
Start();
-
}
}
-
}
Start();
}
@@ -72,7 +70,5 @@ private void btnRamMinus_Click(object sender, RoutedEventArgs e) =>
private void btnAutoRAM_Click(object sender, RoutedEventArgs e) =>
SS.Settings.Minecraft.RAM = DirectResoucres.MaxRAM / 2;
-
-
}
}
diff --git a/Emerald.Core/Launcher.cs b/Emerald.Core/Launcher.cs
index 17ffd0d2..901af079 100644
--- a/Emerald.Core/Launcher.cs
+++ b/Emerald.Core/Launcher.cs
@@ -1,4 +1,4 @@
-using CmlLib.Core;
+using CmlLib.Core;
using CmlLib.Core.Downloader;
using CmlLib.Core.Files;
using CmlLib.Core.Installer.FabricMC;
@@ -140,7 +140,7 @@ void ProgChange(object sender, System.ComponentModel.ProgressChangedEventArgs e)
prog = e.ProgressPercentage;
if (createTask)
TasksHelper.EditProgressTask(id, prog, message: message);
- };
+ }
void FileChange(DownloadFileChangedEventArgs e)
{
@@ -148,7 +148,7 @@ void FileChange(DownloadFileChangedEventArgs e)
if (createTask)
TasksHelper.EditProgressTask(id, prog, message: message);
- };
+ }
try
{
diff --git a/Emerald.Core/News/JSON/Dimensions.cs b/Emerald.Core/News/JSON/Dimensions.cs
index 7016bea8..54f415af 100644
--- a/Emerald.Core/News/JSON/Dimensions.cs
+++ b/Emerald.Core/News/JSON/Dimensions.cs
@@ -1,6 +1,5 @@
namespace Emerald.Core.News.JSON
{
-
public class Dimensions
{
public int width { get; set; }
diff --git a/Emerald.Core/News/JSON/Entry.cs b/Emerald.Core/News/JSON/Entry.cs
index 908cf4ea..4abbe8df 100644
--- a/Emerald.Core/News/JSON/Entry.cs
+++ b/Emerald.Core/News/JSON/Entry.cs
@@ -2,7 +2,6 @@
namespace Emerald.Core.News.JSON
{
-
public class Entry
{
[JsonPropertyName("title")]
diff --git a/Emerald.Core/News/NewsHelper.cs b/Emerald.Core/News/NewsHelper.cs
index dc90f61c..4965e924 100644
--- a/Emerald.Core/News/NewsHelper.cs
+++ b/Emerald.Core/News/NewsHelper.cs
@@ -1,4 +1,4 @@
-using System.Text.Json;
+using System.Text.Json;
using System.Collections.ObjectModel;
using System.ComponentModel;
@@ -84,7 +84,6 @@ public ObservableCollection Entries
foreach (var item in AllEntries.Where(x => filter == null || filter.Contains(x.Category)))
Entries.Add(item);
-
}
catch
{
diff --git a/Emerald.Core/Optifine.cs b/Emerald.Core/Optifine.cs
index 0cf9d52a..bc6b1147 100644
--- a/Emerald.Core/Optifine.cs
+++ b/Emerald.Core/Optifine.cs
@@ -1,4 +1,4 @@
-using CmlLib.Core;
+using CmlLib.Core;
using System.Text.Json;
using ProjBobcat.Class.Helper;
using ProjBobcat.Class.Model.Optifine;
@@ -49,7 +49,7 @@ public async Task> GetOptifineVersions()
javaResult.Add(java);
}
- if (!javaResult.Any())
+ if (javaResult.Count == 0)
return (false, "NoJRE");
ProgressChanged(this, 0);
diff --git a/Emerald.Core/Store/Labrinth.cs b/Emerald.Core/Store/Labrinth.cs
index 41ceff86..2b5dadd9 100644
--- a/Emerald.Core/Store/Labrinth.cs
+++ b/Emerald.Core/Store/Labrinth.cs
@@ -1,4 +1,4 @@
-using CmlLib.Core;
+using CmlLib.Core;
using Emerald.Core.Tasks;
using System.Text.Json;
using System.Collections.Specialized;
@@ -34,7 +34,6 @@ private async Task Get(string code)
return await response.Content.ReadAsStringAsync();
throw new Exception("Failed to GET: \"" + code + "\", StatusCode: " + response.StatusCode.ToString());
-
}
private int DownloadTaskID;
@@ -75,7 +74,7 @@ private async void ModrinthDownload(string link, string folderdir, string fileNa
{
int taskID = name == "" ? Tasks.TasksHelper.AddTask(Localized.GettingMods) : TasksHelper.AddTask(Localized.SearchStore, name);
- string categouriesString = (categories != null && categories.Any() && categories.Length != 15) ? $"[\"categories:{string.Join("\"],[\"categories:", categories)}\"],".ToLower() : "";
+ string categouriesString = (categories != null && categories.Length != 0 && categories.Length != 15) ? $"[\"categories:{string.Join("\"],[\"categories:", categories)}\"],".ToLower() : "";
Results.SearchResult s;
@@ -163,15 +162,12 @@ public enum SearchCategories
Technology,
Utility,
Worldgen
-
}
}
namespace Emerald.Core.Store.Results
{
-
public class File
{
-
[JsonPropertyName("hashes")]
public Hashes Hashes { get; set; }
@@ -244,7 +240,6 @@ public class Version : INotifyPropertyChanged
public class Hashes
{
-
[JsonPropertyName("sha512")]
public string Sha512 { get; set; }
@@ -254,7 +249,6 @@ public class Hashes
public class SearchResult
{
-
[JsonPropertyName("hits")]
public Hit[] Hits { get; set; }
@@ -270,7 +264,6 @@ public class SearchResult
public class Hit
{
-
[JsonPropertyName("slug")]
public string Slug { get; set; }
@@ -421,7 +414,6 @@ public class License
public class Donation_Urls
{
-
[JsonPropertyName("id")]
public string ID { get; set; }
diff --git a/Emerald.Core/Util.cs b/Emerald.Core/Util.cs
index 6c459be6..56b7c2bc 100644
--- a/Emerald.Core/Util.cs
+++ b/Emerald.Core/Util.cs
@@ -1,4 +1,4 @@
-namespace Emerald.Core
+namespace Emerald.Core
{
public static class Util
{
@@ -91,7 +91,7 @@ private async Task ProcessContentStream(long? totalDownloadSize, Stream contentS
using var fileStream = new FileStream(_destinationFilePath, FileMode.Create, FileAccess.Write, FileShare.None, 8192, true);
do
{
- var bytesRead = await contentStream.ReadAsync(buffer, 0, buffer.Length);
+ var bytesRead = await contentStream.ReadAsync(buffer);
if (bytesRead == 0)
{
isMoreToRead = false;
From 117778b3f37b7a98c4b801ef297e6e025228d529 Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Mon, 2 Sep 2024 11:28:34 +0100
Subject: [PATCH 46/61] =?UTF-8?q?=F0=9F=94=80=20=F0=9F=93=B8=20Add=20hero?=
=?UTF-8?q?=20image=20to=20`README.md`=20(#51)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 7b206fed..f7139fd5 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# 💎 Emerald
+![Emerald Banner](https://github.com/user-attachments/assets/dbe4839c-eddf-49fa-97cc-edbd70b3d81f)
#### A swift Minecraft launcher made using WinUI technologies in the fast C# language that really pushes the boundary of the platform.
From 3b8b4baa910d6e85d92e5d6af660e55014b72f69 Mon Sep 17 00:00:00 2001
From: NoobNotFound
Date: Mon, 2 Sep 2024 16:19:12 +0530
Subject: [PATCH 47/61] rename IMinecraftStore to IModrinthStore
---
.../Store/Modrinth/IMinecraftStore.cs | 19 -------------------
.../Store/Modrinth/IModrinthStore.cs | 19 +++++++++++++++++++
Emerald.CoreX/Store/Modrinth/ModrinthStore.cs | 2 +-
3 files changed, 20 insertions(+), 20 deletions(-)
delete mode 100644 Emerald.CoreX/Store/Modrinth/IMinecraftStore.cs
create mode 100644 Emerald.CoreX/Store/Modrinth/IModrinthStore.cs
diff --git a/Emerald.CoreX/Store/Modrinth/IMinecraftStore.cs b/Emerald.CoreX/Store/Modrinth/IMinecraftStore.cs
deleted file mode 100644
index 64f17360..00000000
--- a/Emerald.CoreX/Store/Modrinth/IMinecraftStore.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Emerald.CoreX.Store.Modrinth.JSON;
-
-namespace Emerald.CoreX.Store.Modrinth;
-
-public interface IMinecraftStore
-{
- Task SearchAsync(string query, int limit = 15,
- SearchSortOptions sortOptions = SearchSortOptions.Relevance, string[]? categories = null);
-
- Task GetItemAsync(string id);
- Task?> GetVersionsAsync(string id);
- Task DownloadItemAsync(ItemFile file, string projectType, IProgress? progress = null, CancellationToken cancellationToken = default);
- public Category[] Categories { get; }
-}
diff --git a/Emerald.CoreX/Store/Modrinth/IModrinthStore.cs b/Emerald.CoreX/Store/Modrinth/IModrinthStore.cs
new file mode 100644
index 00000000..b764f6dc
--- /dev/null
+++ b/Emerald.CoreX/Store/Modrinth/IModrinthStore.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Emerald.CoreX.Store.Modrinth.JSON;
+
+namespace Emerald.CoreX.Store.Modrinth;
+
+public interface IModrinthStore
+{
+ public Task SearchAsync(string query, int limit = 15,
+ SearchSortOptions sortOptions = SearchSortOptions.Relevance, string[]? categories = null);
+ public Task LoadCategoriesAsync();
+ public Task GetItemAsync(string id);
+ public Task?> GetVersionsAsync(string id);
+ public Task DownloadItemAsync(ItemFile file, string projectType, IProgress? progress = null, CancellationToken cancellationToken = default);
+ public Category[] Categories { get; }
+}
diff --git a/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs b/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
index 74ff009f..d905ee27 100644
--- a/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
+++ b/Emerald.CoreX/Store/Modrinth/ModrinthStore.cs
@@ -13,7 +13,7 @@
namespace Emerald.CoreX.Store.Modrinth;
-public abstract class ModrinthStore : IMinecraftStore
+public abstract class ModrinthStore : IModrinthStore
{
protected readonly RestClient _client;
protected readonly ILogger _logger;
From 567a20764616a12e573583dc0705821129ace4eb Mon Sep 17 00:00:00 2001
From: NoobNotFound
Date: Mon, 2 Sep 2024 18:02:25 +0530
Subject: [PATCH 48/61] fix a bug in `CoreX.Helpers.FileDownloader`,
`VerifyFileIntegrityAsync` method
---
Emerald.CoreX/Helpers/FileDownloader.cs | 45 +++++++++++++++++++------
Emerald.CoreX/Store/Modrinth/Stores.cs | 10 +++---
2 files changed, 40 insertions(+), 15 deletions(-)
diff --git a/Emerald.CoreX/Helpers/FileDownloader.cs b/Emerald.CoreX/Helpers/FileDownloader.cs
index 4a2cbd47..8023e4bc 100644
--- a/Emerald.CoreX/Helpers/FileDownloader.cs
+++ b/Emerald.CoreX/Helpers/FileDownloader.cs
@@ -30,7 +30,7 @@ public FileDownloader(ILogger logger, HttpClient httpClient)
/// Optional. A CancellationToken to support cancellation of the download.
/// A task representing the asynchronous download operation.
public async Task DownloadFileAsync(string url, string filePath, Hashes? expectedHashes = null,
- IProgress? progress = null, CancellationToken cancellationToken = default)
+ IProgress? progress = null, CancellationToken cancellationToken = default)
{
_logger.LogInformation($"Downloading file from URL: {url}");
@@ -38,12 +38,18 @@ public async Task DownloadFileAsync(string url, string filePath, Hashes? expecte
{
Directory.CreateDirectory(Path.GetDirectoryName(filePath));
+ // Ensure any existing file is closed before overwriting
+ if (File.Exists(filePath))
+ {
+ File.Delete(filePath);
+ }
+
using var response = await _httpClient.GetAsync(url, HttpCompletionOption.ResponseHeadersRead, cancellationToken);
response.EnsureSuccessStatusCode();
var totalBytes = response.Content.Headers.ContentLength ?? -1L;
using var contentStream = await response.Content.ReadAsStreamAsync(cancellationToken);
- using var fileStream = new FileStream(filePath, FileMode.Create, FileAccess.Write, FileShare.None, 8192, true);
+ using var fileStream = new FileStream(filePath, FileMode.CreateNew, FileAccess.Write, FileShare.None, 8192, true);
var buffer = new byte[8192];
long totalBytesRead = 0;
@@ -53,9 +59,11 @@ public async Task DownloadFileAsync(string url, string filePath, Hashes? expecte
{
await fileStream.WriteAsync(buffer.AsMemory(0, bytesRead), cancellationToken);
totalBytesRead += bytesRead;
- progress?.Report(totalBytes > 0 ? (double)totalBytesRead / totalBytes : 0);
+ progress?.Report(totalBytes > 0 ? (double)totalBytesRead / totalBytes * 100 : 0);
}
+ fileStream.Dispose();
+ contentStream.Dispose();
_logger.LogInformation($"Successfully downloaded file to: {filePath}");
if (expectedHashes != null && !await VerifyFileIntegrityAsync(filePath, expectedHashes))
@@ -70,6 +78,7 @@ public async Task DownloadFileAsync(string url, string filePath, Hashes? expecte
}
}
+
///
/// Verifies the integrity of a file against expected hashes.
///
@@ -78,16 +87,32 @@ public async Task DownloadFileAsync(string url, string filePath, Hashes? expecte
/// True if the file integrity is verified, false otherwise.
private async Task VerifyFileIntegrityAsync(string filePath, Hashes expectedHashes)
{
- using var sha1 = SHA1.Create();
- using var sha512 = SHA512.Create();
- using var stream = File.OpenRead(filePath);
+ try
+ {
+ using var sha1 = SHA1.Create();
+ using var sha512 = SHA512.Create();
+
+ // Open the file with read-only access and allow other processes to read the file
+ using var stream = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.Read);
+
+ // Compute SHA-1 hash
+ var sha1Hash = BitConverter.ToString(await sha1.ComputeHashAsync(stream)).Replace("-", "").ToLowerInvariant();
- var sha1Hash = BitConverter.ToString(await sha1.ComputeHashAsync(stream)).Replace("-", "").ToLowerInvariant();
- stream.Position = 0;
- var sha512Hash = BitConverter.ToString(await sha512.ComputeHashAsync(stream)).Replace("-", "").ToLowerInvariant();
+ // Reset stream position for the next hash computation
+ stream.Position = 0;
- return sha1Hash == expectedHashes.Sha1 && sha512Hash == expectedHashes.Sha512;
+ // Compute SHA-512 hash
+ var sha512Hash = BitConverter.ToString(await sha512.ComputeHashAsync(stream)).Replace("-", "").ToLowerInvariant();
+
+ return sha1Hash == expectedHashes.Sha1 && sha512Hash == expectedHashes.Sha512;
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, $"Error occurred during file integrity verification for file: {filePath}");
+ throw;
+ }
}
+
}
diff --git a/Emerald.CoreX/Store/Modrinth/Stores.cs b/Emerald.CoreX/Store/Modrinth/Stores.cs
index 58e30be4..9f2b48b0 100644
--- a/Emerald.CoreX/Store/Modrinth/Stores.cs
+++ b/Emerald.CoreX/Store/Modrinth/Stores.cs
@@ -42,7 +42,7 @@ public ModStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOSDefa
public override async Task DownloadItemAsync(ItemFile file, string projectType, IProgress? progress = null, CancellationToken cancellationToken = default)
{
// Implement mod-specific download logic
- await base.DownloadItemAsync(file, "mods");
+ await base.DownloadItemAsync(file, "mods",progress, cancellationToken);
}
}
@@ -78,7 +78,7 @@ public PluginStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.GetOSD
public override async Task DownloadItemAsync(ItemFile file, string projectType,
IProgress? progress = null, CancellationToken cancellationToken = default)
{
- await base.DownloadItemAsync(file, "mods");
+ await base.DownloadItemAsync(file, "mods", progress, cancellationToken);
}
}
@@ -114,7 +114,7 @@ public ResourcePackStore(ILogger logger) : this(new MinecraftPath(MinecraftPath.
public override async Task DownloadItemAsync(ItemFile file, string projectType,
IProgress? progress = null, CancellationToken cancellationToken = default)
{
- await base.DownloadItemAsync(file, "resourcepacks");
+ await base.DownloadItemAsync(file, "resourcepacks", progress, cancellationToken);
}
}
@@ -153,7 +153,7 @@ public override async Task DownloadItemAsync(ItemFile file, string projectType,
IProgress? progress = null, CancellationToken cancellationToken = default)
{
// Implement shader-specific download logic
- await base.DownloadItemAsync(file, "shaders");
+ await base.DownloadItemAsync(file, "shaderpacks", progress, cancellationToken);
}
}
@@ -192,6 +192,6 @@ public override async Task DownloadItemAsync(ItemFile file, string projectType,
IProgress? progress = null, CancellationToken cancellationToken = default)
{
// Implement modpack-specific download logic
- await base.DownloadItemAsync(file, "modpacks");
+ await base.DownloadItemAsync(file, "modpacks", progress, cancellationToken);
}
}
From 44018f3cd99397f57b11ec79060bd58aa9762ffc Mon Sep 17 00:00:00 2001
From: NoobNotFound
Date: Mon, 2 Sep 2024 18:26:08 +0530
Subject: [PATCH 49/61] remove unwanted file
---
Emerald.CoreX/Modrinth.cs | 12 ------------
1 file changed, 12 deletions(-)
delete mode 100644 Emerald.CoreX/Modrinth.cs
diff --git a/Emerald.CoreX/Modrinth.cs b/Emerald.CoreX/Modrinth.cs
deleted file mode 100644
index ecafabd6..00000000
--- a/Emerald.CoreX/Modrinth.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Emerald.CoreX
-{
- internal class Modrinth
- {
- }
-}
From 889c156e8aa7dc278ee185742c791c02ba19b657 Mon Sep 17 00:00:00 2001
From: Lamparter
Date: Mon, 2 Sep 2024 11:28:34 +0100
Subject: [PATCH 50/61] =?UTF-8?q?=F0=9F=93=B8=20Add=20hero=20image=20to=20?=
=?UTF-8?q?`README.md`=20(#51)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 7b206fed..f7139fd5 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# 💎 Emerald
+![Emerald Banner](https://github.com/user-attachments/assets/dbe4839c-eddf-49fa-97cc-edbd70b3d81f)
#### A swift Minecraft launcher made using WinUI technologies in the fast C# language that really pushes the boundary of the platform.
From ac232250540a6f38a63e0b6cd89db36d4e99876e Mon Sep 17 00:00:00 2001
From: NoobNotFound
Date: Sun, 6 Oct 2024 16:12:28 +0530
Subject: [PATCH 51/61] some updates on Uno UI
---
Directory.Packages.props | 1 +
Emerald/App.xaml.cs | 11 +-
Emerald/Assets/icon.png | Bin 0 -> 26146 bytes
Emerald/Emerald.csproj | 13 ++
Emerald/Helpers/Extensions.cs | 155 +++++++++++++++
.../MarkupExtensions/ConditionString.cs | 21 +++
Emerald/Helpers/MarkupExtensions/FontIcon.cs | 14 ++
.../MarkupExtensions/LocalizeString.cs | 12 ++
Emerald/Helpers/WindowManager.cs | 176 ++++++++++++++++++
Emerald/MainPage.xaml | 173 ++++++++++++++++-
Emerald/MainPage.xaml.cs | 8 +
Emerald/Models/Model.cs | 17 ++
Emerald/Models/NavViewHeader.cs | 23 +++
Emerald/Models/SquareNavigationViewItem.cs | 61 ++++++
Emerald/UserControls/Titlebar.xaml | 41 ++++
Emerald/UserControls/Titlebar.xaml.cs | 25 +++
16 files changed, 742 insertions(+), 9 deletions(-)
create mode 100644 Emerald/Assets/icon.png
create mode 100644 Emerald/Helpers/Extensions.cs
create mode 100644 Emerald/Helpers/MarkupExtensions/ConditionString.cs
create mode 100644 Emerald/Helpers/MarkupExtensions/FontIcon.cs
create mode 100644 Emerald/Helpers/MarkupExtensions/LocalizeString.cs
create mode 100644 Emerald/Helpers/WindowManager.cs
create mode 100644 Emerald/Models/Model.cs
create mode 100644 Emerald/Models/NavViewHeader.cs
create mode 100644 Emerald/Models/SquareNavigationViewItem.cs
create mode 100644 Emerald/UserControls/Titlebar.xaml
create mode 100644 Emerald/UserControls/Titlebar.xaml.cs
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 19f6fe46..e55bb4d6 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -9,6 +9,7 @@
+
diff --git a/Emerald/App.xaml.cs b/Emerald/App.xaml.cs
index 25e5d31b..4c4e74a9 100644
--- a/Emerald/App.xaml.cs
+++ b/Emerald/App.xaml.cs
@@ -12,7 +12,7 @@ public App()
this.InitializeComponent();
}
- protected Window? MainWindow { get; private set; }
+ public Window? MainWindow { get; private set; }
protected IHost? Host { get; private set; }
protected override void OnLaunched(LaunchActivatedEventArgs args)
@@ -31,6 +31,7 @@ protected override void OnLaunched(LaunchActivatedEventArgs args)
);
MainWindow = builder.Window;
+
#if DEBUG
MainWindow.EnableHotReload();
#endif
@@ -48,6 +49,9 @@ protected override void OnLaunched(LaunchActivatedEventArgs args)
// Place the frame in the current Window
MainWindow.Content = rootFrame;
}
+#if WINDOWS
+ var mica = Emerald.Uno.Helpers.WindowManager.IntializeWindow(MainWindow);
+#endif
if (rootFrame.Content == null)
{
@@ -59,4 +63,9 @@ protected override void OnLaunched(LaunchActivatedEventArgs args)
// Ensure the current window is active
MainWindow.Activate();
}
+
+ ///
+ /// Gets the current instance in use
+ ///
+ public new static App Current => (App)Application.Current;
}
diff --git a/Emerald/Assets/icon.png b/Emerald/Assets/icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..94000d9412246469b3f2caa525ad5b7e66a30c52
GIT binary patch
literal 26146
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
z
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
B6Sn{W
literal 0
HcmV?d00001
diff --git a/Emerald/Emerald.csproj b/Emerald/Emerald.csproj
index 5e96e83c..77654f5f 100644
--- a/Emerald/Emerald.csproj
+++ b/Emerald/Emerald.csproj
@@ -41,7 +41,20 @@
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+ MSBuild:Compile
+
+
diff --git a/Emerald/Helpers/Extensions.cs b/Emerald/Helpers/Extensions.cs
new file mode 100644
index 00000000..34d20225
--- /dev/null
+++ b/Emerald/Helpers/Extensions.cs
@@ -0,0 +1,155 @@
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.Windows.ApplicationModel.Resources;
+using System;
+using System.Collections.Concurrent;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Security.Cryptography;
+using System.Text;
+using Windows.System.Diagnostics;
+
+namespace Emerald.Uno.Helpers;
+
+public static class Extensions
+{
+ private static readonly ConcurrentDictionary cachedResources = new();
+
+ //public static void ShowAt(this TeachingTip tip, FrameworkElement element, TeachingTipPlacementMode placement = TeachingTipPlacementMode.Auto, bool closeWhenClick = true, bool addToMainGrid = true)
+ //{
+ // if (addToMainGrid)
+ // (App.Current.MainWindow.Content as Grid).Children.Add(tip);
+
+ // tip.Target = element;
+ // tip.PreferredPlacement = placement;
+ // tip.IsOpen = true;
+ // if (closeWhenClick)
+ // {
+ // tip.ActionButtonClick += (_, _) => tip.IsOpen = false;
+ // tip.CloseButtonClick += (_, _) => tip.IsOpen = false;
+ // }
+ //}
+
+ public static int GetMemoryGB()
+ {
+ SystemMemoryUsageReport systemMemoryUsageReport = SystemDiagnosticInfo.GetForCurrentSystem().MemoryUsage.GetReport();
+
+ long memkb = Convert.ToInt64(systemMemoryUsageReport.TotalPhysicalSizeInBytes);
+ return Convert.ToInt32(memkb / Math.Pow(1024, 3));
+ }
+
+ public static string KiloFormat(this int num)
+ {
+ if (num >= 100000000)
+ return (num / 1000000).ToString("#,0M");
+
+ if (num >= 10000000)
+ return (num / 1000000).ToString("0.#") + "M";
+
+ if (num >= 100000)
+ return (num / 1000).ToString("#,0K");
+
+ if (num >= 1000)
+ return (num / 100).ToString("0.#") + "K";
+
+ return num.ToString("#,0");
+ }
+
+ //public static ContentDialog ToContentDialog(this UIElement content, string title, string closebtnText = null, ContentDialogButton defaultButton = ContentDialogButton.Close)
+ //{
+ // ContentDialog dialog = new()
+ // {
+ // XamlRoot = App.Current.MainWindow.Content.XamlRoot,
+ // Style = Application.Current.Resources["DefaultContentDialogStyle"] as Style,
+ // Title = title,
+ // CloseButtonText = closebtnText,
+ // DefaultButton = defaultButton,
+ // Content = content,
+ // RequestedTheme = (ElementTheme)Settings.SettingsSystem.Settings.App.Appearance.Theme
+ // };
+ // return dialog;
+ //}
+
+ public static int Remove(this ObservableCollection coll, Func condition)
+ {
+ var itemsToRemove = coll.Where(condition).ToList();
+
+ foreach (var itemToRemove in itemsToRemove)
+ {
+ coll.Remove(itemToRemove);
+ }
+ return itemsToRemove.Count;
+ }
+
+ public static int Remove(this List coll, Func