8.2版本上传
This commit is contained in:
@@ -83,7 +83,7 @@ namespace HybridCLR.Editor.Installer
|
||||
{
|
||||
RemoveDir(subDir);
|
||||
}
|
||||
Directory.Delete(dir);
|
||||
Directory.Delete(dir, true);
|
||||
break;
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -111,12 +111,12 @@ namespace HybridCLR.Editor.Installer
|
||||
#endif
|
||||
if (srcFile.Length > maxPathLength)
|
||||
{
|
||||
UnityEngine.Debug.LogError($"srcFile:{srcFile} path is too long. copy ignore!");
|
||||
UnityEngine.Debug.LogError($"srcFile:{srcFile} path is too long. skip copy!");
|
||||
return;
|
||||
}
|
||||
if (dstFile.Length > maxPathLength)
|
||||
{
|
||||
UnityEngine.Debug.LogError($"dstFile:{dstFile} path is too long. copy ignore!");
|
||||
UnityEngine.Debug.LogError($"dstFile:{dstFile} path is too long. skip copy!");
|
||||
return;
|
||||
}
|
||||
File.Copy(srcFile, dstFile);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9791af60640dab34a94dcd2636015e7a
|
||||
guid: 960a0257c3a17f64b810193308ce1558
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace HybridCLR.Editor.Installer
|
||||
{
|
||||
_curVersion = ParseUnityVersion(Application.unityVersion);
|
||||
_versionManifest = GetHybridCLRVersionManifest();
|
||||
_curDefaultVersion = _versionManifest.versions.FirstOrDefault(v => v.unity_version == _curVersion.major.ToString());
|
||||
_curDefaultVersion = _versionManifest.versions.FirstOrDefault(v => _curVersion.isTuanjieEngine ? v.unity_version == $"{_curVersion.major}-tuanjie" : v.unity_version == _curVersion.major.ToString());
|
||||
PackageVersion = LoadPackageInfo().version;
|
||||
InstalledLibil2cppVersion = ReadLocalVersion();
|
||||
}
|
||||
@@ -88,6 +88,7 @@ namespace HybridCLR.Editor.Installer
|
||||
public int major;
|
||||
public int minor1;
|
||||
public int minor2;
|
||||
public bool isTuanjieEngine;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
@@ -108,7 +109,8 @@ namespace HybridCLR.Editor.Installer
|
||||
int major = int.Parse(match.Groups[1].Value);
|
||||
int minor1 = int.Parse(match.Groups[2].Value);
|
||||
int minor2 = int.Parse(match.Groups[3].Value);
|
||||
return new UnityVersion { major = major, minor1 = minor1, minor2 = minor2 };
|
||||
bool isTuanjieEngine = versionStr.Contains("t");
|
||||
return new UnityVersion { major = major, minor1 = minor1, minor2 = minor2, isTuanjieEngine = isTuanjieEngine };
|
||||
}
|
||||
|
||||
public string GetCurrentUnityVersionMinCompatibleVersionStr()
|
||||
@@ -120,9 +122,12 @@ namespace HybridCLR.Editor.Installer
|
||||
{
|
||||
switch(majorVersion)
|
||||
{
|
||||
case 2020: return $"2020.3.0";
|
||||
case 2021: return $"2021.3.0";
|
||||
case 2022: return $"2022.3.0";
|
||||
case 2019: return "2019.4.0";
|
||||
case 2020: return "2020.3.0";
|
||||
case 2021: return "2021.3.0";
|
||||
case 2022: return "2022.3.0";
|
||||
case 2023: return "2023.2.0";
|
||||
case 6000: return "6000.0.0";
|
||||
default: return $"2020.3.0";
|
||||
}
|
||||
}
|
||||
@@ -141,7 +146,8 @@ namespace HybridCLR.Editor.Installer
|
||||
{
|
||||
return CompatibleType.Incompatible;
|
||||
}
|
||||
if (version.minor1 != 3)
|
||||
if ((version.major == 2019 && version.minor1 < 4)
|
||||
|| (version.major >= 2020 && version.major <= 2022 && version.minor1 < 3))
|
||||
{
|
||||
return CompatibleType.MaybeIncompatible;
|
||||
}
|
||||
@@ -188,6 +194,24 @@ namespace HybridCLR.Editor.Installer
|
||||
return Directory.Exists($"{SettingsUtil.LocalIl2CppDir}/libil2cpp/hybridclr");
|
||||
}
|
||||
|
||||
private string GetUnityIl2CppDllInstallLocation()
|
||||
{
|
||||
#if UNITY_EDITOR_WIN
|
||||
return $"{SettingsUtil.LocalIl2CppDir}/build/deploy/net471/Unity.IL2CPP.dll";
|
||||
#else
|
||||
return $"{SettingsUtil.LocalIl2CppDir}/build/deploy/il2cppcore/Unity.IL2CPP.dll";
|
||||
#endif
|
||||
}
|
||||
|
||||
private string GetUnityIl2CppDllModifiedPath(string curVersionStr)
|
||||
{
|
||||
#if UNITY_EDITOR_WIN
|
||||
return $"{SettingsUtil.ProjectDir}/{SettingsUtil.HybridCLRDataPathInPackage}/ModifiedUnityAssemblies/{curVersionStr}/Unity.IL2CPP-Win.dll";
|
||||
#else
|
||||
return $"{SettingsUtil.ProjectDir}/{SettingsUtil.HybridCLRDataPathInPackage}/ModifiedUnityAssemblies/{curVersionStr}/Unity.IL2CPP-Mac.dll";
|
||||
#endif
|
||||
}
|
||||
|
||||
void CloneBranch(string workDir, string repoUrl, string branch, string repoDir)
|
||||
{
|
||||
BashUtil.RemoveDir(repoDir);
|
||||
@@ -255,7 +279,21 @@ namespace HybridCLR.Editor.Installer
|
||||
|
||||
// clean Il2cppBuildCache
|
||||
BashUtil.RemoveDir($"{SettingsUtil.ProjectDir}/Library/Il2cppBuildCache", true);
|
||||
|
||||
if (version.major == 2019)
|
||||
{
|
||||
string curVersionStr = version.ToString();
|
||||
string srcIl2CppDll = GetUnityIl2CppDllModifiedPath(curVersionStr);
|
||||
if (File.Exists(srcIl2CppDll))
|
||||
{
|
||||
string dstIl2CppDll = GetUnityIl2CppDllInstallLocation();
|
||||
File.Copy(srcIl2CppDll, dstIl2CppDll, true);
|
||||
Debug.Log($"copy {srcIl2CppDll} => {dstIl2CppDll}");
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception($"the modified Unity.IL2CPP.dll of {curVersionStr} isn't found. please install hybridclr in 2019.4.40 first, then switch to your unity version");
|
||||
}
|
||||
}
|
||||
if (HasInstalledHybridCLR())
|
||||
{
|
||||
WriteLocalVersion();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fbdbfffcea3ea9f4aa76780e64300eb2
|
||||
guid: 44c8627d126b30d4e9560b1f738264ca
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@@ -44,9 +44,9 @@ namespace HybridCLR.Editor.Installer
|
||||
EditorGUILayout.LabelField($"Installed: {hasInstall}", EditorStyles.boldLabel);
|
||||
GUILayout.Space(10f);
|
||||
|
||||
EditorGUILayout.LabelField($"Package Version: v{_controller.PackageVersion}");
|
||||
EditorGUILayout.LabelField($"Package Version: v{_controller.PackageVersion}");
|
||||
GUILayout.Space(5f);
|
||||
EditorGUILayout.LabelField($"Installed Version: {_controller.InstalledLibil2cppVersion ?? "Unknown"}");
|
||||
EditorGUILayout.LabelField($"Installed Version: v{_controller.InstalledLibil2cppVersion ?? " Unknown"}");
|
||||
GUILayout.Space(5f);
|
||||
|
||||
GUILayout.Space(10f);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 42de960287182a74685ad9217f4a757c
|
||||
guid: 959fbf0bb06629542969354505189240
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
Reference in New Issue
Block a user