Added omod extraction via dll

This commit is contained in:
erri120 2019-09-24 18:03:50 +02:00 committed by Timothy Baldridge
parent a266e79655
commit e8b0c3b29f

View File

@ -38,6 +38,8 @@ namespace Wabbajack.Common
ExtractAllWithBSA(source, dest);
else if (source.EndsWith(".exe"))
ExtractAllWithInno(source, dest);
else if (source.EndsWith(".omod"))
ExtractAllWithOMOD(source, dest);
else
ExtractAllWith7Zip(source, dest);
}
@ -48,6 +50,17 @@ namespace Wabbajack.Common
}
}
private static void ExtractAllWithOMOD(string source, string dest)
{
Utils.Log($"Extracting {Path.GetFileName(source)}");
OMODExtractorDLL.OMOD omod = new OMODExtractorDLL.OMOD(source, dest+"//", "temp");
omod.SaveConfig();
omod.SaveFile("script");
omod.SaveFile("readme");
omod.ExtractData();
omod.ExtractPlugins();
}
private static void ExtractAllWithBSA(string source, string dest)
{
try