feat(evb): 解凍完了マーカーに基づくEVBゲーム検出の維持機能を追加

- 元exeが .glbak に退避された解凍後でもEVBゲームとして継続認識できるよう IsExtracted 判定を追加
- 解凍完了マーカー(_evb_extracted)の存在を検証し、後続の起動・アイコン解決の破損を防止
This commit is contained in:
armonica committed 2026-10-08 14:12:07 +09:00
1 parent 05e7bdb3c0
commit 3550e20891
2 files changed
+46 -4

No files matched your search

+29
View File
@@ -92,6 +92,35 @@ namespace GameLauncher.Engines.Evb
}
}
/// <summary>
/// Returns true when the game directory already holds a completed EVB extraction.
///
/// Once a game is unpacked, the original packed exe is renamed to "*.glbak" and the
/// unpacked files (including the real exe) live inside the game-local "_evb_extracted"
/// folder. At that point <see cref="FindEvbPackedExecutable"/> can no longer find a
/// top-level "*.exe", so this extra signal is required to keep recognizing the folder
/// as an EVB game (otherwise launch and icon resolution break after unpacking).
///
/// Only a completed extraction (completion marker present) is accepted, so a normal
/// unpacked game without any EVB artifacts is never misclassified.
/// </summary>
public static bool IsExtracted(string gameDirectory)
{
if (string.IsNullOrWhiteSpace(gameDirectory) || !Directory.Exists(gameDirectory))
{
return false;
}
try
{
return EvbUnpackService.IsExtractionComplete(gameDirectory, out _);
}
catch
{
return false;
}
}
/// <summary>
/// Parses the PE section table and checks for the EVB packer's section names.
/// </summary>