2024-08-09 21:39:39 +01:00
using CliFx ;
using CliFx.Attributes ;
using CliFx.Infrastructure ;
using ReCodeIt.Utils ;
using ReCodeItLib.Dumper ;
namespace ReCodeIt.Commands ;
[Command("Dumper", Description = "Generates a dumper zip")]
public class Dumper : ICommand
{
2024-08-11 11:34:29 +01:00
[CommandParameter(0, IsRequired = true, Description = "The absolute path to your Managed folder for EFT, folder must contain all references to be resolved. Assembly-CSharp-cleaned.dll, mscorlib.dll, FilesChecker.dll")]
2024-08-10 08:20:37 +01:00
public string ManagedDirectory { get ; init ; }
2024-08-09 21:39:39 +01:00
public ValueTask ExecuteAsync ( IConsole console )
{
DataProvider . IsCli = true ;
DataProvider . LoadAppSettings ( ) ;
2024-08-10 11:00:55 +01:00
Logger . Log ( "Creating DumperClass..." ) ;
var dumper = new DumperClass ( ManagedDirectory ) ;
dumper . CreateDumpFolders ( ) ;
dumper . CreateDumper ( ) ;
2024-08-12 12:20:01 +01:00
dumper . CopyFiles ( ) ;
dumper . ZipFiles ( ) ;
2024-08-09 21:39:39 +01:00
Logger . Log ( "Complete" , ConsoleColor . Green ) ;
// Wait for log termination
Logger . Terminate ( ) ;
while ( Logger . IsRunning ( ) ) { }
return default ;
}
}