mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fixed some stuff
This commit is contained in:
parent
45ba7d4bce
commit
8d650fcbd9
@ -100,15 +100,18 @@ namespace Wabbajack.Lib
|
|||||||
IEnumerable<RawSourceFile> game_files = Directory.EnumerateFiles(GamePath, "*", SearchOption.AllDirectories)
|
IEnumerable<RawSourceFile> game_files = Directory.EnumerateFiles(GamePath, "*", SearchOption.AllDirectories)
|
||||||
.Where(p => p.FileExists())
|
.Where(p => p.FileExists())
|
||||||
.Select(p => new RawSourceFile(VFS.Lookup(p))
|
.Select(p => new RawSourceFile(VFS.Lookup(p))
|
||||||
{ Path = Alphaleonis.Win32.Filesystem.Path.Combine(Consts.GameFolderFilesDir, p.RelativeTo(GamePath)) });
|
{ Path = Path.Combine(Consts.GameFolderFilesDir, p.RelativeTo(GamePath)) });
|
||||||
|
|
||||||
Info("Indexing Archives");
|
Info("Indexing Archives");
|
||||||
IndexedArchives = Directory.EnumerateFiles(DownloadsFolder)
|
IndexedArchives = Directory.EnumerateFiles(DownloadsFolder)
|
||||||
|
//.Where(f => File.Exists(f+".meta"))
|
||||||
.Where(File.Exists)
|
.Where(File.Exists)
|
||||||
.Select(f => new IndexedArchive
|
.Select(f => new IndexedArchive
|
||||||
{
|
{
|
||||||
File = VFS.Lookup(f),
|
File = VFS.Lookup(f),
|
||||||
Name = Path.GetFileName(f)
|
Name = Path.GetFileName(f),
|
||||||
|
//IniData = (f+"meta").LoadIniFile(),
|
||||||
|
//Meta = File.ReadAllText(f+".meta")
|
||||||
})
|
})
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
@ -131,7 +134,7 @@ namespace Wabbajack.Lib
|
|||||||
.Where(fs => fs.Count() > 1)
|
.Where(fs => fs.Count() > 1)
|
||||||
.Select(fs =>
|
.Select(fs =>
|
||||||
{
|
{
|
||||||
Utils.Log($"Duplicate files installed to {fs.Key} from : {String.Join(", ", fs.Select(f => f.AbsolutePath))}");
|
Utils.Log($"Duplicate files installed to {fs.Key} from : {string.Join(", ", fs.Select(f => f.AbsolutePath))}");
|
||||||
return fs;
|
return fs;
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
@ -205,7 +208,7 @@ namespace Wabbajack.Lib
|
|||||||
using (var za = new ZipArchive(fs, ZipArchiveMode.Create))
|
using (var za = new ZipArchive(fs, ZipArchiveMode.Create))
|
||||||
{
|
{
|
||||||
Directory.EnumerateFiles(ModListOutputFolder, "*.*")
|
Directory.EnumerateFiles(ModListOutputFolder, "*.*")
|
||||||
.DoProgress("Compressing Modlist",
|
.DoProgress("Compressing ModList",
|
||||||
f =>
|
f =>
|
||||||
{
|
{
|
||||||
var ze = za.CreateEntry(Path.GetFileName(f));
|
var ze = za.CreateEntry(Path.GetFileName(f));
|
||||||
@ -218,7 +221,7 @@ namespace Wabbajack.Lib
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Utils.Log("Removing ModList staging folder");
|
Utils.Log("Removing ModList staging folder");
|
||||||
Directory.Delete(ModListOutputFolder, true);
|
//Directory.Delete(ModListOutputFolder, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void GatherArchives()
|
private void GatherArchives()
|
||||||
@ -289,11 +292,12 @@ namespace Wabbajack.Lib
|
|||||||
//new IncludePropertyFiles(this),
|
//new IncludePropertyFiles(this),
|
||||||
|
|
||||||
new IgnoreGameFiles(this),
|
new IgnoreGameFiles(this),
|
||||||
|
new IncludeRegex(this, @".*\.zip?$"),
|
||||||
new IgnoreStartsWith(this, Path.Combine(Consts.GameFolderFilesDir, "Data")),
|
//new IncludeRegex(this, "*.zip"),
|
||||||
new IgnoreStartsWith(this, Path.Combine(Consts.GameFolderFilesDir, "Papyrus Compiler")),
|
//new IgnoreStartsWith(this, Path.Combine(Consts.GameFolderFilesDir, "Data")),
|
||||||
new IgnoreStartsWith(this, Path.Combine(Consts.GameFolderFilesDir, "Skyrim")),
|
//new IgnoreStartsWith(this, Path.Combine(Consts.GameFolderFilesDir, "Papyrus Compiler")),
|
||||||
new IgnoreRegex(this, Consts.GameFolderFilesDir + "\\\\.*\\.bsa"),
|
//new IgnoreStartsWith(this, Path.Combine(Consts.GameFolderFilesDir, "Skyrim")),
|
||||||
|
//new IgnoreRegex(this, Consts.GameFolderFilesDir + "\\\\.*\\.bsa"),
|
||||||
|
|
||||||
new DirectMatch(this),
|
new DirectMatch(this),
|
||||||
|
|
||||||
|
@ -196,47 +196,71 @@ namespace Wabbajack
|
|||||||
|
|
||||||
private async Task ExecuteBegin()
|
private async Task ExecuteBegin()
|
||||||
{
|
{
|
||||||
Compiler compiler;
|
if (true)
|
||||||
try
|
|
||||||
{
|
{
|
||||||
compiler = new Compiler(this.Mo2Folder)
|
var compiler = new VortexCompiler("darkestdungeon", "S:\\SteamLibrary\\steamapps\\common\\DarkestDungeon");
|
||||||
|
await Task.Run(() =>
|
||||||
{
|
{
|
||||||
MO2Profile = this.MOProfile,
|
UIReady = false;
|
||||||
ModListName = this.ModListName,
|
try
|
||||||
ModListAuthor = this.AuthorText,
|
|
||||||
ModListDescription = this.Description,
|
|
||||||
ModListImage = this.ImagePath.TargetPath,
|
|
||||||
ModListWebsite = this.Website,
|
|
||||||
ModListReadme = this.ReadMeText.TargetPath,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
while (ex.InnerException != null) ex = ex.InnerException;
|
|
||||||
Utils.Log($"Compiler error: {ex.ExceptionToString()}");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
await Task.Run(() =>
|
|
||||||
{
|
|
||||||
Compiling = true;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
compiler.Compile();
|
|
||||||
if (compiler.ModList?.ReportHTML != null)
|
|
||||||
{
|
{
|
||||||
this.HTMLReport = compiler.ModList.ReportHTML;
|
compiler.Compile();
|
||||||
}
|
}
|
||||||
}
|
catch (Exception ex)
|
||||||
catch (Exception ex)
|
{
|
||||||
|
while (ex.InnerException != null) ex = ex.InnerException;
|
||||||
|
this.Log().Warn(ex, "Can't continue");
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
UIReady = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
if (this.Mo2Folder != null)
|
||||||
{
|
{
|
||||||
while (ex.InnerException != null) ex = ex.InnerException;
|
Compiler compiler;
|
||||||
Utils.Log($"Compiler error: {ex.ExceptionToString()}");
|
try {
|
||||||
|
compiler = new Compiler(this.Mo2Folder)
|
||||||
|
{
|
||||||
|
MO2Profile = this.MOProfile,
|
||||||
|
ModListName = this.ModListName,
|
||||||
|
ModListAuthor = this.AuthorText,
|
||||||
|
ModListDescription = this.Description,
|
||||||
|
ModListImage = this.ImagePath.TargetPath,
|
||||||
|
ModListWebsite = this.Website,
|
||||||
|
ModListReadme = this.ReadMeText.TargetPath,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
while (ex.InnerException != null) ex = ex.InnerException;
|
||||||
|
Utils.Log($"Compiler error: {ex.ExceptionToString()}");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await Task.Run(() =>
|
||||||
|
{
|
||||||
|
Compiling = true;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
compiler.Compile();
|
||||||
|
if (compiler.ModList?.ReportHTML != null)
|
||||||
|
{
|
||||||
|
this.HTMLReport = compiler.ModList.ReportHTML;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
while (ex.InnerException != null) ex = ex.InnerException;
|
||||||
|
Utils.Log($"Compiler error: {ex.ExceptionToString()}");
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
Compiling = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
finally
|
}
|
||||||
{
|
|
||||||
Compiling = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user