1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Enabled plugin debugging

Moved built-in plugins
Auto-copy built-in plugins on build
This commit is contained in:
SpoinkyNL 2018-03-03 13:46:22 +01:00
parent 7a2717d8b9
commit 36b8ddc023
13 changed files with 56 additions and 53 deletions

View File

@ -49,8 +49,8 @@ namespace Artemis.Core.Services
Surface.LoadDevices(CorsairDeviceProvider.Instance);
Surface.LoadDevices(DMXDeviceProvider.Instance);
Surface.LoadDevices(LogitechDeviceProvider.Instance);
// Surface.LoadDevices(MsiDeviceProvider.Instance);
Surface.LoadDevices(NovationDeviceProvider.Instance);
Surface.LoadDevices(MsiDeviceProvider.Instance);
Surface.LoadDevices(RazerDeviceProvider.Instance);
// TODO SpoinkyNL 8-1-18: Load alignment

View File

@ -4,14 +4,13 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{58113CC5-A9CA-4EC3-AB4E-3C94B99268D8}</ProjectGuid>
<ProjectGuid>{106F08AE-5FE8-433E-AA65-64E5219B5FC7}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Module.General</RootNamespace>
<AssemblyName>Module.General</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<RootNamespace>Artemis.Plugins.BuiltIn</RootNamespace>
<AssemblyName>Artemis.Plugins.BuiltIn</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -38,8 +37,6 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
@ -50,10 +47,21 @@
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="GeneralModule.cs" />
<Compile Include="GeneralViewModel.cs" />
<None Include="Modules\General\GeneralModule.cs" />
<None Include="Modules\General\GeneralViewModel.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Modules\General\GeneralView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="Modules\General\plugin.json" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Artemis.Core\Artemis.Core.csproj">
<Project>{9B811F9B-86B9-4771-87AF-72BAE7078A36}</Project>
@ -64,16 +72,5 @@
<Name>Artemis.Plugins</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Page Include="GeneralView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
<None Include="plugin.json" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -1,14 +1,18 @@
using System;
using System.Diagnostics;
using Artemis.Core.Services.Interfaces;
using Artemis.Plugins.Interfaces;
namespace Module.General
namespace Artemis.Plugins.BuiltIn.Modules.General
{
public class GeneralModule : IModule
{
private readonly ICoreService _coreService;
public GeneralModule(ICoreService coreService)
{
Console.WriteLine(coreService);
_coreService = coreService;
Debugger.Break();
}
public void LoadPlugin()

View File

@ -2,7 +2,7 @@
using Artemis.Plugins.Models;
using Stylet;
namespace Module.General
namespace Artemis.Plugins.BuiltIn.Modules.General
{
public class GeneralViewModel : Screen, IModuleViewModel
{

View File

@ -1,14 +1,15 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Module.General")]
[assembly: AssemblyTitle("Artemis.Plugins.BuiltIn")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Module.General")]
[assembly: AssemblyProduct("Artemis.Plugins.BuiltIn")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@ -19,7 +20,7 @@ using System.Runtime.InteropServices;
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("58113cc5-a9ca-4ec3-ab4e-3c94b99268d8")]
[assembly: Guid("106f08ae-5fe8-433e-aa65-64e5219b5fc7")]
// Version information for an assembly consists of the following four values:
//
@ -32,4 +33,4 @@ using System.Runtime.InteropServices;
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -1,20 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.2.1.0" newVersion="1.2.1.0" />
<assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
@ -35,6 +30,10 @@
<assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.2.1.0" newVersion="1.2.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Ninject" publicKeyToken="c7192dc5380945e7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.3.4.0" newVersion="3.3.4.0" />
@ -45,7 +44,4 @@
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
</startup>
</configuration>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Stylet" version="1.1.21" targetFramework="net461" />
</packages>

View File

@ -67,6 +67,7 @@ namespace Artemis.Plugins.Models
{
// Make sure the right engine is used
CSScript.EvaluatorConfig.Engine = EvaluatorEngine.CodeDom;
CSScript.EvaluatorConfig.DebugBuild = true;
if (!folder.EndsWith("\\"))
folder += "\\";
@ -100,6 +101,7 @@ namespace Artemis.Plugins.Models
{
// Make sure the right engine is used
CSScript.EvaluatorConfig.Engine = EvaluatorEngine.CodeDom;
CSScript.EvaluatorConfig.DebugBuild = true;
// Don't attempt to locave VMs for something other than a module
if (!(Plugin is IModule))

View File

@ -224,6 +224,10 @@
<Project>{9b811f9b-86b9-4771-87af-72bae7078a36}</Project>
<Name>Artemis.Core</Name>
</ProjectReference>
<ProjectReference Include="..\Artemis.Plugins.BuiltIn\Artemis.Plugins.BuiltIn.csproj">
<Project>{106f08ae-5fe8-433e-aa65-64e5219b5fc7}</Project>
<Name>Artemis.Plugins.BuiltIn</Name>
</ProjectReference>
<ProjectReference Include="..\Artemis.Plugins\Artemis.Plugins.csproj">
<Project>{cd23bc5e-57f0-46ce-a007-24d031146219}</Project>
<Name>Artemis.Plugins</Name>
@ -266,4 +270,8 @@
<Import Project="..\packages\RGB.NET.Devices.Logitech.0.0.1.38\build\net45\RGB.NET.Devices.Logitech.targets" Condition="Exists('..\packages\RGB.NET.Devices.Logitech.0.0.1.38\build\net45\RGB.NET.Devices.Logitech.targets')" />
<Import Project="..\packages\RGB.NET.Devices.Msi.0.0.1.38\build\net45\RGB.NET.Devices.Msi.targets" Condition="Exists('..\packages\RGB.NET.Devices.Msi.0.0.1.38\build\net45\RGB.NET.Devices.Msi.targets')" />
<Import Project="..\packages\RGB.NET.Devices.Razer.0.0.1.38\build\net45\RGB.NET.Devices.Razer.targets" Condition="Exists('..\packages\RGB.NET.Devices.Razer.0.0.1.38\build\net45\RGB.NET.Devices.Razer.targets')" />
<PropertyGroup>
<PostBuildEvent>echo Copying built-in plugins...
xcopy /s /y /q $(SolutionDir)Artemis.Plugins.BuiltIn\Modules %25ProgramData%25\Artemis\plugins</PostBuildEvent>
</PropertyGroup>
</Project>

View File

@ -11,9 +11,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Artemis.Core", "Artemis.Cor
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Artemis.Plugins", "Artemis.Plugins\Artemis.Plugins.csproj", "{CD23BC5E-57F0-46CE-A007-24D031146219}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{FAF4C738-F49C-490B-9134-57598FF5358C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Module.General", "Module.General\Module.General.csproj", "{58113CC5-A9CA-4EC3-AB4E-3C94B99268D8}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Artemis.Plugins.BuiltIn", "Artemis.Plugins.BuiltIn\Artemis.Plugins.BuiltIn.csproj", "{106F08AE-5FE8-433E-AA65-64E5219B5FC7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -37,17 +35,14 @@ Global
{CD23BC5E-57F0-46CE-A007-24D031146219}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CD23BC5E-57F0-46CE-A007-24D031146219}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CD23BC5E-57F0-46CE-A007-24D031146219}.Release|Any CPU.Build.0 = Release|Any CPU
{58113CC5-A9CA-4EC3-AB4E-3C94B99268D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{58113CC5-A9CA-4EC3-AB4E-3C94B99268D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{58113CC5-A9CA-4EC3-AB4E-3C94B99268D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{58113CC5-A9CA-4EC3-AB4E-3C94B99268D8}.Release|Any CPU.Build.0 = Release|Any CPU
{106F08AE-5FE8-433E-AA65-64E5219B5FC7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{106F08AE-5FE8-433E-AA65-64E5219B5FC7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{106F08AE-5FE8-433E-AA65-64E5219B5FC7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{106F08AE-5FE8-433E-AA65-64E5219B5FC7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{58113CC5-A9CA-4EC3-AB4E-3C94B99268D8} = {FAF4C738-F49C-490B-9134-57598FF5358C}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C203080A-4473-4CC2-844B-F552EA43D66A}
EndGlobalSection

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Stylet" version="1.1.21" targetFramework="net46" />
</packages>