diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..fbafa822 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "OMOD-Extractor"] + path = OMOD-Extractor + url = https://github.com/erri120/OMOD-Extractor diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f13d0d7a..ef03d10e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,8 +42,9 @@ The installer may have selected other options as well but these are the most imp ### Starting development 1) **Fork and clone the project:** go to the Github repo page, click the fork button, copy the url from the forked repo, navigate to your project folder, open Git Bash or normal command prompt and type `git clone url name` and replace url with the copied url and name with the folder name -2) **Open Wabbajack.sln** in Visual Studio 2019 -3) **Download NuGet Packages** by selecting the solution and *Right Click*->*Restore NuGet Packages* +2) **Initialize the submodules** using `git submodule init` and `git submodule update` +3) **Open Wabbajack.sln** in Visual Studio 2019 +4) **Download NuGet Packages** by selecting the solution and *Right Click*->*Restore NuGet Packages* It may take a while for Visual Studio to download all packages and update all References so be patience. Once all packages are downloaded go and try building Wabbajack. If the build is successful than good job, if not head over to the *#wabbajack-development* channel on the discord and talk about your build error. diff --git a/OMOD-Extractor b/OMOD-Extractor new file mode 160000 index 00000000..a3eb3584 --- /dev/null +++ b/OMOD-Extractor @@ -0,0 +1 @@ +Subproject commit a3eb3584527e4363a02607d38e91c646316b1cea diff --git a/VirtualFileSystem.Test/VirtualFileSystem.Test.csproj b/VirtualFileSystem.Test/VirtualFileSystem.Test.csproj index 218b1aae..504b9a88 100644 --- a/VirtualFileSystem.Test/VirtualFileSystem.Test.csproj +++ b/VirtualFileSystem.Test/VirtualFileSystem.Test.csproj @@ -32,6 +32,26 @@ prompt 4 + + true + bin\x64\Debug\ + DEBUG;TRACE + full + x64 + prompt + MinimumRecommendedRules.ruleset + true + + + bin\x64\Release\ + TRACE + true + pdbonly + x64 + prompt + MinimumRecommendedRules.ruleset + true + diff --git a/VirtualFileSystem/VirtualFileSystem.csproj b/VirtualFileSystem/VirtualFileSystem.csproj index 42ceba52..957155e6 100644 --- a/VirtualFileSystem/VirtualFileSystem.csproj +++ b/VirtualFileSystem/VirtualFileSystem.csproj @@ -31,6 +31,24 @@ prompt 4 + + true + bin\x64\Debug\ + DEBUG;TRACE + full + x64 + prompt + MinimumRecommendedRules.ruleset + + + bin\x64\Release\ + TRACE + true + pdbonly + x64 + prompt + MinimumRecommendedRules.ruleset + ..\packages\AlphaFS.2.2.6\lib\net452\AlphaFS.dll diff --git a/Wabbajack.Common/Consts.cs b/Wabbajack.Common/Consts.cs index e2931bb9..90c99800 100644 --- a/Wabbajack.Common/Consts.cs +++ b/Wabbajack.Common/Consts.cs @@ -13,7 +13,8 @@ namespace Wabbajack.Common public static string BSACreationDir = "TEMP_BSA_FILES"; public static string MegaPrefix = "https://mega.nz/#!"; - public static HashSet SupportedArchives = new HashSet {".zip", ".rar", ".7z", ".7zip", ".fomod"}; + public static HashSet SupportedArchives = new HashSet {".zip", ".rar", ".7z", ".7zip", ".fomod", ".omod"}; + public static HashSet SupportedBSAs = new HashSet {".bsa"}; public static HashSet ConfigFileExtensions = new HashSet {".json", ".ini", ".yml"}; diff --git a/Wabbajack.Common/FileExtractor.cs b/Wabbajack.Common/FileExtractor.cs index 17beb91a..3e0b07cf 100644 --- a/Wabbajack.Common/FileExtractor.cs +++ b/Wabbajack.Common/FileExtractor.cs @@ -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 diff --git a/Wabbajack.Common/Wabbajack.Common.csproj b/Wabbajack.Common/Wabbajack.Common.csproj index d69725c8..a794bb72 100644 --- a/Wabbajack.Common/Wabbajack.Common.csproj +++ b/Wabbajack.Common/Wabbajack.Common.csproj @@ -107,6 +107,10 @@ {ff5d892f-8ff4-44fc-8f7f-cd58f307ad1b} Compression.BSA + + {eb003d18-dffb-49c7-b054-fb375345ae26} + OMODExtractorDLL + diff --git a/Wabbajack.sln b/Wabbajack.sln index 307f4027..6b83520a 100644 --- a/Wabbajack.sln +++ b/Wabbajack.sln @@ -29,6 +29,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wabbajack.WebAutomation.Tes EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wabbajack.Test", "Wabbajack.Test\Wabbajack.Test.csproj", "{A47FFF32-782B-4D9F-8704-C98FB32FA8CC}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OMODExtractorDLL", "OMOD-Extractor\OMODExtractorDLL\OMODExtractorDLL.csproj", "{EB003D18-DFFB-49C7-B054-FB375345AE26}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug (no commandargs)|Any CPU = Debug (no commandargs)|Any CPU @@ -89,8 +91,8 @@ Global {BA2CFEA1-072B-42D6-822A-8C6D0E3AE5D9}.Release|x64.Build.0 = Release|x64 {5128B489-BC28-4F66-9F0B-B4565AF36CBC}.Debug (no commandargs)|Any CPU.ActiveCfg = Debug|Any CPU {5128B489-BC28-4F66-9F0B-B4565AF36CBC}.Debug (no commandargs)|Any CPU.Build.0 = Debug|Any CPU - {5128B489-BC28-4F66-9F0B-B4565AF36CBC}.Debug (no commandargs)|x64.ActiveCfg = Debug|Any CPU - {5128B489-BC28-4F66-9F0B-B4565AF36CBC}.Debug (no commandargs)|x64.Build.0 = Debug|Any CPU + {5128B489-BC28-4F66-9F0B-B4565AF36CBC}.Debug (no commandargs)|x64.ActiveCfg = Debug|x64 + {5128B489-BC28-4F66-9F0B-B4565AF36CBC}.Debug (no commandargs)|x64.Build.0 = Debug|x64 {5128B489-BC28-4F66-9F0B-B4565AF36CBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5128B489-BC28-4F66-9F0B-B4565AF36CBC}.Debug|Any CPU.Build.0 = Debug|Any CPU {5128B489-BC28-4F66-9F0B-B4565AF36CBC}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -101,8 +103,8 @@ Global {5128B489-BC28-4F66-9F0B-B4565AF36CBC}.Release|x64.Build.0 = Release|Any CPU {A2913DFE-18FF-468B-A6C1-55F7C0CC0CE8}.Debug (no commandargs)|Any CPU.ActiveCfg = Debug|Any CPU {A2913DFE-18FF-468B-A6C1-55F7C0CC0CE8}.Debug (no commandargs)|Any CPU.Build.0 = Debug|Any CPU - {A2913DFE-18FF-468B-A6C1-55F7C0CC0CE8}.Debug (no commandargs)|x64.ActiveCfg = Debug|Any CPU - {A2913DFE-18FF-468B-A6C1-55F7C0CC0CE8}.Debug (no commandargs)|x64.Build.0 = Debug|Any CPU + {A2913DFE-18FF-468B-A6C1-55F7C0CC0CE8}.Debug (no commandargs)|x64.ActiveCfg = Debug|x64 + {A2913DFE-18FF-468B-A6C1-55F7C0CC0CE8}.Debug (no commandargs)|x64.Build.0 = Debug|x64 {A2913DFE-18FF-468B-A6C1-55F7C0CC0CE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A2913DFE-18FF-468B-A6C1-55F7C0CC0CE8}.Debug|Any CPU.Build.0 = Debug|Any CPU {A2913DFE-18FF-468B-A6C1-55F7C0CC0CE8}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -147,6 +149,18 @@ Global {A47FFF32-782B-4D9F-8704-C98FB32FA8CC}.Release|Any CPU.Build.0 = Release|Any CPU {A47FFF32-782B-4D9F-8704-C98FB32FA8CC}.Release|x64.ActiveCfg = Release|Any CPU {A47FFF32-782B-4D9F-8704-C98FB32FA8CC}.Release|x64.Build.0 = Release|Any CPU + {EB003D18-DFFB-49C7-B054-FB375345AE26}.Debug (no commandargs)|Any CPU.ActiveCfg = Debug|Any CPU + {EB003D18-DFFB-49C7-B054-FB375345AE26}.Debug (no commandargs)|Any CPU.Build.0 = Debug|Any CPU + {EB003D18-DFFB-49C7-B054-FB375345AE26}.Debug (no commandargs)|x64.ActiveCfg = Debug|x64 + {EB003D18-DFFB-49C7-B054-FB375345AE26}.Debug (no commandargs)|x64.Build.0 = Debug|x64 + {EB003D18-DFFB-49C7-B054-FB375345AE26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EB003D18-DFFB-49C7-B054-FB375345AE26}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EB003D18-DFFB-49C7-B054-FB375345AE26}.Debug|x64.ActiveCfg = Debug|Any CPU + {EB003D18-DFFB-49C7-B054-FB375345AE26}.Debug|x64.Build.0 = Debug|Any CPU + {EB003D18-DFFB-49C7-B054-FB375345AE26}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EB003D18-DFFB-49C7-B054-FB375345AE26}.Release|Any CPU.Build.0 = Release|Any CPU + {EB003D18-DFFB-49C7-B054-FB375345AE26}.Release|x64.ActiveCfg = Release|Any CPU + {EB003D18-DFFB-49C7-B054-FB375345AE26}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE