【m】build apk 开发

This commit is contained in:
2025-07-02 16:28:08 +08:00
parent ec8b2f7e25
commit 986c610ef2
58 changed files with 1480 additions and 2914 deletions

View File

@@ -1,8 +1,11 @@
using System;
using System.Collections.Generic;
using System.IO;
#if HotUpdate
using HybridCLR.Editor;
using HybridCLR.Editor.Commands;
#endif
using UnityEditor;
using UnityEditor.U2D;
using UnityEngine;
@@ -23,23 +26,6 @@ namespace Stary.Evo.Editor
}
// public static string SpriteRemotedAtlas
// {
// get { return Application.dataPath + "/AddressableRes/SpriteAtlas"; }
// }
//[MenuItem("Evo/Hotfix/BuildAll")]
public static void BuildAll()
{
PrebuildCommand.GenerateAll();
Debug.Log("UnityEvo:Build【GenerateAll】完成");
AddHotfixAddressableDll();
Debug.Log("UnityEvo:Build【CopyHotfixAddressableDll】完成");
AddMark();
Debug.Log("UnityEvo:Build【MarkAsset】完成");
}
//[MenuItem("Evo/Hotfix/Addressable")]
public static void AddHotfixAddressableDll()
@@ -72,6 +58,7 @@ namespace Stary.Evo.Editor
private static void CopyDllHotUpdateAssembly(string domain, string target)
{
#if HotUpdate
//读取打包dll位置
string hotUpdateDir =
$"{SettingsUtil.HybridCLRSettings.hotUpdateDllCompileOutputRootDir}/{EditorUserBuildSettings.activeBuildTarget}";
@@ -104,10 +91,12 @@ namespace Stary.Evo.Editor
FileUtility.Copy(hotfixDllPathPdb, hotfixDllPathPdbTarget, true);
}
}
#endif
}
private static void CopyDllStrippedAOTDllOutputRootDir(string target)
{
#if HotUpdate
//读取打包dll位置
string hotUpdateDir =
$"{SettingsUtil.HybridCLRSettings.strippedAOTDllOutputRootDir}/{EditorUserBuildSettings.activeBuildTarget}";
@@ -118,6 +107,7 @@ namespace Stary.Evo.Editor
$"{target}/Dll/{EditorUserBuildSettings.activeBuildTarget}/{dll}.bytes";
FileUtility.Copy(hotfixDllPath, hotfixDllPathTarget, true);
}
#endif
}
public static void AddMarkAll(List<OneKeyBuildEntity> oneKeyBUildEntities)
@@ -530,5 +520,6 @@ namespace Stary.Evo.Editor
};
ShaderVariantCollector.Run(localSavePath,BuildAssetWindow.GetBuildPackageName(),1000, completedCallback);
}
}
}