void OnFlow_OnBuildingEXE(bool isDebug, bool is64bit) { ReleaseBuildingEXECommand(); if (isDebug) { EditorLog.StartLog("BuildProjectLog", EditorLog.LogLevel.ERROR); //备份文件 CopyFileHelper(GetClient_GamePathRoot() + ResDetailFileName, GetBuildFlowFloderPathRoot() + ResDetailFileName); //告知流程--告知崩溃,如果没有崩溃,后面会删除 CreateFileHelper(GetBuildProjectCarshFlagsPath()); OnBuildProjectStart(); BuildProject_Impl(isDebug, is64bit); if (EditorLog.isHaveFatleErrorLog) { OnBuildProjectFaild(); EditorLog.EndLog(); if (!File.Exists(GetRunFromOutSideProgramPath())) { EditorUtility.DisplayDialog("致命错误", "!!!!!!Debug版本有致命错误,不能进行后续操作!!!!!!稍后会打开对应的日志路径,请将:" + EditorLog.LogPath + "发给程序.", "确定"); System.Diagnostics.Process.Start(Path.GetDirectoryName(EditorLog.LogPath)); } OnFlow_BuildingExeFailed(isDebug, is64bit); } else if (EditorLog.isHaveErroLog) { OnBuildProjectFaild(); EditorLog.EndLog(); if (!File.Exists(GetRunFromOutSideProgramPath())) { EditorUtility.DisplayDialog("发布错误", "Debug版本发布错误,稍后会打开对应的日志路径,请将:" + EditorLog.LogPath + "发给程序.", "确定"); System.Diagnostics.Process.Start(Path.GetDirectoryName(EditorLog.LogPath)); } OnFlow_BuildingExeFailed(isDebug, is64bit); } else { OnBuildProjectSuccess(); OnFlow_BuildingExeSuccess(isDebug, is64bit); EditorLog.LogInfo("工程发布成功!!!!!!!!!!!!!!!!", true); } EditorLog.EndLog(); } else { EditorLog.StartLog("BuildProjectLog", EditorLog.LogLevel.ERROR); OnBuildProjectStart(); CopyFileHelper(GetClient_GamePathRoot() + ResDetailFileName, GetBuildFlowFloderPathRoot() + ResDetailFileName); BuildProject_Impl(isDebug, is64bit); if (EditorLog.isHaveFatleErrorLog) { OnBuildProjectFaild(); EditorLog.EndLog(); if (!File.Exists(GetRunFromOutSideProgramPath())) { EditorUtility.DisplayDialog("致命错误", "!!!Release版本有致命错误,不能进行后续操作!!!稍后会打开对应的日志路径,请将:" + EditorLog.LogPath + "发给程序.", "确定"); System.Diagnostics.Process.Start(Path.GetDirectoryName(EditorLog.LogPath)); } OnFlow_BuildingExeFailed(isDebug, is64bit); } else if (EditorLog.isHaveErroLog) { OnBuildProjectFaild(); EditorLog.EndLog(); if (!File.Exists(GetRunFromOutSideProgramPath())) { EditorUtility.DisplayDialog("发布错误", "Release版本发布错误,稍后会打开对应的日志路径,请将:" + EditorLog.LogPath + "发给程序.", "确定"); System.Diagnostics.Process.Start(Path.GetDirectoryName(EditorLog.LogPath)); } OnFlow_BuildingExeFailed(isDebug, is64bit); } else { OnBuildProjectSuccess(); OnFlow_BuildingExeSuccess(isDebug, is64bit); EditorLog.LogInfo("工程发布成功!!!!!!!!!!!!!!!!", true); } EditorLog.EndLog(); } }
/// <summary> /// 打包流程 /// </summary> void OnFlow_PackingAssetPackage(bool is64bit) { /* * 1.开始流程要创建文件,需要备份资源文件列表 */ ReleasePackignAssetPackageCommand(); //备份资源列表文件 CopyFileHelper(GetEditorAssetPackagePatchRoot() + AssetBundleManager.AssetPackageListPatch, GetBuildFlowPackageListPath()); //告知流程--告知崩溃,如果没有崩溃,后面会删除 CreateFileHelper(GetBuildFlowPackingAssetPackageCarshFlagsPath()); EditorLog.StartLog("BuildPacakgeLog", EditorLog.LogLevel.ERROR); OnBuildFullPackageStart(); BuildFullPackage_Impl(is64bit); if (EditorLog.isHaveFatleErrorLog) { //打包失败 OnBuildFullPackageFaild(); //告知流程--资源发布失败 CreateFileHelper(GetBuildFlowPackingAssetPackageFaildPath()); //告知流程--资源发布没有崩溃 DeleteFileHelper(GetBuildFlowPackingAssetPackageCarshFlagsPath()); EditorLog.EndLog(); if (!File.Exists(GetRunFromOutSideProgramPath())) { EditorUtility.DisplayDialog("致命错误", "!!!!资源有致命错误,不可进行后续从左!!!!稍后会打开对应的日志路径,请将:" + EditorLog.LogPath + "发给程序.", "确定"); System.Diagnostics.Process.Start(Path.GetDirectoryName(EditorLog.LogPath)); } } else if (EditorLog.isHaveErroLog) { //打包失败 OnBuildFullPackageFaild(); //告知流程--资源发布失败 CreateFileHelper(GetBuildFlowPackingAssetPackageFaildPath()); //告知流程--资源发布没有崩溃 DeleteFileHelper(GetBuildFlowPackingAssetPackageCarshFlagsPath()); EditorLog.EndLog(); if (!File.Exists(GetRunFromOutSideProgramPath())) { EditorUtility.DisplayDialog("资源错误", "资源打包错误,稍后会打开对应的日志路径,请将:" + EditorLog.LogPath + "发给程序.", "确定"); System.Diagnostics.Process.Start(Path.GetDirectoryName(EditorLog.LogPath)); } } else { //打包成功 OnBuildFullPackageSuccess(); //告知流程--资源发布成功 CreateFileHelper(GetBuildFlowPackingAssetPackageSuccessdPath()); //告知流程--资源发布没有崩溃 DeleteFileHelper(GetBuildFlowPackingAssetPackageCarshFlagsPath()); } if (NeedToExitEditor) { EditorApplication.Exit(0); } }