[change] add UnityVersion.h.tpl and AssemblyManifest.cpp.tpl, Il2CppDefGenerator doesn't generates and override code file from same one
parent
c19b34542e
commit
dd8d812641
|
|
@ -0,0 +1,12 @@
|
|||
#include "../Il2CppCompatibleDef.h"
|
||||
|
||||
namespace hybridclr
|
||||
{
|
||||
const char* g_placeHolderAssemblies[] =
|
||||
{
|
||||
//!!!{{PLACE_HOLDER
|
||||
|
||||
//!!!}}PLACE_HOLDER
|
||||
nullptr,
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
//!!!{{UNITY_VERSION
|
||||
|
||||
|
||||
//!!!}}UNITY_VERSION
|
||||
|
|
@ -20,8 +20,10 @@ namespace HybridCLR.Editor.Commands
|
|||
{
|
||||
UnityVersion = Application.unityVersion,
|
||||
HotUpdateAssemblies = SettingsUtil.HotUpdateAssemblyNamesIncludePreserved,
|
||||
OutputFile = $"{SettingsUtil.LocalIl2CppDir}/libil2cpp/hybridclr/generated/UnityVersion.h",
|
||||
OutputFile2 = $"{SettingsUtil.LocalIl2CppDir}/libil2cpp/hybridclr/generated/AssemblyManifest.cpp",
|
||||
UnityVersionTemplateFile = $"{SettingsUtil.TemplatePathInPackage}/UnityVersion.h.tpl",
|
||||
UnityVersionOutputFile = $"{SettingsUtil.LocalIl2CppDir}/libil2cpp/hybridclr/generated/UnityVersion.h",
|
||||
AssemblyManifestTemplateFile = $"{SettingsUtil.TemplatePathInPackage}/AssemblyManifest.cpp.tpl",
|
||||
AssemblyManifestOutputFile = $"{SettingsUtil.LocalIl2CppDir}/libil2cpp/hybridclr/generated/AssemblyManifest.cpp",
|
||||
EnableProfilerInReleaseBuild = HybridCLRSettings.Instance.enableProfilerInReleaseBuild,
|
||||
EnableStraceTraceInWebGLReleaseBuild = HybridCLRSettings.Instance.enableStraceTraceInWebGLReleaseBuild,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -17,9 +17,13 @@ namespace HybridCLR.Editor.Il2CppDef
|
|||
{
|
||||
public List<string> HotUpdateAssemblies { get; set; }
|
||||
|
||||
public string OutputFile { get; set; }
|
||||
public string UnityVersionTemplateFile { get; set; }
|
||||
|
||||
public string OutputFile2 { get; set; }
|
||||
public string UnityVersionOutputFile { get; set; }
|
||||
|
||||
public string AssemblyManifestTemplateFile { get; set; }
|
||||
|
||||
public string AssemblyManifestOutputFile { get; set; }
|
||||
|
||||
public string UnityVersion { get; set; }
|
||||
|
||||
|
|
@ -45,7 +49,7 @@ namespace HybridCLR.Editor.Il2CppDef
|
|||
|
||||
private void GenerateIl2CppConfig()
|
||||
{
|
||||
var frr = new FileRegionReplace(File.ReadAllText(_options.OutputFile));
|
||||
var frr = new FileRegionReplace(File.ReadAllText(_options.UnityVersionTemplateFile));
|
||||
|
||||
List<string> lines = new List<string>();
|
||||
|
||||
|
|
@ -93,13 +97,13 @@ namespace HybridCLR.Editor.Il2CppDef
|
|||
|
||||
frr.Replace("UNITY_VERSION", string.Join("\n", lines));
|
||||
|
||||
frr.Commit(_options.OutputFile);
|
||||
Debug.Log($"[HybridCLR.Editor.Il2CppDef.Generator] output:{_options.OutputFile}");
|
||||
frr.Commit(_options.UnityVersionOutputFile);
|
||||
Debug.Log($"[HybridCLR.Editor.Il2CppDef.Generator] output:{_options.UnityVersionOutputFile}");
|
||||
}
|
||||
|
||||
private void GeneratePlaceHolderAssemblies()
|
||||
{
|
||||
var frr = new FileRegionReplace(File.ReadAllText(_options.OutputFile2));
|
||||
var frr = new FileRegionReplace(File.ReadAllText(_options.AssemblyManifestTemplateFile));
|
||||
|
||||
List<string> lines = new List<string>();
|
||||
|
||||
|
|
@ -110,8 +114,8 @@ namespace HybridCLR.Editor.Il2CppDef
|
|||
|
||||
frr.Replace("PLACE_HOLDER", string.Join("\n", lines));
|
||||
|
||||
frr.Commit(_options.OutputFile2);
|
||||
Debug.Log($"[HybridCLR.Editor.Il2CppDef.Generator] output:{_options.OutputFile2}");
|
||||
frr.Commit(_options.AssemblyManifestOutputFile);
|
||||
Debug.Log($"[HybridCLR.Editor.Il2CppDef.Generator] output:{_options.AssemblyManifestOutputFile}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue