[new] HybridCLRSettings新增AOT dll快照目录,由于保存打包时生成的AOT dlls

main
walon 2023-05-20 10:40:58 +08:00
parent f5afc43625
commit 8d0634620a
4 changed files with 20 additions and 2 deletions

View File

@ -12,6 +12,13 @@ namespace HybridCLR.Editor.Commands
{
public static class StripAOTDllCommand
{
[MenuItem("HybridCLR/CreateAOTDllSnapshot", priority = 201)]
public static void CreateAOTDllSnapshot()
{
BuildTarget target = EditorUserBuildSettings.activeBuildTarget;
BashUtil.CopyDir(SettingsUtil.GetAssembliesPostIl2CppStripDir(target), SettingsUtil.GetAOTAssemblySnapshotDir(target), true);
}
[MenuItem("HybridCLR/Generate/AOTDlls", priority = 105)]
public static void GenerateStripedAOTDlls()
{

View File

@ -19,6 +19,7 @@ namespace HybridCLR.Editor
private SerializedProperty _hotUpdateDllCompileOutputRootDir;
private SerializedProperty _externalHotUpdateAssembliyDirs;
private SerializedProperty _strippedAOTDllOutputRootDir;
private SerializedProperty _strippedAOTDllSnapshotDir;
private SerializedProperty _patchAOTAssemblies;
private SerializedProperty _outputLinkFile;
private SerializedProperty _outputAOTGenericReferenceFile;
@ -46,6 +47,7 @@ namespace HybridCLR.Editor
_hotUpdateDllCompileOutputRootDir = _serializedObject.FindProperty("hotUpdateDllCompileOutputRootDir");
_externalHotUpdateAssembliyDirs = _serializedObject.FindProperty("externalHotUpdateAssembliyDirs");
_strippedAOTDllOutputRootDir = _serializedObject.FindProperty("strippedAOTDllOutputRootDir");
_strippedAOTDllSnapshotDir = _serializedObject.FindProperty("strippedAOTDllSnapshotDir");
_patchAOTAssemblies = _serializedObject.FindProperty("patchAOTAssemblies");
_outputLinkFile = _serializedObject.FindProperty("outputLinkFile");
_outputAOTGenericReferenceFile = _serializedObject.FindProperty("outputAOTGenericReferenceFile");
@ -134,6 +136,7 @@ namespace HybridCLR.Editor
EditorGUILayout.PropertyField(_hotUpdateDllCompileOutputRootDir);
EditorGUILayout.PropertyField(_externalHotUpdateAssembliyDirs);
EditorGUILayout.PropertyField(_strippedAOTDllOutputRootDir);
EditorGUILayout.PropertyField(_strippedAOTDllSnapshotDir);
EditorGUILayout.PropertyField(_patchAOTAssemblies);
EditorGUILayout.PropertyField(_outputLinkFile);
EditorGUILayout.PropertyField(_outputAOTGenericReferenceFile);

View File

@ -32,8 +32,11 @@ namespace HybridCLR.Editor
[Header("外部热更新dll搜索路径")]
public string[] externalHotUpdateAssembliyDirs;
[Header("裁减后AOT dll输出根目录")]
public string strippedAOTDllOutputRootDir = "HybridCLRData/AssembliesPostIl2CppStrip";
[Header("裁减后AOT dll的输出目录")]
public string strippedAOTDllOutputRootDir = "HybridCLRData/AOTDllOutput";
[Header("裁减后AOT dll的备份目录")]
public string strippedAOTDllSnapshotDir = "HybridCLRData/AOTDllSnapshot";
[Header("补充元数据AOT dlls")]
public string[] patchAOTAssemblies;

View File

@ -59,6 +59,11 @@ namespace HybridCLR.Editor
return $"{AssembliesPostIl2CppStripDir}/{target}";
}
public static string GetAOTAssemblySnapshotDir(BuildTarget target)
{
return $"{HybridCLRSettings.Instance.strippedAOTDllSnapshotDir}/{target}";
}
class AssemblyDefinitionData
{
public string name;