-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modules: Robust loader and plugin system (#249)
* Start work on a less buggy, more flexible module system * IPlatformInfo: Use Stone 7.0.0 schema * ExtensibilityLoader: Isolate CoreService through a ServiceContainer requiring IPluginContainer to specify exactly which services are required. * StoneProvider: Refactor StoneProvider into a support module * Loader: Refactor some names * StoreProviders: In order to prevent databases from being recreated, scope database service creation to a privileged composable to register them as first-class services. * PluginManager: Begin to refactor PluginManager into a much higher level API * Plugin: Introduce the Provision-Plugin Plugin Manager * Plugins: Allow non-provisioned, standalone plugins that do not have a provisioned content folder, can not access module references, and can be loaded without requesting a provision from the plugin manager. * Cleanup: Move Loader into Framework * AssemblyModuleLoader: Catch and rethrow the TypeLoadException * Logger: Setup output on first use. * Plugin: Make composable * IModule: Add ContentsDirectory as a standard directory. * Snowball: Delete obsolete Snowball packaging * Tooling: Add a module packager to publish plugins as a module. * Snowflake: Various cleanups * AssemblyModulePacker: Multi-target 1.0 and 1.1, remove dependency on CliWrap * Support: Add Pack CLI tool to all support assemblies * Dependencies: Consolidate and update dependencies * Runtime: Update to build against .NET Standard to remove preliminary dependencies. * KeyedImageCache: Refactor out into a service to avoid a dependency on System.Drawing in the framework. * AssemblyModulePacker: Support netcoreapp2.0 * Build: Fix build on newest VS Preview * Logging: Move logging implementation into Snowflake.Framework.Services * TargetFramework: Retarget to netcoreapp2.0 to shrink bundle size * AssemblyModulePacker: Target only netcoreapp2.0 * Utility: Refactor out persistence implementations to reduce bundle size of projects that import Snowflake.Framework Also includes Force.Crc32 into source code. * Travis: Build on 2.0.0-preview1-005977 * Tests: Fix test build * Tests: Use Snowflake.Persistence * Shiragame: Refactor Shiragame out into a support service * Cleanup * ShiragameProvider: fix module metadata * Library: Use a tuple instead of an anonymous object * Library: Add some DLR casts to work around funky behaviour on Linux * Appveyor: Build on Visual Studio 2016 Preview image * Tests: Fix xunit warnings * Plugin: Implement the configuration API. * Extensibility: Implement the configuration API * PluginProvision: Expose access to a configuration store to retrieve plugin configuration. * ICoreService: Rename to IServiceContainer * Force.Crc32: Add tests and license declaration * Tests: Add a bunch of tests * Tests: Write lots of loader tests * Tests: Fix tests that violate the different-assembly policy * StructuredFilename: Add tests * Tests: Test plugin * Test: Test JsonPluginProperties
- Loading branch information
Showing
221 changed files
with
4,233 additions
and
3,350 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
version: 0.2.{build} | ||
os: Visual Studio 2017 | ||
os: Visual Studio 2017 Preview | ||
branches: | ||
# whitelist | ||
only: | ||
|
12 changes: 9 additions & 3 deletions
12
src/Snowflake.Bootstrap.Windows/Snowflake.Bootstrap.Windows.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,22 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netcoreapp1.1</TargetFramework> | ||
<TargetFramework>netcoreapp2.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Update="Microsoft.NETCore.App" Version="2.0.0-preview1-002111-00" /> | ||
</ItemGroup> | ||
|
||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Snowflake.Framework\Snowflake.Framework.csproj" /> | ||
<ProjectReference Include="..\Snowflake.Plugin.Emulators.RetroArch\Snowflake.Plugin.Emulators.RetroArch.csproj" /> | ||
<ProjectReference Include="..\Snowflake.Framework.Primitives\Snowflake.Framework.Primitives.csproj" /> | ||
<ProjectReference Include="..\Snowflake.Framework.Services\Snowflake.Framework.Services.csproj" /> | ||
<ProjectReference Include="..\Snowflake.Framework.Utility\Snowflake.Framework.Utility.csproj" /> | ||
<ProjectReference Include="..\Snowflake.Framework\Snowflake.Framework.csproj" /> | ||
</ItemGroup> | ||
|
||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/Snowflake.Framework.Persistence/Snowflake.Framework.Persistence.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp2.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Data.SQLite" Version="2.0.0-preview1-final" /> | ||
<PackageReference Include="Dapper" Version="1.50.3-beta1" /> | ||
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Snowflake.Framework.Primitives\Snowflake.Framework.Primitives.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 0 additions & 38 deletions
38
src/Snowflake.Framework.Primitives/Extensibility/Configuration/IPluginConfigOption.cs
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
src/Snowflake.Framework.Primitives/Extensibility/Configuration/IPluginConfiguration.cs
This file was deleted.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
src/Snowflake.Framework.Primitives/Extensibility/Configuration/IPluginConfigurationStore.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using Snowflake.Configuration; | ||
using System; | ||
|
||
namespace Snowflake.Extensibility.Configuration | ||
{ | ||
/// <summary> | ||
/// Represents a store that can save and retrieve an aribtrary configuration | ||
/// collection representing a single emulator configuration file, associated with a game record | ||
/// </summary> | ||
/// <remarks> | ||
/// To "delete" a configuration, just overwrite the existing values with a default instance | ||
/// </remarks> | ||
public interface IPluginConfigurationStore | ||
{ | ||
/// <summary> | ||
/// Retrieves the configuration collection associated with this game record. | ||
/// This method is guaranteed to return a usable instance of the configuration collection. | ||
/// If a prior configuration has not been set, it should return a default instance with all | ||
/// properties initialized. | ||
/// </summary> | ||
/// <typeparam name="T">The type of configuration collection</typeparam> | ||
IConfigurationSection<T> Get<T>() where T: class, IConfigurationSection<T>; | ||
|
||
/// <summary> | ||
/// Saves and persists a configuration collection to the store. | ||
/// </summary> | ||
/// <param name="configuration">The configuration to save to the store</param> | ||
void Set<T>(IConfigurationSection<T> configuration) where T: class, IConfigurationSection<T>; | ||
|
||
/// <summary> | ||
/// Updates a single <em>existing</em> configuration value, this will error if the GUID is not found in | ||
/// the database. | ||
/// </summary> | ||
/// <param name="value">The configuration value with valid GUID and updated data</param> | ||
void Set(IConfigurationValue value); | ||
} | ||
} |
8 changes: 0 additions & 8 deletions
8
src/Snowflake.Framework.Primitives/Extensibility/Configuration/IPluginSelectOption.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.