Update build step and check for pre 7.2 shps.

This commit is contained in:
Ottermandias 2025-03-28 15:52:40 +01:00
parent 1a1d1c1840
commit 23ba77c107
3 changed files with 12 additions and 15 deletions

@ -1 +1 @@
Subproject commit 1158cf404a16979d0b7e12f7bbcbbc651da16add
Subproject commit 859215989da41a4ccb59a5ce390223570a69c94e

View file

@ -56,8 +56,8 @@ public sealed class ShpkPathPreProcessor(ResourceManagerService resourceManager,
using var file = MmioMemoryManager.CreateFromFile(path, access: MemoryMappedFileAccess.Read);
var bytes = file.GetSpan();
return ShpkFile.FastIsLegacy(bytes)
? SanityCheckResult.Legacy
return ShpkFile.FastIsObsolete(bytes)
? SanityCheckResult.Obsolete
: SanityCheckResult.Success;
}
catch (FileNotFoundException)
@ -75,7 +75,7 @@ public sealed class ShpkPathPreProcessor(ResourceManagerService resourceManager,
{
SanityCheckResult.IoError => "Cannot read the modded file.",
SanityCheckResult.NotFound => "The modded file does not exist.",
SanityCheckResult.Legacy => "This mod is not compatible with Dawntrail. Get an updated version, if possible, or disable it.",
SanityCheckResult.Obsolete => "This mod is not compatible with Dawntrail post patch 7.2. Get an updated version, if possible, or disable it.",
_ => string.Empty,
};
@ -84,6 +84,6 @@ public sealed class ShpkPathPreProcessor(ResourceManagerService resourceManager,
Success,
IoError,
NotFound,
Legacy,
Obsolete,
}
}

View file

@ -23,6 +23,13 @@
<Content Include="tsmLogo.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="lib\DirectXTexC.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>DirectXTexC.dll</TargetPath>
</None>
<None Include="Penumbra.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
@ -64,16 +71,6 @@
<ProjectReference Include="..\Penumbra.String\Penumbra.String.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="lib\DirectXTexC.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>DirectXTexC.dll</TargetPath>
</None>
<None Update="Penumbra.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Target Name="GetGitHash" BeforeTargets="GetAssemblyVersion" Returns="InformationalVersion">
<Exec Command="git rev-parse --short HEAD" ConsoleToMSBuild="true" StandardOutputImportance="low" ContinueOnError="true">
<Output TaskParameter="ExitCode" PropertyName="GitCommitHashSuccess" />