This commit is contained in:
Stephan Maier
2024-08-27 08:10:27 +02:00
parent eb5c2fa502
commit 647f938eee
617 changed files with 73086 additions and 7137 deletions

View File

@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace FSI.BT.Tools.Global.Utilities
{
internal static class ExtractEmbeddedZip
{
internal static void Extract(string zipName, string destPath)
{
System.IO.Directory.CreateDirectory(destPath); // Erstellt alle fehlenden Verzeichnisse
using Stream _pluginZipResourceStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(zipName);
using ZipArchive zip = new(_pluginZipResourceStream);
zip.ExtractToDirectory(destPath, true);
Vars.Log.Info("Externes Tool \"{0}\" wurde in das Verzeichnis \"{1}\" entpackt", zipName, destPath);
}
}
}