Compare commits

...

3 Commits

Author SHA1 Message Date
walon 58c7073073 [version] 发布v4.0.3版本 2023-08-31 11:20:07 +08:00
walon 9dafabd1ee [fix] 修复桥接函数签名计算的bug 2023-08-31 11:06:06 +08:00
walon 5857696b56 [change] 日志和异常文本换成英文,方便海外开发者 2023-08-30 11:07:12 +08:00
11 changed files with 33 additions and 24 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ namespace HybridCLR.Editor.ABI
TypeDef typeDef = type.ToTypeDefOrRef().ResolveTypeDef();
if (typeDef == null)
{
throw new Exception($"type:{type} 未能找到定义。请尝试 `HybridCLR/Genergate/LinkXml`,然后Build一次生成AOT dll,再重新生成桥接函数");
throw new Exception($"type:{type} definition could not be found. Please try `HybridCLR/Genergate/LinkXml`, then Build once to generate the AOT dll, and then regenerate the bridge function");
}
if (typeDef.IsEnum)
{
+5 -5
View File
@@ -23,7 +23,7 @@ namespace HybridCLR.Editor.BuildProcessors
if (!string.IsNullOrEmpty(oldIl2cppPath))
{
Environment.SetEnvironmentVariable("UNITY_IL2CPP_PATH", "");
Debug.Log($"[CheckSettings] 清除 UNITY_IL2CPP_PATH, 旧值为:'{oldIl2cppPath}'");
Debug.Log($"[CheckSettings] clean process environment variable: UNITY_IL2CPP_PATH, old vlaue:'{oldIl2cppPath}'");
}
}
else
@@ -32,7 +32,7 @@ namespace HybridCLR.Editor.BuildProcessors
if (curIl2cppPath != SettingsUtil.LocalIl2CppDir)
{
Environment.SetEnvironmentVariable("UNITY_IL2CPP_PATH", SettingsUtil.LocalIl2CppDir);
Debug.Log($"[CheckSettings] UNITY_IL2CPP_PATH 当前值为:'{curIl2cppPath}',更新为:'{SettingsUtil.LocalIl2CppDir}'");
Debug.Log($"[CheckSettings] UNITY_IL2CPP_PATH old value:'{curIl2cppPath}', new value:'{SettingsUtil.LocalIl2CppDir}'");
}
}
if (!globalSettings.enable)
@@ -44,20 +44,20 @@ namespace HybridCLR.Editor.BuildProcessors
ScriptingImplementation targetScriptingImplementation = ScriptingImplementation.IL2CPP;
if (curScriptingImplementation != targetScriptingImplementation)
{
Debug.LogError($"[CheckSettings] 当前ScriptingBackend是:{curScriptingImplementation},已经自动切换为:{targetScriptingImplementation}");
Debug.LogError($"[CheckSettings] current ScriptingBackend:{curScriptingImplementation},have been switched to:{targetScriptingImplementation} automatically");
PlayerSettings.SetScriptingBackend(buildTargetGroup, targetScriptingImplementation);
}
var installer = new Installer.InstallerController();
if (!installer.HasInstalledHybridCLR())
{
throw new BuildFailedException($"你没有初始化HybridCLR,请通过菜单'HybridCLR/Installer'安装");
throw new BuildFailedException($"You have not initialized HybridCLR, please install it via menu 'HybridCLR/Installer'");
}
HybridCLRSettings gs = SettingsUtil.HybridCLRSettings;
if (((gs.hotUpdateAssemblies?.Length + gs.hotUpdateAssemblyDefinitions?.Length) ?? 0) == 0)
{
Debug.LogWarning("[CheckSettings] HybridCLRSettings中未配置任何热更新模块");
Debug.LogWarning("[CheckSettings] No hot update modules configured in HybridCLRSettings");
}
}
@@ -33,11 +33,11 @@ namespace HybridCLR.Editor.BuildProcessors
{
if (string.IsNullOrWhiteSpace(hotUpdateDll))
{
throw new BuildFailedException($"热更新 assembly 名不能为空");
throw new BuildFailedException($"hot update assembly name cann't be empty");
}
if (!hotUpdateDllSet.Add(hotUpdateDll))
{
throw new BuildFailedException($"热更新 assembly:{hotUpdateDll} 在列表中重复,请除去重复条目");
throw new BuildFailedException($"hot update assembly:{hotUpdateDll} is duplicated");
}
}
@@ -48,7 +48,7 @@ namespace HybridCLR.Editor.BuildProcessors
if (assemblies.Select(Path.GetFileNameWithoutExtension).All(ass => ass != hotUpdateDllName)
&& string.IsNullOrEmpty(assResolver.ResolveAssembly(hotUpdateDllName, false)))
{
throw new BuildFailedException($"热更新 assembly:{hotUpdateDllName} 不存在,请检查拼写错误");
throw new BuildFailedException($"hot update assembly:{hotUpdateDllName} doesn't exist");
}
}
@@ -59,7 +59,7 @@ namespace HybridCLR.Editor.BuildProcessors
bool reserved = allHotUpdateDllNames.All(dll => !assName.Equals(dll, StringComparison.Ordinal));
if (!reserved)
{
Debug.Log($"[FilterHotFixAssemblies] 过滤热更新assembly:{assName}");
Debug.Log($"[FilterHotFixAssemblies] filter assembly:{assName}");
}
return reserved;
}).ToArray();
+1 -1
View File
@@ -113,7 +113,7 @@ namespace HybridCLR.Editor.Commands
if (report.summary.result != UnityEditor.Build.Reporting.BuildResult.Succeeded)
{
throw new Exception("GenerateStripedAOTDlls 失败");
throw new Exception("GenerateStripedAOTDlls failed");
}
Debug.Log($"GenerateStripedAOTDlls target:{target} group:{group} path:{outputPath}");
}
+2 -2
View File
@@ -18,11 +18,11 @@ namespace HybridCLR.Editor.Meta
{
if (SettingsUtil.HotUpdateAssemblyNamesIncludePreserved.Contains(assemblyName))
{
throw new Exception($"resolve 热更新 dll:{assemblyName} 失败!请确保已经编译了热更新dll或者外部热更新路径中配置了正确的值。更多请参阅常见错误文档");
throw new Exception($"resolve Hot update dll:{assemblyName} failed! Please make sure that this hot update dll exists or the search path is configured in the external hot update path.");
}
else
{
throw new Exception($"resolve AOT dll:{assemblyName} 失败! 请确保主工程已经引用了该dll并且正确生成了裁剪后的AOT dll。更多请参阅常见错误文档");
throw new Exception($"resolve AOT dll:{assemblyName} failed! Please make sure that the AOT project has referenced the dll and generated the trimmed AOT dll correctly.");
}
}
return null;
+2 -2
View File
@@ -92,7 +92,7 @@ namespace HybridCLR.Editor.Meta
TypeDef typeDef = a.ToTypeDefOrRef().ResolveTypeDef();
if (typeDef == null)
{
throw new Exception($"type:{a} 未能找到定义");
throw new Exception($"type:{a} definition could not be found");
}
if (typeDef.IsEnum)
{
@@ -109,7 +109,7 @@ namespace HybridCLR.Editor.Meta
TypeDef typeDef = gia.GenericType.ToTypeDefOrRef().ResolveTypeDef();
if (typeDef == null)
{
throw new Exception($"type:{a} 未能找到定义");
throw new Exception($"type:{a} definition could not be found");
}
if (typeDef.IsEnum)
{
+8 -6
View File
@@ -361,6 +361,8 @@ namespace HybridCLR.Editor.MethodBridge
}
}
public const string SigOfObj = "u";
public static string ToFullName(TypeSig type)
{
type = type.RemovePinnedAndModifiers();
@@ -372,15 +374,15 @@ namespace HybridCLR.Editor.MethodBridge
case ElementType.U1: return "u1";
case ElementType.I2: return "i2";
case ElementType.Char:
case ElementType.U2: return "i2";
case ElementType.U2: return "u2";
case ElementType.I4: return "i4";
case ElementType.U4: return "u4";
case ElementType.I8: return "i8";
case ElementType.U8: return "u8";
case ElementType.R4: return "r4";
case ElementType.R8: return "r8";
case ElementType.U: return "u";
case ElementType.I:
case ElementType.I: return "i";
case ElementType.U:
case ElementType.String:
case ElementType.Ptr:
case ElementType.ByRef:
@@ -389,7 +391,7 @@ namespace HybridCLR.Editor.MethodBridge
case ElementType.SZArray:
case ElementType.FnPtr:
case ElementType.Object:
return "i";
return SigOfObj;
case ElementType.Module:
case ElementType.Var:
case ElementType.MVar:
@@ -400,7 +402,7 @@ namespace HybridCLR.Editor.MethodBridge
TypeDef typeDef = type.ToTypeDefOrRef().ResolveTypeDef();
if (typeDef == null)
{
throw new Exception($"type:{type} 未能找到定义。请尝试 `HybridCLR/Genergate/LinkXml`,然后Build一次生成AOT dll,再重新生成桥接函数");
throw new Exception($"type:{type} definition could not be found. Please try `HybridCLR/Genergate/LinkXml`, then Build once to generate the AOT dll, and then regenerate the bridge function");
}
if (typeDef.IsEnum)
{
@@ -413,7 +415,7 @@ namespace HybridCLR.Editor.MethodBridge
GenericInstSig gis = (GenericInstSig)type;
if (!gis.GenericType.IsValueType)
{
return "i";
return SigOfObj;
}
TypeDef typeDef = gis.GenericType.ToTypeDefOrRef().ResolveTypeDef();
if (typeDef.IsEnum)
+1 -1
View File
@@ -31,7 +31,7 @@ namespace HybridCLR.Editor
}
else
{
Debug.LogError($"{nameof(ScriptableSingleton<T>)}: 请指定单例存档路径! ");
Debug.LogError($"save location of {nameof(ScriptableSingleton<T>)} is invalid");
}
return s_Instance;
}
+1 -1
View File
@@ -95,7 +95,7 @@ namespace HybridCLR.Editor
{
if (allAsses.Contains(assemblyName))
{
throw new Exception($"[HotUpdateAssemblyNamesIncludePreserved] assembly:'{assemblyName}' 重复");
throw new Exception($"[HotUpdateAssemblyNamesIncludePreserved] assembly:'{assemblyName}' is duplicated");
}
allAsses.Add(assemblyName);
}
+7
View File
@@ -1,5 +1,12 @@
# 发布日志
## 4.0.3
发布日期 2023.08.31
### Editor
- [fix] 修复桥接函数计算的bug
## 4.0.2
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "com.code-philosophy.hybridclr",
"version": "4.0.2",
"version": "4.0.3",
"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",