update nugets & cleanup

This commit is contained in:
2023-11-21 08:55:48 +01:00
parent c9e9239477
commit 5d031f8ead
45 changed files with 265 additions and 2002 deletions

View File

@@ -1,23 +1,37 @@
using global::System.IO;
using global::System.Reflection;
using System.IO;
using System.Reflection;
using Pilz.Plugins;
using System.Configuration;
using Z.Reflection.Extensions;
namespace Pilz.Updating.UpdateInstaller
{
internal static class General
{
private static string p = string.Empty;
private static string p = null;
public static string MyAppPath
{
get
{
if (string.IsNullOrEmpty(p))
{
p = Path.GetDirectoryName(IO.Extensions.GetExecutablePath());
}
return p;
}
}
public static void LoadAddons(bool isAfterCopyFiles, string folderPath)
{
var pluginsPath = Path.Combine(MyAppPath, "AddOns");
if (Directory.Exists(pluginsPath))
{
foreach (var subdir in Directory.GetDirectories(pluginsPath, string.Empty, SearchOption.TopDirectoryOnly))
{
var pluginPath = Path.Combine(subdir, Path.GetFileName(subdir) + ".dll");
if (File.Exists(pluginPath))
PluginManager.Instance.LoadPlugin(pluginPath);
}
}
}
}
}