d33f1f3c9b
* First compiling build * fix out path * fix hollow * Traditional loops in favor of linq for clarity * Start refactor * Refactor part 2 * Rename variable * Better error reason handling * Clean up enum * Refactor part 3 * Use combo boxes in favor of updowns * Update tooltips * fix is nested tree view display * Capitialization * Refactor part ?? * remove unused methods * Expanded IsNested Check * TypeFilter class + Fix CLI bug * Remove reflection, change IsDerived and IsNested checks * Remove optional out for IsPublic * Remove nullable from IsPublic * fix logger not resetting color * actually fix it... * remove redundant if else on IsPublic check * Add logging to indicate all types have been filtered out * Default IsPublic to true * remove duplicate method call * Refactor logger to be on its own thread * Multithread remapping and grouped logging for threads * 5 more filters * Finish migrating to the new system * bug fixes * Add empty string validation to text fields * re-enable renamer * restore renamer * Multi threaded renaming, still broken * Basis for method renaming * More renamer work, might get a passing build now? * Re-enable publicizer * Rework logging * re-enable mapping updates * fix hollow * Iterate over all types instead of just one to re-link fields * Add reference list command --------- Co-authored-by: clodan <clodan@clodan.com>
58 lines
1.6 KiB
C#
58 lines
1.6 KiB
C#
using CliFx;
|
|
using CliFx.Attributes;
|
|
using CliFx.Infrastructure;
|
|
using ReCodeIt.CrossCompiler;
|
|
using ReCodeIt.Utils;
|
|
using ReCodeItLib.Utils;
|
|
|
|
namespace ReCodeIt.Commands;
|
|
|
|
[Command("BuildRef", Description = "(Compile Time Reflection) Builds or rebuilds a new reference DLL for your project")]
|
|
public class BuildRef : ICommand
|
|
{
|
|
private ReCodeItCrossCompiler CrossCompiler { get; set; }
|
|
|
|
public ValueTask ExecuteAsync(IConsole console)
|
|
{
|
|
console.Output.WriteLine(RegistryHelper.GetRegistryValue<string>("LastLoadedProject"));
|
|
|
|
if (RegistryHelper.GetRegistryValue<string>("LastLoadedProject") != null)
|
|
{
|
|
CrossCompiler = new();
|
|
|
|
DataProvider.LoadAppSettings();
|
|
DataProvider.IsCli = true;
|
|
|
|
ProjectManager.LoadProject(RegistryHelper.GetRegistryValue<string>("LastLoadedProject"), true);
|
|
|
|
if (!Validate(console)) { return default; }
|
|
|
|
CrossCompiler.StartRemap();
|
|
|
|
DataProvider.SaveAppSettings();
|
|
}
|
|
|
|
// Wait for log termination
|
|
Logger.Terminate();
|
|
while(Logger.IsRunning()) {}
|
|
|
|
return default;
|
|
}
|
|
|
|
private bool Validate(IConsole console)
|
|
{
|
|
if (ProjectManager.ActiveProject == null)
|
|
{
|
|
console.Output.WriteLine("No project loaded, please load a project first");
|
|
return false;
|
|
}
|
|
|
|
if (ProjectManager.ActiveProject.RemapModels.Count == 0)
|
|
{
|
|
console.Output.WriteLine("No Remaps present, go to the gui and create some first");
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
} |