【m】增加web第一版暂存
All checks were successful
Plugin Library CI / publish (00.BuildOriginality) (push) Successful in 4s
Plugin Library CI / publish (00.StaryEvo) (push) Successful in 4s
Plugin Library CI / publish (00.StaryEvoTools) (push) Successful in 10s
Plugin Library CI / publish (01.HybridCLR) (push) Successful in 5s
Plugin Library CI / publish (02.InformationSave) (push) Successful in 3s
Plugin Library CI / publish (03.YooAsset) (push) Successful in 32s
Plugin Library CI / publish (04.AudioCore) (push) Successful in 3s
Plugin Library CI / publish (05.TableTextConversion) (push) Successful in 4s
Plugin Library CI / publish (06.UIFarme) (push) Successful in 16s
Plugin Library CI / publish (07.RKTools) (push) Successful in 3s
Plugin Library CI / publish (08.UniTask) (push) Successful in 3s
Plugin Library CI / publish (09.CodeChecker) (push) Successful in 16s
Plugin Library CI / publish (10.StoryEditor) (push) Successful in 3s
Plugin Library CI / publish (10.XNode) (push) Successful in 3s
Plugin Library CI / publish (11.PointCloudTools) (push) Successful in 3s
All checks were successful
Plugin Library CI / publish (00.BuildOriginality) (push) Successful in 4s
Plugin Library CI / publish (00.StaryEvo) (push) Successful in 4s
Plugin Library CI / publish (00.StaryEvoTools) (push) Successful in 10s
Plugin Library CI / publish (01.HybridCLR) (push) Successful in 5s
Plugin Library CI / publish (02.InformationSave) (push) Successful in 3s
Plugin Library CI / publish (03.YooAsset) (push) Successful in 32s
Plugin Library CI / publish (04.AudioCore) (push) Successful in 3s
Plugin Library CI / publish (05.TableTextConversion) (push) Successful in 4s
Plugin Library CI / publish (06.UIFarme) (push) Successful in 16s
Plugin Library CI / publish (07.RKTools) (push) Successful in 3s
Plugin Library CI / publish (08.UniTask) (push) Successful in 3s
Plugin Library CI / publish (09.CodeChecker) (push) Successful in 16s
Plugin Library CI / publish (10.StoryEditor) (push) Successful in 3s
Plugin Library CI / publish (10.XNode) (push) Successful in 3s
Plugin Library CI / publish (11.PointCloudTools) (push) Successful in 3s
This commit is contained in:
@@ -11,10 +11,8 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Threading.Tasks;
|
||||
#if HotUpdate
|
||||
using HybridCLR.Editor;
|
||||
using HybridCLR.Editor.Commands;
|
||||
#endif
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Sirenix.OdinInspector;
|
||||
@@ -34,13 +32,6 @@ namespace Stary.Evo.Editor
|
||||
[MenuItem("Evo/Dev/资源打包工具", false, 2)]
|
||||
static void ShowWindows()
|
||||
{
|
||||
#if NotUpdate
|
||||
if (EditorUtility.DisplayDialog("提示", "当前为非热更模式,不支持热更打包功能,是否切换热更模式", "是", "否"))
|
||||
{
|
||||
ChangeHotUpdateSchema.SetHotUpdateMode(HotUpdateMode.HotUpdate);
|
||||
}
|
||||
|
||||
#elif HotUpdate
|
||||
if (CreatAssetWindow.GetCreatDomainAll().Count <= 0)
|
||||
{
|
||||
EditorUtility.DisplayDialog("提示", "不存在Domain元素,无法打开此面板,请先创建Domain元素", "确定");
|
||||
@@ -49,7 +40,6 @@ namespace Stary.Evo.Editor
|
||||
|
||||
window = (BuildAssetWindow)EditorWindow.GetWindow(typeof(BuildAssetWindow));
|
||||
window.Show();
|
||||
#endif
|
||||
}
|
||||
|
||||
protected override void OnDisable()
|
||||
@@ -95,17 +85,17 @@ namespace Stary.Evo.Editor
|
||||
|
||||
#region HyBridCLRBuild
|
||||
|
||||
#if !UNITY_WEBGL
|
||||
[BoxGroup("Build", showLabel: false)]
|
||||
[Title("打包dll(子包仅打一次)", titleAlignment: TitleAlignments.Centered)]
|
||||
[HorizontalGroup("Build/HyBridClrBuildEntity"), HideLabel]
|
||||
public BuildAssetEntity hyBridClrBuildEntity =
|
||||
new BuildAssetEntity("HyBridCLRBuild", "DllBuildTarget", () =>
|
||||
{
|
||||
#if HotUpdate
|
||||
//PrebuildCommand.GenerateAll();
|
||||
CompileDllCommand.CompileDllActiveBuildTarget();
|
||||
#endif
|
||||
});
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -230,8 +220,19 @@ namespace Stary.Evo.Editor
|
||||
$"开始上传至服务器[{selectedPackageNames}],,版本号为[{BuildAssetDataSetting.packageVersion}", "Yes", "No"))
|
||||
{
|
||||
// 新增:打包为zip的逻辑
|
||||
List<string> fileList = new List<string>();
|
||||
#if UNITY_WEBGL
|
||||
var outputPackageDirectory =
|
||||
$"{AssetBundleBuilderHelper.GetDefaultBuildOutputRoot()}/{EditorUserBuildSettings.activeBuildTarget}/{selectedPackageNames}";
|
||||
//拷贝目录
|
||||
string outFilePath = $"{outputPackageDirectory}/{BuildAssetDataSetting.packageVersion}";
|
||||
|
||||
FilesUtils.GetFiles(outFilePath, ref fileList);
|
||||
#else
|
||||
string zipFilePath = BuildZip(BuildAssetDataSetting);
|
||||
await UpdateFileDataResDomain(BuildAssetDataSetting, zipFilePath);
|
||||
fileList.Add(zipFilePath);
|
||||
#endif
|
||||
await UpdateFileDataResDomain(BuildAssetDataSetting, fileList.ToArray());
|
||||
await Task.Delay(1000);
|
||||
EditorUtility.ClearProgressBar();
|
||||
}
|
||||
@@ -355,10 +356,23 @@ namespace Stary.Evo.Editor
|
||||
File.Copy(sourcePath, destinationPath);
|
||||
}
|
||||
|
||||
public static async Task UpdateFileDataResDomain(BuildAssetDataSetting setting, string zipFilePath)
|
||||
public static async Task UpdateFileDataResDomain(BuildAssetDataSetting setting, string[] zipFiles)
|
||||
{
|
||||
string ip = CustomEditorPrefs.GetString("ip");
|
||||
var messageEntity = await WebRequestSystem.PostFile(ip + "/FileLoad/UpLoadFile", new[] { zipFilePath });
|
||||
|
||||
Dictionary<string, string> headers = null;
|
||||
#if UNITY_WEBGL
|
||||
headers = new Dictionary<string, string>()
|
||||
{
|
||||
{ "folderName", setting.packageName },
|
||||
{ "folderVersion", setting.packageVersion },
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
var messageEntity = await WebRequestSystem.PostFile(ip + "/FileLoad/UpLoadFile", zipFiles, headers);
|
||||
|
||||
|
||||
EditorUtility.DisplayProgressBar("提示", $"开始上传{setting.packageName}(上传zip文件)", 0.5f);
|
||||
if (messageEntity.code == 200)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user