Make remapper run button cross compatible

This commit is contained in:
Cj 2024-06-18 23:58:08 -04:00
parent 604f59a2e5
commit 1559b663fa
2 changed files with 12 additions and 3 deletions

View File

@ -223,6 +223,7 @@ public partial class ReCodeItForm : Form
if (AppSettings.Remapper.UseProjectMappings) if (AppSettings.Remapper.UseProjectMappings)
{ {
Remapper.InitializeRemap( Remapper.InitializeRemap(
CrossCompiler.ActiveProject.RemapModels,
CrossCompiler.ActiveProject.OriginalAssemblyPath, CrossCompiler.ActiveProject.OriginalAssemblyPath,
CrossCompiler.ActiveProject.RemappedAssemblyPath); CrossCompiler.ActiveProject.RemappedAssemblyPath);
@ -236,7 +237,11 @@ public partial class ReCodeItForm : Form
return; return;
} }
Remapper.InitializeRemap(AppSettings.Remapper.AssemblyPath, AppSettings.Remapper.OutputPath); Remapper.InitializeRemap(
DataProvider.Remaps,
AppSettings.Remapper.AssemblyPath,
AppSettings.Remapper.OutputPath);
ReloadTreeView(DataProvider.Remaps); ReloadTreeView(DataProvider.Remaps);
} }

View File

@ -37,7 +37,11 @@ public class ReCodeItRemapper
/// <summary> /// <summary>
/// Start the remapping process /// Start the remapping process
/// </summary> /// </summary>
public void InitializeRemap(string assemblyPath, string outPath, bool crossMapMode = false) public void InitializeRemap(
List<RemapModel> remapModels,
string assemblyPath,
string outPath,
bool crossMapMode = false)
{ {
DataProvider.LoadAssemblyDefinition(assemblyPath); DataProvider.LoadAssemblyDefinition(assemblyPath);
@ -50,7 +54,7 @@ public class ReCodeItRemapper
Stopwatch.Start(); Stopwatch.Start();
foreach (var remap in DataProvider.Remaps) foreach (var remap in remapModels)
{ {
Logger.Log($"Finding best match for {remap.NewTypeName}...", ConsoleColor.Gray); Logger.Log($"Finding best match for {remap.NewTypeName}...", ConsoleColor.Gray);