Skip to content

Commit

Permalink
revert info-psb extract file path change since 3.8 #138
Browse files Browse the repository at this point in the history
  • Loading branch information
UlyssesWu committed Nov 20, 2024
1 parent f6d438d commit 1984648
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
4 changes: 2 additions & 2 deletions FreeMote.PsBuild/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
[assembly: InternalsVisibleTo("FreeMote.Editor")]

// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("4.0.0.0")]
[assembly: AssemblyFileVersion("4.0.0.0")]
[assembly: AssemblyVersion("4.0.1.0")]
[assembly: AssemblyFileVersion("4.0.1.0")]
4 changes: 4 additions & 0 deletions FreeMote.PsBuild/PsbCompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,10 @@ void AddFileInfo(PsbDictionary fileInfoDic, string relativePathWithoutSuffix, lo
var content = LoadPsbAndContextFromJsonFile(kv.Value.Path);
var stream = content.Psb.ToStream();
var shellType = kv.Key.DefaultShellType(); //MARK: use shellType in filename, or use suffix in info?
if (content.Context.TryGetValue(Context_PsbShellType, out var contextShellType))
{
shellType = contextShellType as string;
}
if (!string.IsNullOrEmpty(shellType))
{
var packedStream = itemContext.PackToShell(stream, shellType); //disposed later
Expand Down
13 changes: 7 additions & 6 deletions FreeMote.PsBuild/PsbDecompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -627,9 +627,10 @@ public static void ExtractArchive(string filePath, string key, Dictionary<string
if (mms != null)
{
//should not change file name, in order to keep repack correct :(
//relativePath = possibleFileName.Contains("/") ? possibleFileName :
// pair.Key.Contains("/") ? Path.Combine(Path.GetDirectoryName(pair.Key), possibleFileName) :
// possibleFileName;
//↑ reverted. If I recalled the reason, I should keep a more detailed note.
relativePath = possibleFileName.Contains("/") ? possibleFileName :
pair.Key.Contains("/") ? Path.Combine(Path.GetDirectoryName(pair.Key), possibleFileName) :
possibleFileName;
finalContext = bodyContext;
if (possibleFileName != possibleFileNames[0])
{
Expand Down Expand Up @@ -754,9 +755,9 @@ public static void ExtractArchive(string filePath, string key, Dictionary<string

if (mms != null)
{
//relativePath = possibleFileName.Contains("/") ? possibleFileName :
// pair.Key.Contains("/") ? Path.Combine(Path.GetDirectoryName(pair.Key), possibleFileName) :
// possibleFileName;
relativePath = possibleFileName.Contains("/") ? possibleFileName :
pair.Key.Contains("/") ? Path.Combine(Path.GetDirectoryName(pair.Key), possibleFileName) :
possibleFileName;
finalContext = bodyContext;
if (possibleFileName != possibleFileNames[0])
{
Expand Down
4 changes: 2 additions & 2 deletions FreeMote.Tools.PsBuild/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@

[assembly: Guid("d877dbdb-41d7-4c6f-9a46-957cecdaefa8")]

[assembly: AssemblyVersion("4.0.0.0")]
[assembly: AssemblyFileVersion("4.0.0.0")]
[assembly: AssemblyVersion("4.0.1.0")]
[assembly: AssemblyFileVersion("4.0.1.0")]
4 changes: 2 additions & 2 deletions FreeMote.Tools.PsbDecompile/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@

[assembly: Guid("943fe440-32bb-4caf-a1da-5f38de7f9b92")]

[assembly: AssemblyVersion("4.0.0.0")]
[assembly: AssemblyFileVersion("4.0.0.0")]
[assembly: AssemblyVersion("4.0.1.0")]
[assembly: AssemblyFileVersion("4.0.1.0")]

0 comments on commit 1984648

Please sign in to comment.