[change] Installer使用tag而不是commit id,安装时不必拉取整个branch,大幅缩短安装时间
[change] 升级hybridclr和il2cpp_plus版本main v2.0.5
parent
15f2f0b83c
commit
a9ca9fc613
|
@ -2,18 +2,18 @@
|
|||
"versions": [
|
||||
{
|
||||
"unity_version":"2019",
|
||||
"hybridclr" : { "branch":"main", "hash":"531f98365eebce5d1390175be2b41c41e217d918"},
|
||||
"il2cpp_plus": { "branch":"2019-main", "hash":"ebe5190b0404d1857832bd1d52ebec7c3730a01d"}
|
||||
"hybridclr" : { "branch":"v2.0.1"},
|
||||
"il2cpp_plus": { "branch":"v2019-2.0.1"}
|
||||
},
|
||||
{
|
||||
"unity_version":"2020",
|
||||
"hybridclr" : { "branch":"main", "hash":"531f98365eebce5d1390175be2b41c41e217d918"},
|
||||
"il2cpp_plus": { "branch":"2020-main", "hash":"c6cf54285381d0b03a58126e0d39b6e4d11937b7"}
|
||||
"hybridclr" : { "branch":"v2.0.1"},
|
||||
"il2cpp_plus": { "branch":"v2020-2.0.1"}
|
||||
},
|
||||
{
|
||||
"unity_version":"2021",
|
||||
"hybridclr" : { "branch":"main", "hash":"531f98365eebce5d1390175be2b41c41e217d918"},
|
||||
"il2cpp_plus": { "branch":"2021-main", "hash":"99cd1cbbfc1f637460379e81c9a7776cd3e662ad"}
|
||||
"hybridclr" : { "branch":"v2.0.1"},
|
||||
"il2cpp_plus": { "branch":"v2021-2.0.1"}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -54,7 +54,7 @@ namespace HybridCLR.Editor.Installer
|
|||
{
|
||||
public string branch;
|
||||
|
||||
public string hash;
|
||||
//public string hash;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
|
@ -156,9 +156,9 @@ namespace HybridCLR.Editor.Installer
|
|||
}
|
||||
}
|
||||
|
||||
public string HybridclrLocalVersion => _curDefaultVersion.hybridclr.hash;
|
||||
public string HybridclrLocalVersion => _curDefaultVersion.hybridclr.branch;
|
||||
|
||||
public string Il2cppPlusLocalVersion => _curDefaultVersion.il2cpp_plus.hash;
|
||||
public string Il2cppPlusLocalVersion => _curDefaultVersion.il2cpp_plus.branch;
|
||||
|
||||
|
||||
private string GetIl2CppPathByContentPath(string contentPath)
|
||||
|
@ -169,12 +169,7 @@ namespace HybridCLR.Editor.Installer
|
|||
|
||||
public void InstallDefaultHybridCLR()
|
||||
{
|
||||
InstallLocalHybridCLR(HybridclrLocalVersion, Il2cppPlusLocalVersion);
|
||||
}
|
||||
|
||||
public void InstallLocalHybridCLR(string hybridclrVer, string il2cppPlusVer)
|
||||
{
|
||||
RunInitLocalIl2CppData(GetIl2CppPathByContentPath(EditorApplication.applicationContentsPath), _curVersion, hybridclrVer, il2cppPlusVer);
|
||||
RunInitLocalIl2CppData(GetIl2CppPathByContentPath(EditorApplication.applicationContentsPath), _curVersion);
|
||||
}
|
||||
|
||||
public bool HasInstalledHybridCLR()
|
||||
|
@ -201,14 +196,13 @@ namespace HybridCLR.Editor.Installer
|
|||
#endif
|
||||
}
|
||||
|
||||
void CloneSpeicificCommitId(string workDir, string repoUrl, string branch, string repoDir, string commitId)
|
||||
void CloneBranch(string workDir, string repoUrl, string branch, string repoDir)
|
||||
{
|
||||
BashUtil.RemoveDir(repoDir);
|
||||
BashUtil.RunCommand(workDir, "git", new string[] {"clone", "-b", branch, repoUrl, repoDir});
|
||||
BashUtil.RunCommand($"{repoDir}", "git", new string[] { "checkout", commitId });
|
||||
BashUtil.RunCommand(workDir, "git", new string[] {"clone", "-b", branch, "--depth", "1", repoUrl, repoDir});
|
||||
}
|
||||
|
||||
private void RunInitLocalIl2CppData(string editorIl2cppPath, UnityVersion version, string hybridclrVer, string il2cppPlusVer)
|
||||
private void RunInitLocalIl2CppData(string editorIl2cppPath, UnityVersion version)
|
||||
{
|
||||
if (!IsComaptibleVersion())
|
||||
{
|
||||
|
@ -226,12 +220,12 @@ namespace HybridCLR.Editor.Installer
|
|||
// clone hybridclr
|
||||
string hybridclrRepoURL = HybridCLRSettings.Instance.hybridclrRepoURL;
|
||||
string hybridclrRepoDir = $"{workDir}/{hybridclr_repo_path}";
|
||||
CloneSpeicificCommitId(workDir, hybridclrRepoURL, _curDefaultVersion.hybridclr.branch, hybridclrRepoDir, hybridclrVer);
|
||||
CloneBranch(workDir, hybridclrRepoURL, _curDefaultVersion.hybridclr.branch, hybridclrRepoDir);
|
||||
|
||||
// clone il2cpp_plus
|
||||
string il2cppPlusRepoURL = HybridCLRSettings.Instance.il2cppPlusRepoURL;
|
||||
string il2cppPlusRepoDir = $"{workDir}/{il2cpp_plus_repo_path}";
|
||||
CloneSpeicificCommitId(workDir, il2cppPlusRepoURL, _curDefaultVersion.il2cpp_plus.branch, il2cppPlusRepoDir, il2cppPlusVer);
|
||||
CloneBranch(workDir, il2cppPlusRepoURL, _curDefaultVersion.il2cpp_plus.branch, il2cppPlusRepoDir);
|
||||
|
||||
// create LocalIl2Cpp
|
||||
string localUnityDataDir = SettingsUtil.LocalUnityDataDir;
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
# hybridclr_unity
|
||||
|
||||
Unity Package for HybridCLR
|
||||
|
||||
## 改动日志
|
||||
|
||||
- v2.0.5 Installer使用tag而不是commit id,安装时不必拉取整个branch,大幅缩短安装时间
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "com.focus-creative-games.hybridclr_unity",
|
||||
"version": "2.0.4",
|
||||
"version": "2.0.5",
|
||||
"displayName": "HybridCLR",
|
||||
"description": "Unity package for HybridCLR. It includes editor and runtime scripts and assets for HybridCLR",
|
||||
"category": "Runtime",
|
||||
|
|
Loading…
Reference in New Issue