Script: Rename IDAPythonScript to PythonScript

This commit is contained in:
Katy Coe
2020-08-06 05:21:55 +02:00
parent b5a70d94fd
commit 567bbd2706
3 changed files with 6 additions and 6 deletions

View File

@@ -271,7 +271,7 @@ namespace Il2CppInspector.CLI
// IDA Python script output // IDA Python script output
using (new Benchmark("Generate IDAPython script")) { using (new Benchmark("Generate IDAPython script")) {
new IDAPythonScript(appModel).WriteScriptToFile(options.PythonOutFile, "IDA", new PythonScript(appModel).WriteScriptToFile(options.PythonOutFile, "IDA",
Path.Combine(options.CppOutPath, "appdata/il2cpp-types.h"), Path.Combine(options.CppOutPath, "appdata/il2cpp-types.h"),
options.JsonOutPath); options.JsonOutPath);
} }

View File

@@ -12,15 +12,15 @@ using System;
namespace Il2CppInspector.Outputs namespace Il2CppInspector.Outputs
{ {
public class IDAPythonScript public class PythonScript
{ {
private readonly AppModel model; private readonly AppModel model;
public IDAPythonScript(AppModel model) => this.model = model; public PythonScript(AppModel model) => this.model = model;
// Get list of available script targets // Get list of available script targets
public static IEnumerable<string> GetAvailableTargets() { public static IEnumerable<string> GetAvailableTargets() {
var ns = typeof(IDAPythonScript).Namespace + ".ScriptResources.Targets"; var ns = typeof(PythonScript).Namespace + ".ScriptResources.Targets";
var res = ResourceHelper.GetNamesForNamespace(ns); var res = ResourceHelper.GetNamesForNamespace(ns);
return res.Select(s => Path.GetFileNameWithoutExtension(s.Substring(ns.Length + 1))).OrderBy(s => s); return res.Select(s => Path.GetFileNameWithoutExtension(s.Substring(ns.Length + 1))).OrderBy(s => s);
} }
@@ -52,7 +52,7 @@ namespace Il2CppInspector.Outputs
var jsonMetadataRelativePath = getRelativePath(outputFile, jsonMetadataFile); var jsonMetadataRelativePath = getRelativePath(outputFile, jsonMetadataFile);
var ns = typeof(IDAPythonScript).Namespace + ".ScriptResources"; var ns = typeof(PythonScript).Namespace + ".ScriptResources";
var preamble = ResourceHelper.GetText(ns + ".shared-preamble.py"); var preamble = ResourceHelper.GetText(ns + ".shared-preamble.py");
var main = ResourceHelper.GetText(ns + ".shared-main.py"); var main = ResourceHelper.GetText(ns + ".shared-main.py");
var api = ResourceHelper.GetText($"{ns}.Targets.{target}.py"); var api = ResourceHelper.GetText($"{ns}.Targets.{target}.py");

View File

@@ -431,7 +431,7 @@ namespace Il2CppInspectorGUI
model.Build(selectedIdaUnityVersion, CppCompilerType.GCC); model.Build(selectedIdaUnityVersion, CppCompilerType.GCC);
OnStatusUpdate(this, "Generating IDAPython script"); OnStatusUpdate(this, "Generating IDAPython script");
new IDAPythonScript(model).WriteScriptToFile(idaOutFile, "IDA"); new PythonScript(model).WriteScriptToFile(idaOutFile, "IDA");
}); });
break; break;