remove addon project and use instancer

This commit is contained in:
2023-11-21 09:11:56 +01:00
parent 5d031f8ead
commit 9598aa147e
6 changed files with 4 additions and 39 deletions

View File

@@ -1,11 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>1.0.0</Version>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
</PropertyGroup>
</Project>

View File

@@ -1,14 +0,0 @@
namespace Pilz.Updating.UpdateInstaller.AddOns
{
public static class UpdateInstallerFunctionTypes
{
/// <summary>
/// The function will be executed when a instance of UpdateInstaller has been created.
/// <para/><b>Parameter:</b><br/>
/// <see cref="T:Pilz.Updating.UpdateInstaller.Lib.UpdateInstaller"/>
/// <para/><b>Result type:</b><br/>
/// <see cref="void"/>
/// </summary>
public const string OnInstancingUpdateInstaller = "pilz.updating.updateinstaller.oninstancingupdateinstaller";
}
}

View File

@@ -20,7 +20,7 @@ namespace Pilz.Updating.UpdateInstaller
} }
} }
public static void LoadAddons(bool isAfterCopyFiles, string folderPath) public static void LoadAddons(Lib.UpdateInstaller installer)
{ {
var pluginsPath = Path.Combine(MyAppPath, "AddOns"); var pluginsPath = Path.Combine(MyAppPath, "AddOns");
if (Directory.Exists(pluginsPath)) if (Directory.Exists(pluginsPath))
@@ -29,7 +29,7 @@ namespace Pilz.Updating.UpdateInstaller
{ {
var pluginPath = Path.Combine(subdir, Path.GetFileName(subdir) + ".dll"); var pluginPath = Path.Combine(subdir, Path.GetFileName(subdir) + ".dll");
if (File.Exists(pluginPath)) if (File.Exists(pluginPath))
PluginManager.Instance.LoadPlugin(pluginPath); PluginManager.Instance.LoadPlugin(pluginPath, installer);
} }
} }
} }

View File

@@ -7,8 +7,6 @@ using System.Windows.Forms;
using Telerik.WinControls; using Telerik.WinControls;
using Telerik.WinControls.Themes; using Telerik.WinControls.Themes;
using Pilz.Updating.UpdateInstaller.Lib; using Pilz.Updating.UpdateInstaller.Lib;
using Pilz.Plugins.Advanced;
using Pilz.Updating.UpdateInstaller.AddOns;
namespace Pilz.Updating.UpdateInstaller namespace Pilz.Updating.UpdateInstaller
{ {
@@ -29,7 +27,7 @@ namespace Pilz.Updating.UpdateInstaller
{ {
// Load config // Load config
installer = new Lib.UpdateInstaller(UpdateInstallerConfig.Parse(args[0])); installer = new Lib.UpdateInstaller(UpdateInstallerConfig.Parse(args[0]));
PluginFunctionController.Instance.ExecuteAll(UpdateInstallerFunctionTypes.OnInstancingUpdateInstaller); General.LoadAddons(installer);
// Init Form // Init Form
InitializeComponent(); InitializeComponent();

View File

@@ -49,7 +49,6 @@
<PackageReference Include="Microsoft.VisualBasic" Version="10.3.0" /> <PackageReference Include="Microsoft.VisualBasic" Version="10.3.0" />
<PackageReference Include="Pilz.IO" Version="2.0.0" /> <PackageReference Include="Pilz.IO" Version="2.0.0" />
<PackageReference Include="Pilz.Plugins" Version="2.0.0" /> <PackageReference Include="Pilz.Plugins" Version="2.0.0" />
<PackageReference Include="Pilz.Plugins.Advanced" Version="2.0.0" />
<PackageReference Include="System.IO.Compression" Version="4.3.0" /> <PackageReference Include="System.IO.Compression" Version="4.3.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" /> <PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="System.Net.Http" Version="4.3.4" /> <PackageReference Include="System.Net.Http" Version="4.3.4" />
@@ -148,7 +147,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Pilz.Updating.Administration\Pilz.Updating.Administration.csproj" /> <ProjectReference Include="..\Pilz.Updating.Administration\Pilz.Updating.Administration.csproj" />
<ProjectReference Include="..\Pilz.Updating.UpdateInstaller.AddOns\Pilz.Updating.UpdateInstaller.AddOns.csproj" />
<ProjectReference Include="..\Pilz.Updating.UpdateInstaller.Lib\Pilz.Updating.UpdateInstaller.Lib.csproj" /> <ProjectReference Include="..\Pilz.Updating.UpdateInstaller.Lib\Pilz.Updating.UpdateInstaller.Lib.csproj" />
<ProjectReference Include="..\Pilz.Updating\Pilz.Updating.csproj" /> <ProjectReference Include="..\Pilz.Updating\Pilz.Updating.csproj" />
</ItemGroup> </ItemGroup>

View File

@@ -17,9 +17,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pilz.Updating.Client.GUI",
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pilz.Updating", "Pilz.Updating\Pilz.Updating.csproj", "{CFC81C75-299C-4DE4-9F19-8E061972E271}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pilz.Updating", "Pilz.Updating\Pilz.Updating.csproj", "{CFC81C75-299C-4DE4-9F19-8E061972E271}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pilz.Updating.UpdateInstaller.Lib", "Pilz.Updating.UpdateInstaller.Lib\Pilz.Updating.UpdateInstaller.Lib.csproj", "{F05AAEA2-386F-4307-AE5E-6831F4EA2B66}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pilz.Updating.UpdateInstaller.Lib", "Pilz.Updating.UpdateInstaller.Lib\Pilz.Updating.UpdateInstaller.Lib.csproj", "{F05AAEA2-386F-4307-AE5E-6831F4EA2B66}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pilz.Updating.UpdateInstaller.AddOns", "Pilz.Updating.UpdateInstaller.AddOns\Pilz.Updating.UpdateInstaller.AddOns.csproj", "{B44AB62C-B179-45B8-B7E6-C822F432CC20}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -59,10 +57,6 @@ Global
{F05AAEA2-386F-4307-AE5E-6831F4EA2B66}.Debug|Any CPU.Build.0 = Debug|Any CPU {F05AAEA2-386F-4307-AE5E-6831F4EA2B66}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F05AAEA2-386F-4307-AE5E-6831F4EA2B66}.Release|Any CPU.ActiveCfg = Release|Any CPU {F05AAEA2-386F-4307-AE5E-6831F4EA2B66}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F05AAEA2-386F-4307-AE5E-6831F4EA2B66}.Release|Any CPU.Build.0 = Release|Any CPU {F05AAEA2-386F-4307-AE5E-6831F4EA2B66}.Release|Any CPU.Build.0 = Release|Any CPU
{B44AB62C-B179-45B8-B7E6-C822F432CC20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B44AB62C-B179-45B8-B7E6-C822F432CC20}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B44AB62C-B179-45B8-B7E6-C822F432CC20}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B44AB62C-B179-45B8-B7E6-C822F432CC20}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE