Skip to content

Commit

Permalink
ios出包同步
Browse files Browse the repository at this point in the history
  • Loading branch information
It-Life committed Nov 4, 2022
1 parent 0325d6e commit 0464d22
Show file tree
Hide file tree
Showing 14 changed files with 685 additions and 280 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.idea
.idea
.vs
.vsconfig
*.csproj
Expand All @@ -23,4 +23,5 @@ Wolong_100
HybridCLRData
Assets/Deer/AssetsHotfix/Assembly
CommitResources/setup/cwRsync4_client_jb51
LubanTools/setup/proto
LubanTools/setup/proto
BuildPackageIOS
6 changes: 3 additions & 3 deletions Assets/Deer/Scenes/DeerLauncher.unity
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1}
m_IndirectSpecularColor: {r: 0.3731193, g: 0.38073996, b: 0.35872698, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
Expand Down Expand Up @@ -132,11 +132,11 @@ PrefabInstance:
m_Modifications:
- target: {fileID: 3697501985222841089, guid: 0c010b67b5d150b45a764cb66e2e007a, type: 3}
propertyPath: m_EditorResourceMode
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3697501985222841479, guid: 0c010b67b5d150b45a764cb66e2e007a, type: 3}
propertyPath: m_ResourceMode
value: 1
value: 2
objectReference: {fileID: 0}
- target: {fileID: 5402190822736383794, guid: 0c010b67b5d150b45a764cb66e2e007a, type: 3}
propertyPath: m_Name
Expand Down
2 changes: 1 addition & 1 deletion Assets/Editor/Build/BuildEventHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public void OnPostprocessPlatform(Platform platform, string workingPath, bool ou
{
Debug.Log("更新资源文件拷贝完毕!");
}
Application.OpenURL(CommitResourcesPath);
Application.OpenURL("file://"+ CommitResourcesPath);
}
BuildEventHandlerLuban.OnPostprocessPlatform(platform, outputPackageSelected, outputFullSelected, outputPackedSelected, CommitResourcesPath);
}
Expand Down
12 changes: 4 additions & 8 deletions Assets/Editor/Build/BuildEventHandlerHybridCLR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ private static void CopyDllBuildFiles(BuildTarget buildTarget)
{
AOTMetaAssembliesHelper.FindAllAOTMetaAssemblies(buildTarget);
FolderUtils.ClearFolder(AssemblyTextAssetPath);
if (!Directory.Exists(AssemblyTextAssetPath))
{
Directory.CreateDirectory(AssemblyTextAssetPath);
}
foreach (var dll in SettingsUtil.HotUpdateAssemblyFiles)
{
string dllPath = $"{SettingsUtil.GetHotUpdateDllsOutputDirByTarget(buildTarget)}/{dll}";
string dllBytesPath = $"{AssemblyTextAssetPath}/{dll}{DeerSettingsUtils.HybridCLRCustomGlobalSettings.AssemblyTextAssetExtension}";
if (!Directory.Exists(AssemblyTextAssetPath))
{
Directory.CreateDirectory(AssemblyTextAssetPath);
}
File.Copy(dllPath, dllBytesPath, true);
}
foreach (var dll in DeerSettingsUtils.HybridCLRCustomGlobalSettings.AOTMetaAssemblies)
Expand All @@ -97,10 +97,6 @@ private static void CopyDllBuildFiles(BuildTarget buildTarget)
continue;
}
string dllBytesPath = $"{AssemblyTextAssetPath}/{dll}{DeerSettingsUtils.HybridCLRCustomGlobalSettings.AssemblyTextAssetExtension}";
if (!Directory.Exists(AssemblyTextAssetPath))
{
Directory.CreateDirectory(AssemblyTextAssetPath);
}
File.Copy(dllPath, dllBytesPath, true);
}
DeerSettingsUtils.SetHybridCLRHotUpdateAssemblies(SettingsUtil.HotUpdateAssemblyFiles);
Expand Down
8 changes: 6 additions & 2 deletions Assets/HybridCLRData/Editor/Custom/AOTMetaAssembliesHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.IO;
using HybridCLR.Editor;
using UnityEditor;

using UnityEngine;

public static class AOTMetaAssembliesHelper
{
Expand Down Expand Up @@ -34,13 +34,17 @@ public static void AOTMetaAssembliesIOS()
public static void FindAllAOTMetaAssemblies(BuildTarget buildTarget)
{
string folder = $"{SettingsUtil.GetAssembliesPostIl2CppStripDir(buildTarget)}";
DeerSettingsUtils.HybridCLRCustomGlobalSettings.AOTMetaAssemblies.Clear();
if (!Directory.Exists(folder))
{
#if UNITY_EDITOR_WIN
Logger.Error($"AOTMetaAssemblies文件夹不存在,因此需要你先构建一次游戏App后再打包。FolderPath:{folder}");
#elif UNITY_EDITOR_OSX
Logger.Error($"AOTMetaAssemblies文件夹不存在,请检查是否制作UnityEditor.CoreModule.dll,并修改覆盖Unity安装路径,然后需要先构建一次游戏App后再打包。FolderPath:{folder}");
#endif
return;
}
DirectoryInfo root = new DirectoryInfo(folder);
DeerSettingsUtils.HybridCLRCustomGlobalSettings.AOTMetaAssemblies.Clear();
foreach (var fileInfo in root.GetFiles("*dll",SearchOption.AllDirectories))
{
string fileName = fileInfo.Name;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0464d22

Please sign in to comment.