Skip to content

Commit

Permalink
v2.14.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ividyon committed Aug 2, 2024
1 parent 51bdb8c commit ecf9da5
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<Authors>ividyon</Authors>
<Company>ividyon</Company>
<Version>2.14.0.2</Version>
<Version>2.14.0.3</Version>
<PathMap>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)'))=./</PathMap>
</PropertyGroup>
</Project>
6 changes: 1 addition & 5 deletions NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
* Refined the Preprocess process further, eliminating duplicate work to speed it up.
* Simplified the "is" check for recursive preprocess file type checks, where possible.
* If the selected location for "Process to..." is in a subfolder of the original location, relative paths will now be used.
* Fixed an issue where recursive repacking would not correctly preprocess the files.
* Fixed an issue where recursively unpacked files would still write "sourcePath" in their XML manifest when using the Location option.
* Further bugfixes for the preprocess process for recursive repacking.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ WitchyBND is built using the following licensed works:
# Changelog
## WitchyBND

### 2.14.0.3

* Further bugfixes for the preprocess process for recursive repacking.

### 2.14.0.2

* Refined the Preprocess process further, eliminating duplicate work to speed it up.
Expand Down
1 change: 0 additions & 1 deletion WitchyBND/Parsers/Binder/Special/WANIBND4.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ public override void Unpack(string srcPath, ISoulsFile? file, bool recursive)

if (Version > 0) xml.SetAttributeValue(VersionAttributeName, Version.ToString());


if (!string.IsNullOrEmpty(root))
xml.Add(new XElement("root", root));

Expand Down
2 changes: 1 addition & 1 deletion WitchyBND/Parsers/Binder/WPARAMBND4.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public override bool Preprocess(string srcPath, bool recursive, ref Dictionary<s
{
ISoulsFile? file = null;
if (gameService.KnownGamePathsForParams.Any(p => srcPath.StartsWith(p.Key))) return false;
if (!(Exists(srcPath) && IsSimpleFirst(srcPath, null, out file)) && !(ExistsUnpacked(srcPath) && IsUnpacked(srcPath))) return false;
if (!((recursive || Exists(srcPath)) && IsSimpleFirst(srcPath, null, out file)) && !((recursive || ExistsUnpacked(srcPath)) && IsUnpacked(srcPath))) return false;

gameService.UnpackParamdex();
if (file != null)
Expand Down
2 changes: 1 addition & 1 deletion WitchyBND/Parsers/Folder/WMSB/WMSBE.Folder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public override bool Preprocess(string srcPath, bool recursive, ref Dictionary<s
// Preprocess purely to call WarnAboutMSBs

ISoulsFile? file = null;
if (!(Exists(srcPath) && IsSimpleFirst(srcPath, null, out file)) && !(ExistsUnpacked(srcPath) && IsUnpacked(srcPath))) return false;
if (!((recursive || Exists(srcPath)) && IsSimpleFirst(srcPath, null, out file)) && !((recursive || ExistsUnpacked(srcPath)) && IsUnpacked(srcPath))) return false;
if (file != null)
files.TryAdd(srcPath, (this, file));

Expand Down
4 changes: 2 additions & 2 deletions WitchyBND/Parsers/Folder/WTAE/WTAE.Folder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public partial class WTAEFolder : WFolderParser
public override bool Preprocess(string srcPath, bool recursive, ref Dictionary<string, (WFileParser, ISoulsFile)> files)
{
ISoulsFile? file = null;
if (!(ExistsUnpacked(srcPath) && IsUnpacked(srcPath)) &&
!(Exists(srcPath) && IsSimpleFirst(srcPath, null, out file)))
if (!((recursive || ExistsUnpacked(srcPath)) && IsUnpacked(srcPath)) &&
!((recursive || Exists(srcPath)) && IsSimpleFirst(srcPath, null, out file)))
{
return false;
}
Expand Down
6 changes: 3 additions & 3 deletions WitchyBND/Parsers/WBinderParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public override bool Preprocess(string srcPath, bool recursive,
{
ISoulsFile? file = null;
bool unpacked = ExistsUnpacked(srcPath) && IsUnpacked(srcPath);
bool packed = !unpacked && Exists(srcPath) && Is(srcPath, null, out file);
bool packed = !unpacked && Exists(srcPath) && IsSimpleFirst(srcPath, null, out file);
if (file != null)
files.TryAdd(srcPath, (this, file));
if (!unpacked && !packed) return false;
Expand All @@ -39,7 +39,7 @@ public override bool Preprocess(string srcPath, bool recursive,
$@"{destDir}\{Path.GetDirectoryName(path)}\{Path.GetFileNameWithoutExtension(path)}{Path.GetExtension(path)}";
foreach (var parser in parsers)
{
bool toBreak = parser.Preprocess(estFilePath, recursive, ref files);
bool toBreak = parser.Preprocess(estFilePath, true, ref files);
if (toBreak)
break;
}
Expand All @@ -51,7 +51,7 @@ public override bool Preprocess(string srcPath, bool recursive,
{
foreach (var parser in parsers)
{
bool toBreak = parser.Preprocess(insidePath, recursive, ref files);
bool toBreak = parser.Preprocess(insidePath, true, ref files);
if (toBreak)
break;
}
Expand Down
4 changes: 2 additions & 2 deletions WitchyBND/Parsers/XML/WTAE/WTAE.File.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public partial class WTAEFile : WXMLParser
public override bool Preprocess(string srcPath, bool recursive, ref Dictionary<string, (WFileParser, ISoulsFile)> files)
{
ISoulsFile? file = null;
if (!(ExistsUnpacked(srcPath) && IsUnpacked(srcPath)) &&
!(Exists(srcPath) && IsSimpleFirst(srcPath, null, out file)))
if (!((recursive || ExistsUnpacked(srcPath)) && IsUnpacked(srcPath)) &&
!((recursive || Exists(srcPath)) && IsSimpleFirst(srcPath, null, out file)))
{
return false;
}
Expand Down
8 changes: 4 additions & 4 deletions WitchyBND/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@
"dependencies": {
"BouncyCastle.Cryptography": "[2.4.0, )",
"NativeFileDialogSharp": "[0.6.0-alpha, )",
"SoulsFormats": "[2.14.0.1, )"
"SoulsFormats": "[2.14.0.3, )"
}
},
"studioutils": {
Expand All @@ -320,8 +320,8 @@
"witchyformats": {
"type": "Project",
"dependencies": {
"SoulsFormats": "[2.14.0.1, )",
"StudioUtils": "[2.14.0.1, )"
"SoulsFormats": "[2.14.0.3, )",
"StudioUtils": "[2.14.0.3, )"
}
},
"witchylib": {
Expand All @@ -331,7 +331,7 @@
"Microsoft.Extensions.FileSystemGlobbing": "[8.0.0-preview.2.23128.3, )",
"Newtonsoft.Json": "[13.0.3, )",
"PromptPlus": "[4.2.0, )",
"WitchyFormats": "[2.14.0.1, )"
"WitchyFormats": "[2.14.0.3, )"
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions WitchyLib/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@
"witchyformats": {
"type": "Project",
"dependencies": {
"SoulsFormats": "[2.14.0.1, )",
"StudioUtils": "[2.14.0.1, )"
"SoulsFormats": "[2.14.0.3, )",
"StudioUtils": "[2.14.0.3, )"
}
}
}
Expand Down

0 comments on commit ecf9da5

Please sign in to comment.