mirror of
https://github.com/focus-creative-games/hybridclr_unity.git
synced 2026-11-20 07:22:39 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b49b94521e | |||
| 49873ba6ed | |||
| 97f083f07d |
@@ -2,12 +2,12 @@
|
||||
"versions": [
|
||||
{
|
||||
"unity_version":"2021",
|
||||
"hybridclr" : { "branch":"v3.0.1"},
|
||||
"hybridclr" : { "branch":"v3.0.2"},
|
||||
"il2cpp_plus": { "branch":"v2021-3.0.0"}
|
||||
},
|
||||
{
|
||||
"unity_version":"2022",
|
||||
"hybridclr" : { "branch":"v3.0.1"},
|
||||
"hybridclr" : { "branch":"v3.0.2"},
|
||||
"il2cpp_plus": { "branch":"v2022-3.0.0"}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -12,13 +12,17 @@ namespace HybridCLR.Editor.Commands
|
||||
{
|
||||
public class CompileDllCommand
|
||||
{
|
||||
public static void CompileDll(string buildDir, BuildTarget target)
|
||||
public static void CompileDll(string buildDir, BuildTarget target, bool developmentBuild)
|
||||
{
|
||||
var group = BuildPipeline.GetBuildTargetGroup(target);
|
||||
|
||||
ScriptCompilationSettings scriptCompilationSettings = new ScriptCompilationSettings();
|
||||
scriptCompilationSettings.group = group;
|
||||
scriptCompilationSettings.target = target;
|
||||
if (developmentBuild)
|
||||
{
|
||||
scriptCompilationSettings.options |= ScriptCompilationOptions.DevelopmentBuild;
|
||||
}
|
||||
Directory.CreateDirectory(buildDir);
|
||||
ScriptCompilationResult scriptCompilationResult = PlayerBuildInterface.CompilePlayerScripts(scriptCompilationSettings, buildDir);
|
||||
foreach (var ass in scriptCompilationResult.assemblies)
|
||||
@@ -28,9 +32,9 @@ namespace HybridCLR.Editor.Commands
|
||||
Debug.Log("compile finish!!!");
|
||||
}
|
||||
|
||||
public static void CompileDll(BuildTarget target)
|
||||
public static void CompileDll(BuildTarget target, bool developmentBuild = false)
|
||||
{
|
||||
CompileDll(SettingsUtil.GetHotUpdateDllsOutputDirByTarget(target), target);
|
||||
CompileDll(SettingsUtil.GetHotUpdateDllsOutputDirByTarget(target), target, developmentBuild);
|
||||
}
|
||||
|
||||
[MenuItem("HybridCLR/CompileDll/ActiveBuildTarget", priority = 100)]
|
||||
@@ -39,6 +43,12 @@ namespace HybridCLR.Editor.Commands
|
||||
CompileDll(EditorUserBuildSettings.activeBuildTarget);
|
||||
}
|
||||
|
||||
[MenuItem("HybridCLR/CompileDll/ActiveBuildTarget_Development", priority = 101)]
|
||||
public static void CompileDllActiveBuildTargetDevelopment()
|
||||
{
|
||||
CompileDll(EditorUserBuildSettings.activeBuildTarget, true);
|
||||
}
|
||||
|
||||
[MenuItem("HybridCLR/CompileDll/Win32", priority = 200)]
|
||||
public static void CompileDllWin32()
|
||||
{
|
||||
|
||||
@@ -12,13 +12,6 @@ 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()
|
||||
{
|
||||
|
||||
@@ -19,7 +19,6 @@ namespace HybridCLR.Editor
|
||||
private SerializedProperty _hotUpdateDllCompileOutputRootDir;
|
||||
private SerializedProperty _externalHotUpdateAssembliyDirs;
|
||||
private SerializedProperty _strippedAOTDllOutputRootDir;
|
||||
private SerializedProperty _strippedAOTDllSnapshotDir;
|
||||
private SerializedProperty _patchAOTAssemblies;
|
||||
private SerializedProperty _outputLinkFile;
|
||||
private SerializedProperty _outputAOTGenericReferenceFile;
|
||||
@@ -47,7 +46,6 @@ 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");
|
||||
@@ -136,7 +134,6 @@ namespace HybridCLR.Editor
|
||||
EditorGUILayout.PropertyField(_hotUpdateDllCompileOutputRootDir);
|
||||
EditorGUILayout.PropertyField(_externalHotUpdateAssembliyDirs);
|
||||
EditorGUILayout.PropertyField(_strippedAOTDllOutputRootDir);
|
||||
EditorGUILayout.PropertyField(_strippedAOTDllSnapshotDir);
|
||||
EditorGUILayout.PropertyField(_patchAOTAssemblies);
|
||||
EditorGUILayout.PropertyField(_outputLinkFile);
|
||||
EditorGUILayout.PropertyField(_outputAOTGenericReferenceFile);
|
||||
|
||||
@@ -32,11 +32,8 @@ namespace HybridCLR.Editor
|
||||
[Header("外部热更新dll搜索路径")]
|
||||
public string[] externalHotUpdateAssembliyDirs;
|
||||
|
||||
[Header("裁减后AOT dll的输出目录")]
|
||||
public string strippedAOTDllOutputRootDir = "HybridCLRData/AOTDllOutput";
|
||||
|
||||
[Header("裁减后AOT dll的备份目录")]
|
||||
public string strippedAOTDllSnapshotDir = "HybridCLRData/AOTDllSnapshot";
|
||||
[Header("裁减后AOT dll输出根目录")]
|
||||
public string strippedAOTDllOutputRootDir = "HybridCLRData/AssembliesPostIl2CppStrip";
|
||||
|
||||
[Header("补充元数据AOT dlls")]
|
||||
public string[] patchAOTAssemblies;
|
||||
|
||||
@@ -55,11 +55,6 @@ namespace HybridCLR.Editor
|
||||
return $"{AssembliesPostIl2CppStripDir}/{target}";
|
||||
}
|
||||
|
||||
public static string GetAOTAssemblySnapshotDir(BuildTarget target)
|
||||
{
|
||||
return $"{HybridCLRSettings.Instance.strippedAOTDllSnapshotDir}/{target}";
|
||||
}
|
||||
|
||||
class AssemblyDefinitionData
|
||||
{
|
||||
public string name;
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# 发布日志
|
||||
|
||||
## 3.0.2
|
||||
|
||||
### 改动
|
||||
|
||||
- 移除 `HybridCLR/CreateAOTDllSnapshot`菜单
|
||||
|
||||
### 修复
|
||||
|
||||
- 修复Memory Profiler中创建内存快照时崩溃的bug
|
||||
|
||||
## 3.0.1
|
||||
|
||||
### 改动
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "com.code-philosophy.hybridclr",
|
||||
"version": "3.0.1",
|
||||
"version": "3.0.2",
|
||||
"displayName": "HybridCLR",
|
||||
"description": "HybridCLR is a fully featured, zero-cost, high-performance, low-memory solution for Unity's all-platform native c# hotupdate.",
|
||||
"category": "Runtime",
|
||||
|
||||
Reference in New Issue
Block a user