- Add Enigma Virtual Box (EVB) engine support: detection, badge, unpack/restore UI - Bundle evbunpack.exe under Engines/Evb/Tools/evbunpack (Apache-2.0, with LICENSE/README) - Copy Engines\\**\\Tools\\** to build output via csproj (publish already covered by publish.ps1) - Throttle evbunpack progress reporting and shorten timeout to stop UI freeze - Rename original packed exe to .glbak and write a completion marker; make Restore reverse it - Launch the unpacked exe from _evb_extracted so script mods apply - Replace EVB MessageBox dialogs with readable log summaries - Remove obsolete boxed/7zip extraction code (NwjsPackageUnpacker, TkoolPackagedExtractionService)
52 lines
2.1 KiB
C#
52 lines
2.1 KiB
C#
using System;
|
|
using GameLauncher.Engines.Common;
|
|
using GameLauncher.Models;
|
|
|
|
namespace GameLauncher.Engines.Evb
|
|
{
|
|
/// <summary>
|
|
/// Engine module for Enigma Virtual Box (EVB) packed applications.
|
|
///
|
|
/// EVB is a generic packer: it can wrap a game built on any engine (RGSS, NW.js,
|
|
/// Wolf, Unity, ...). This module therefore acts as a *pre-stage* — it detects an
|
|
/// EVB-packed executable, unpacks it via the bundled evbunpack tool, and then lets
|
|
/// the caller re-detect the underlying engine from the unpacked content.
|
|
///
|
|
/// Per-game hacks never live here; they belong under
|
|
/// `Engines/Evb/Games/<GameName>/` and must not affect other games.
|
|
/// </summary>
|
|
public sealed class EvbEngineModule : IEngineModule
|
|
{
|
|
/// <inheritdoc />
|
|
public string EngineName => EngineDetectionHelper.EngineEvb;
|
|
|
|
/// <inheritdoc />
|
|
public bool Detect(string gameDirectory) => EvbDetector.IsEvbGame(gameDirectory);
|
|
|
|
/// <summary>
|
|
/// EVB is a packaging layer, not a game engine, so it has no script mod of its own.
|
|
/// Mods are applied by the underlying engine after unpacking.
|
|
/// </summary>
|
|
public bool ApplyMod(string gameDirectory, ModPluginDefinition plugin) => false;
|
|
|
|
/// <summary>EVB has no standalone mod state; nothing is ever "applied".</summary>
|
|
public bool IsModApplied(string gameDirectory) => false;
|
|
|
|
/// <inheritdoc />
|
|
public string ResolveToolPath(string toolFileName)
|
|
=> AppPathHelperBridge.Resolve(EngineName, toolFileName);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Thin indirection so that <see cref="EvbEngineModule"/> can resolve engine tools
|
|
/// without taking a hard dependency on the concrete helper type in this file.
|
|
/// </summary>
|
|
internal static class AppPathHelperBridge
|
|
{
|
|
public static string Resolve(string engineName, string toolFileName)
|
|
=> Helpers.AppPathHelper.ResolveEngineTool(engineName, toolFileName)
|
|
?? throw new InvalidOperationException(
|
|
$"External tool '{toolFileName}' for engine '{engineName}' was not found.");
|
|
}
|
|
}
|