mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
接入obfuz->2.0
This commit is contained in:
@@ -0,0 +1,143 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HybridCLR.Editor.Installer
|
||||
{
|
||||
public static class BashUtil
|
||||
{
|
||||
public static int RunCommand(string workingDir, string program, string[] args, bool log = true)
|
||||
{
|
||||
using (Process p = new Process())
|
||||
{
|
||||
p.StartInfo.WorkingDirectory = workingDir;
|
||||
p.StartInfo.FileName = program;
|
||||
p.StartInfo.UseShellExecute = false;
|
||||
p.StartInfo.CreateNoWindow = true;
|
||||
string argsStr = string.Join(" ", args.Select(arg => "\"" + arg + "\""));
|
||||
p.StartInfo.Arguments = argsStr;
|
||||
if (log)
|
||||
{
|
||||
UnityEngine.Debug.Log($"[BashUtil] run => {program} {argsStr}");
|
||||
}
|
||||
p.Start();
|
||||
p.WaitForExit();
|
||||
return p.ExitCode;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static (int ExitCode, string StdOut, string StdErr) RunCommand2(string workingDir, string program, string[] args, bool log = true)
|
||||
{
|
||||
using (Process p = new Process())
|
||||
{
|
||||
p.StartInfo.WorkingDirectory = workingDir;
|
||||
p.StartInfo.FileName = program;
|
||||
p.StartInfo.UseShellExecute = false;
|
||||
p.StartInfo.CreateNoWindow = true;
|
||||
p.StartInfo.RedirectStandardOutput = true;
|
||||
p.StartInfo.RedirectStandardError = true;
|
||||
string argsStr = string.Join(" ", args);
|
||||
p.StartInfo.Arguments = argsStr;
|
||||
if (log)
|
||||
{
|
||||
UnityEngine.Debug.Log($"[BashUtil] run => {program} {argsStr}");
|
||||
}
|
||||
p.Start();
|
||||
p.WaitForExit();
|
||||
|
||||
string stdOut = p.StandardOutput.ReadToEnd();
|
||||
string stdErr = p.StandardError.ReadToEnd();
|
||||
return (p.ExitCode, stdOut, stdErr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void RemoveDir(string dir, bool log = false)
|
||||
{
|
||||
if (log)
|
||||
{
|
||||
UnityEngine.Debug.Log($"[BashUtil] RemoveDir dir:{dir}");
|
||||
}
|
||||
|
||||
int maxTryCount = 5;
|
||||
for (int i = 0; i < maxTryCount; ++i)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!Directory.Exists(dir))
|
||||
{
|
||||
return;
|
||||
}
|
||||
foreach (var file in Directory.GetFiles(dir))
|
||||
{
|
||||
File.SetAttributes(file, FileAttributes.Normal);
|
||||
File.Delete(file);
|
||||
}
|
||||
foreach (var subDir in Directory.GetDirectories(dir))
|
||||
{
|
||||
RemoveDir(subDir);
|
||||
}
|
||||
Directory.Delete(dir, true);
|
||||
break;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
UnityEngine.Debug.LogError($"[BashUtil] RemoveDir:{dir} with exception:{e}. try count:{i}");
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void RecreateDir(string dir)
|
||||
{
|
||||
if(Directory.Exists(dir))
|
||||
{
|
||||
RemoveDir(dir, true);
|
||||
}
|
||||
Directory.CreateDirectory(dir);
|
||||
}
|
||||
|
||||
private static void CopyWithCheckLongFile(string srcFile, string dstFile)
|
||||
{
|
||||
var maxPathLength = 255;
|
||||
#if UNITY_EDITOR_OSX
|
||||
maxPathLength = 1024;
|
||||
#endif
|
||||
if (srcFile.Length > maxPathLength)
|
||||
{
|
||||
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. skip copy!");
|
||||
return;
|
||||
}
|
||||
File.Copy(srcFile, dstFile);
|
||||
}
|
||||
|
||||
public static void CopyDir(string src, string dst, bool log = false)
|
||||
{
|
||||
if (log)
|
||||
{
|
||||
UnityEngine.Debug.Log($"[BashUtil] CopyDir {src} => {dst}");
|
||||
}
|
||||
RemoveDir(dst);
|
||||
Directory.CreateDirectory(dst);
|
||||
foreach(var file in Directory.GetFiles(src))
|
||||
{
|
||||
CopyWithCheckLongFile(file, $"{dst}/{Path.GetFileName(file)}");
|
||||
}
|
||||
foreach(var subDir in Directory.GetDirectories(src))
|
||||
{
|
||||
CopyDir(subDir, $"{dst}/{Path.GetFileName(subDir)}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 960a0257c3a17f64b810193308ce1558
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,308 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using Debug = UnityEngine.Debug;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Linq;
|
||||
using HybridCLR.Editor.Settings;
|
||||
|
||||
namespace HybridCLR.Editor.Installer
|
||||
{
|
||||
|
||||
public class InstallerController
|
||||
{
|
||||
private const string hybridclr_repo_path = "hybridclr_repo";
|
||||
|
||||
private const string il2cpp_plus_repo_path = "il2cpp_plus_repo";
|
||||
|
||||
public int MajorVersion => _curVersion.major;
|
||||
|
||||
private readonly UnityVersion _curVersion;
|
||||
|
||||
private readonly HybridclrVersionManifest _versionManifest;
|
||||
private readonly HybridclrVersionInfo _curDefaultVersion;
|
||||
|
||||
public string PackageVersion { get; private set; }
|
||||
|
||||
public string InstalledLibil2cppVersion { get; private set; }
|
||||
|
||||
public InstallerController()
|
||||
{
|
||||
_curVersion = ParseUnityVersion(Application.unityVersion);
|
||||
_versionManifest = GetHybridCLRVersionManifest();
|
||||
_curDefaultVersion = _versionManifest.versions.FirstOrDefault(v => _curVersion.isTuanjieEngine ? v.unity_version == $"{_curVersion.major}-tuanjie" : v.unity_version == _curVersion.major.ToString());
|
||||
PackageVersion = LoadPackageInfo().version;
|
||||
InstalledLibil2cppVersion = ReadLocalVersion();
|
||||
}
|
||||
|
||||
private HybridclrVersionManifest GetHybridCLRVersionManifest()
|
||||
{
|
||||
string versionFile = $"{SettingsUtil.ProjectDir}/{SettingsUtil.HybridCLRDataPathInPackage}/hybridclr_version.json";
|
||||
return JsonUtility.FromJson<HybridclrVersionManifest>(File.ReadAllText(versionFile, Encoding.UTF8));
|
||||
}
|
||||
|
||||
private PackageInfo LoadPackageInfo()
|
||||
{
|
||||
string packageJson = $"{SettingsUtil.ProjectDir}/Packages/{SettingsUtil.PackageName}/package.json";
|
||||
return JsonUtility.FromJson<PackageInfo>(File.ReadAllText(packageJson, Encoding.UTF8));
|
||||
}
|
||||
|
||||
|
||||
[Serializable]
|
||||
class PackageInfo
|
||||
{
|
||||
public string name;
|
||||
|
||||
public string version;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
class VersionDesc
|
||||
{
|
||||
public string branch;
|
||||
|
||||
//public string hash;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
class HybridclrVersionInfo
|
||||
{
|
||||
public string unity_version;
|
||||
|
||||
public VersionDesc hybridclr;
|
||||
|
||||
public VersionDesc il2cpp_plus;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
class HybridclrVersionManifest
|
||||
{
|
||||
public List<HybridclrVersionInfo> versions;
|
||||
}
|
||||
|
||||
private class UnityVersion
|
||||
{
|
||||
public int major;
|
||||
public int minor1;
|
||||
public int minor2;
|
||||
public bool isTuanjieEngine;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{major}.{minor1}.{minor2}";
|
||||
}
|
||||
}
|
||||
|
||||
private static readonly Regex s_unityVersionPat = new Regex(@"(\d+)\.(\d+)\.(\d+)");
|
||||
|
||||
private UnityVersion ParseUnityVersion(string versionStr)
|
||||
{
|
||||
var matches = s_unityVersionPat.Matches(versionStr);
|
||||
if (matches.Count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
Match match = matches[matches.Count - 1];
|
||||
int major = int.Parse(match.Groups[1].Value);
|
||||
int minor1 = int.Parse(match.Groups[2].Value);
|
||||
int minor2 = int.Parse(match.Groups[3].Value);
|
||||
bool isTuanjieEngine = versionStr.Contains("t");
|
||||
return new UnityVersion { major = major, minor1 = minor1, minor2 = minor2, isTuanjieEngine = isTuanjieEngine };
|
||||
}
|
||||
|
||||
public string GetCurrentUnityVersionMinCompatibleVersionStr()
|
||||
{
|
||||
return GetMinCompatibleVersion(MajorVersion);
|
||||
}
|
||||
|
||||
public string GetMinCompatibleVersion(int majorVersion)
|
||||
{
|
||||
switch(majorVersion)
|
||||
{
|
||||
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";
|
||||
}
|
||||
}
|
||||
|
||||
public enum CompatibleType
|
||||
{
|
||||
Compatible,
|
||||
MaybeIncompatible,
|
||||
Incompatible,
|
||||
}
|
||||
|
||||
public CompatibleType GetCompatibleType()
|
||||
{
|
||||
UnityVersion version = _curVersion;
|
||||
if (version == null)
|
||||
{
|
||||
return CompatibleType.Incompatible;
|
||||
}
|
||||
if ((version.major == 2019 && version.minor1 < 4)
|
||||
|| (version.major >= 2020 && version.major <= 2022 && version.minor1 < 3))
|
||||
{
|
||||
return CompatibleType.MaybeIncompatible;
|
||||
}
|
||||
return CompatibleType.Compatible;
|
||||
}
|
||||
|
||||
public string HybridclrLocalVersion => _curDefaultVersion?.hybridclr?.branch;
|
||||
|
||||
public string Il2cppPlusLocalVersion => _curDefaultVersion?.il2cpp_plus?.branch;
|
||||
|
||||
|
||||
private string GetIl2CppPathByContentPath(string contentPath)
|
||||
{
|
||||
return $"{contentPath}/il2cpp";
|
||||
}
|
||||
|
||||
public string ApplicationIl2cppPath => GetIl2CppPathByContentPath(EditorApplication.applicationContentsPath);
|
||||
|
||||
public string LocalVersionFile => $"{SettingsUtil.LocalIl2CppDir}/libil2cpp/hybridclr/generated/libil2cpp-version.txt";
|
||||
|
||||
private string ReadLocalVersion()
|
||||
{
|
||||
if (!File.Exists(LocalVersionFile))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return File.ReadAllText(LocalVersionFile, Encoding.UTF8);
|
||||
}
|
||||
|
||||
public void WriteLocalVersion()
|
||||
{
|
||||
InstalledLibil2cppVersion = PackageVersion;
|
||||
File.WriteAllText(LocalVersionFile, PackageVersion, Encoding.UTF8);
|
||||
Debug.Log($"Write installed version:'{PackageVersion}' to {LocalVersionFile}");
|
||||
}
|
||||
|
||||
public void InstallDefaultHybridCLR()
|
||||
{
|
||||
InstallFromLocal(PrepareLibil2cppWithHybridclrFromGitRepo());
|
||||
}
|
||||
|
||||
public bool HasInstalledHybridCLR()
|
||||
{
|
||||
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);
|
||||
BashUtil.RunCommand(workDir, "git", new string[] {"clone", "-b", branch, "--depth", "1", repoUrl, repoDir});
|
||||
}
|
||||
|
||||
private string PrepareLibil2cppWithHybridclrFromGitRepo()
|
||||
{
|
||||
string workDir = SettingsUtil.HybridCLRDataDir;
|
||||
Directory.CreateDirectory(workDir);
|
||||
//BashUtil.RecreateDir(workDir);
|
||||
|
||||
// clone hybridclr
|
||||
string hybridclrRepoURL = HybridCLRSettings.Instance.hybridclrRepoURL;
|
||||
string hybridclrRepoDir = $"{workDir}/{hybridclr_repo_path}";
|
||||
CloneBranch(workDir, hybridclrRepoURL, _curDefaultVersion.hybridclr.branch, hybridclrRepoDir);
|
||||
|
||||
if (!Directory.Exists(hybridclrRepoDir))
|
||||
{
|
||||
throw new Exception($"clone hybridclr fail. url: {hybridclrRepoURL}");
|
||||
}
|
||||
|
||||
// clone il2cpp_plus
|
||||
string il2cppPlusRepoURL = HybridCLRSettings.Instance.il2cppPlusRepoURL;
|
||||
string il2cppPlusRepoDir = $"{workDir}/{il2cpp_plus_repo_path}";
|
||||
CloneBranch(workDir, il2cppPlusRepoURL, _curDefaultVersion.il2cpp_plus.branch, il2cppPlusRepoDir);
|
||||
|
||||
if (!Directory.Exists(il2cppPlusRepoDir))
|
||||
{
|
||||
throw new Exception($"clone il2cpp_plus fail. url: {il2cppPlusRepoDir}");
|
||||
}
|
||||
|
||||
Directory.Move($"{hybridclrRepoDir}/hybridclr", $"{il2cppPlusRepoDir}/libil2cpp/hybridclr");
|
||||
return $"{il2cppPlusRepoDir}/libil2cpp";
|
||||
}
|
||||
|
||||
public void InstallFromLocal(string libil2cppWithHybridclrSourceDir)
|
||||
{
|
||||
RunInitLocalIl2CppData(ApplicationIl2cppPath, libil2cppWithHybridclrSourceDir, _curVersion);
|
||||
}
|
||||
|
||||
private void RunInitLocalIl2CppData(string editorIl2cppPath, string libil2cppWithHybridclrSourceDir, UnityVersion version)
|
||||
{
|
||||
if (GetCompatibleType() == CompatibleType.Incompatible)
|
||||
{
|
||||
Debug.LogError($"Incompatible with current version, minimum compatible version: {GetCurrentUnityVersionMinCompatibleVersionStr()}");
|
||||
return;
|
||||
}
|
||||
string workDir = SettingsUtil.HybridCLRDataDir;
|
||||
Directory.CreateDirectory(workDir);
|
||||
|
||||
// create LocalIl2Cpp
|
||||
string localUnityDataDir = SettingsUtil.LocalUnityDataDir;
|
||||
BashUtil.RecreateDir(localUnityDataDir);
|
||||
|
||||
// copy MonoBleedingEdge
|
||||
BashUtil.CopyDir($"{Directory.GetParent(editorIl2cppPath)}/MonoBleedingEdge", $"{localUnityDataDir}/MonoBleedingEdge", true);
|
||||
|
||||
// copy il2cpp
|
||||
BashUtil.CopyDir(editorIl2cppPath, SettingsUtil.LocalIl2CppDir, true);
|
||||
|
||||
// replace libil2cpp
|
||||
string dstLibil2cppDir = $"{SettingsUtil.LocalIl2CppDir}/libil2cpp";
|
||||
BashUtil.CopyDir($"{libil2cppWithHybridclrSourceDir}", dstLibil2cppDir, true);
|
||||
|
||||
// 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();
|
||||
Debug.Log("Install Sucessfully");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("Installation failed!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 44c8627d126b30d4e9560b1f738264ca
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,113 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
namespace HybridCLR.Editor.Installer
|
||||
{
|
||||
public class InstallerWindow : EditorWindow
|
||||
{
|
||||
private InstallerController _controller;
|
||||
|
||||
private bool _installFromDir;
|
||||
|
||||
private string _installLibil2cppWithHybridclrSourceDir;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
_controller = new InstallerController();
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
var rect = new Rect
|
||||
{
|
||||
x = EditorGUIUtility.currentViewWidth - 24,
|
||||
y = 5,
|
||||
width = 24,
|
||||
height = 24
|
||||
};
|
||||
var content = EditorGUIUtility.IconContent("Settings");
|
||||
content.tooltip = "HybridCLR Settings";
|
||||
if (GUI.Button(rect, content, GUI.skin.GetStyle("IconButton")))
|
||||
{
|
||||
SettingsService.OpenProjectSettings("Project/HybridCLR Settings");
|
||||
}
|
||||
|
||||
bool hasInstall = _controller.HasInstalledHybridCLR();
|
||||
|
||||
GUILayout.Space(10f);
|
||||
|
||||
EditorGUILayout.BeginVertical("box");
|
||||
EditorGUILayout.LabelField($"Installed: {hasInstall}", EditorStyles.boldLabel);
|
||||
GUILayout.Space(10f);
|
||||
|
||||
EditorGUILayout.LabelField($"Package Version: v{_controller.PackageVersion}");
|
||||
GUILayout.Space(5f);
|
||||
EditorGUILayout.LabelField($"Installed Version: v{_controller.InstalledLibil2cppVersion ?? " Unknown"}");
|
||||
GUILayout.Space(5f);
|
||||
|
||||
GUILayout.Space(10f);
|
||||
|
||||
InstallerController.CompatibleType compatibleType = _controller.GetCompatibleType();
|
||||
if (compatibleType != InstallerController.CompatibleType.Incompatible)
|
||||
{
|
||||
if (compatibleType == InstallerController.CompatibleType.MaybeIncompatible)
|
||||
{
|
||||
EditorGUILayout.HelpBox($"Maybe incompatible with current version, recommend minimum compatible version:{_controller.GetCurrentUnityVersionMinCompatibleVersionStr()}", MessageType.Warning);
|
||||
}
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
_installFromDir = EditorGUILayout.Toggle("Copy libil2cpp from local", _installFromDir, GUILayout.MinWidth(100));
|
||||
EditorGUI.BeginDisabledGroup(!_installFromDir);
|
||||
EditorGUILayout.TextField(_installLibil2cppWithHybridclrSourceDir, GUILayout.Width(400));
|
||||
if (GUILayout.Button("Choose", GUILayout.Width(100)))
|
||||
{
|
||||
_installLibil2cppWithHybridclrSourceDir = EditorUtility.OpenFolderPanel("Select libil2cpp", Application.dataPath, "libil2cpp");
|
||||
}
|
||||
EditorGUI.EndDisabledGroup();
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
GUILayout.Space(20f);
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
if (GUILayout.Button("Install", GUILayout.Width(100)))
|
||||
{
|
||||
InstallLocalHybridCLR();
|
||||
GUIUtility.ExitGUI();
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.HelpBox($"Incompatible with current version, minimum compatible version:{_controller.GetCurrentUnityVersionMinCompatibleVersionStr()}", MessageType.Error);
|
||||
}
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
}
|
||||
|
||||
private void InstallLocalHybridCLR()
|
||||
{
|
||||
if (_installFromDir)
|
||||
{
|
||||
if (!Directory.Exists(_installLibil2cppWithHybridclrSourceDir))
|
||||
{
|
||||
Debug.LogError($"Source libil2cpp:'{_installLibil2cppWithHybridclrSourceDir}' doesn't exist.");
|
||||
return;
|
||||
}
|
||||
if (!File.Exists($"{_installLibil2cppWithHybridclrSourceDir}/il2cpp-config.h") || !File.Exists($"{_installLibil2cppWithHybridclrSourceDir}/hybridclr/RuntimeApi.cpp"))
|
||||
{
|
||||
Debug.LogError($"Source libil2cpp:' {_installLibil2cppWithHybridclrSourceDir} ' is invalid");
|
||||
return;
|
||||
}
|
||||
_controller.InstallFromLocal(_installLibil2cppWithHybridclrSourceDir);
|
||||
}
|
||||
else
|
||||
{
|
||||
_controller.InstallDefaultHybridCLR();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 959fbf0bb06629542969354505189240
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user