mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Corsair - Added Dominator Platinum RGB layout
Core - Improved startup logging
This commit is contained in:
1 parent
f18edc4f36
commit
a93875e680
8 files changed
+236
-19
No files matched your search
@@ -17,6 +17,16 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<NrtRevisionFormat>2.0-{chash:6}</NrtRevisionFormat>
|
||||
<NrtResolveSimpleAttributes>true</NrtResolveSimpleAttributes>
|
||||
<NrtResolveInformationalAttribute>true</NrtResolveInformationalAttribute>
|
||||
<NrtResolveCopyright>true</NrtResolveCopyright>
|
||||
<NrtTagMatch>v[0-9]*</NrtTagMatch>
|
||||
<NrtRemoveTagV>true</NrtRemoveTagV>
|
||||
<NrtRequiredVcs>git</NrtRequiredVcs>
|
||||
<NrtShowRevision>true</NrtShowRevision>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Artemis.Storage\Artemis.Storage.csproj">
|
||||
<Private>false</Private>
|
||||
@@ -43,6 +53,10 @@
|
||||
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
|
||||
<PackageReference Include="System.Reflection.Metadata" Version="1.8.0" />
|
||||
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
|
||||
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.3.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="RGB.NET.Brushes">
|
||||
|
||||
@@ -67,31 +67,51 @@ namespace Artemis.Core.Models.Surface
|
||||
public double X
|
||||
{
|
||||
get => DeviceEntity.X;
|
||||
set => DeviceEntity.X = value;
|
||||
set
|
||||
{
|
||||
DeviceEntity.X = value;
|
||||
NotifyOfPropertyChange(nameof(X));
|
||||
}
|
||||
}
|
||||
|
||||
public double Y
|
||||
{
|
||||
get => DeviceEntity.Y;
|
||||
set => DeviceEntity.Y = value;
|
||||
set
|
||||
{
|
||||
DeviceEntity.Y = value;
|
||||
NotifyOfPropertyChange(nameof(Y));
|
||||
}
|
||||
}
|
||||
|
||||
public double Rotation
|
||||
{
|
||||
get => DeviceEntity.Rotation;
|
||||
set => DeviceEntity.Rotation = value;
|
||||
set
|
||||
{
|
||||
DeviceEntity.Rotation = value;
|
||||
NotifyOfPropertyChange(nameof(Rotation));
|
||||
}
|
||||
}
|
||||
|
||||
public double Scale
|
||||
{
|
||||
get => DeviceEntity.Scale;
|
||||
set => DeviceEntity.Scale = value;
|
||||
set
|
||||
{
|
||||
DeviceEntity.Scale = value;
|
||||
NotifyOfPropertyChange(nameof(Scale));
|
||||
}
|
||||
}
|
||||
|
||||
public int ZIndex
|
||||
{
|
||||
get => DeviceEntity.ZIndex;
|
||||
set => DeviceEntity.ZIndex = value;
|
||||
set
|
||||
{
|
||||
DeviceEntity.ZIndex = value;
|
||||
NotifyOfPropertyChange(nameof(ZIndex));
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using Artemis.Core.Events;
|
||||
using Artemis.Core.Exceptions;
|
||||
using Artemis.Core.JsonConverters;
|
||||
using Artemis.Core.Ninject;
|
||||
using Artemis.Core.Plugins.Abstract;
|
||||
using Artemis.Core.Plugins.Models;
|
||||
using Artemis.Core.Services.Interfaces;
|
||||
using Artemis.Core.Services.Storage.Interfaces;
|
||||
@@ -15,6 +15,7 @@ using RGB.NET.Core;
|
||||
using Serilog;
|
||||
using Serilog.Events;
|
||||
using SkiaSharp;
|
||||
using Module = Artemis.Core.Plugins.Abstract.Module;
|
||||
|
||||
namespace Artemis.Core.Services
|
||||
{
|
||||
@@ -73,7 +74,8 @@ namespace Artemis.Core.Services
|
||||
if (IsInitialized)
|
||||
throw new ArtemisCoreException("Cannot initialize the core as it is already initialized.");
|
||||
|
||||
_logger.Information("Initializing Artemis Core version {version}", typeof(CoreService).Assembly.GetName().Version);
|
||||
var versionAttribute = typeof(CoreService).Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>();
|
||||
_logger.Information("Initializing Artemis Core version {version}", versionAttribute?.InformationalVersion);
|
||||
ApplyLoggingLevel();
|
||||
|
||||
// Initialize the services
|
||||
|
||||
@@ -75,8 +75,7 @@ namespace Artemis.Core.Services
|
||||
var metadataFile = Path.Combine(match.FullName, "plugin.json");
|
||||
if (!File.Exists(metadataFile))
|
||||
{
|
||||
_logger.Information("Copying missing built-in plugin {name} version: {version}",
|
||||
builtInPluginInfo.Name, builtInPluginInfo.Version);
|
||||
_logger.Debug("Copying missing built-in plugin {builtInPluginInfo}", builtInPluginInfo);
|
||||
CopyBuiltInPlugin(subDirectory);
|
||||
}
|
||||
else
|
||||
@@ -88,15 +87,13 @@ namespace Artemis.Core.Services
|
||||
#if DEBUG
|
||||
if (builtInPluginInfo.Version >= pluginInfo.Version)
|
||||
{
|
||||
_logger.Information("Copying updated built-in plugin {name} version: {version} (old version: {oldVersion})",
|
||||
builtInPluginInfo.Name, builtInPluginInfo.Version, pluginInfo.Version);
|
||||
_logger.Debug("Copying updated built-in plugin {builtInPluginInfo}", builtInPluginInfo);
|
||||
CopyBuiltInPlugin(subDirectory);
|
||||
}
|
||||
#else
|
||||
if (builtInPluginInfo.Version > pluginInfo.Version)
|
||||
if (builtInPluginInfo.Version > pluginInfo.Version)
|
||||
{
|
||||
_logger.Information("Copying updated built-in plugin {name} version: {version} (old version: {oldVersion})",
|
||||
builtInPluginInfo.Name, builtInPluginInfo.Version, pluginInfo.Version);
|
||||
_logger.Debug("Copying updated built-in plugin from {pluginInfo} to {builtInPluginInfo}", pluginInfo, builtInPluginInfo);
|
||||
CopyBuiltInPlugin(subDirectory);
|
||||
}
|
||||
#endif
|
||||
@@ -139,6 +136,8 @@ namespace Artemis.Core.Services
|
||||
// Locate the main entry
|
||||
var pluginInfo = JsonConvert.DeserializeObject<PluginInfo>(File.ReadAllText(metadataFile));
|
||||
pluginInfo.Directory = subDirectory;
|
||||
|
||||
_logger.Debug("Loading plugin {pluginInfo}", pluginInfo);
|
||||
OnPluginLoading(new PluginEventArgs(pluginInfo));
|
||||
LoadPlugin(pluginInfo);
|
||||
}
|
||||
@@ -165,11 +164,12 @@ namespace Artemis.Core.Services
|
||||
var threwException = false;
|
||||
try
|
||||
{
|
||||
_logger.Debug("Enabling plugin {pluginInfo}", pluginInfo);
|
||||
pluginInfo.Instance.SetEnabled(true);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.Warning(new ArtemisPluginException(pluginInfo, "Failed to load enable plugin", e), "Plugin exception");
|
||||
_logger.Warning(new ArtemisPluginException(pluginInfo, "Failed to enable plugin", e), "Plugin exception");
|
||||
pluginInfo.Enabled = false;
|
||||
threwException = true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user