namespace XGame.Editor.Build
{
    /// <summary>
    /// 部分枚举值保持和UnityEditor.Build.Reporting.BuildResult一致
    /// </summary>
    public enum BuildErrorCode
    {
        /// <summary>
        /// Unity BuildPlayer 专用，自定义Command禁止使用
        ///   <para>Indicates that the outcome of the build is in an unknown state.</para>
        /// </summary>
        Unknown,
        /// <summary>
        /// Unity BuildPlayer 专用，自定义Command禁止使用
        ///   <para>Indicates that the build completed successfully.</para>
        /// </summary>
        Succeeded,
        /// <summary>
        /// Unity BuildPlayer 专用，自定义Command禁止使用
        ///   <para>Indicates that the build failed.</para>
        /// </summary>
        Failed,
        /// <summary>
        /// Unity BuildPlayer 专用，自定义Command禁止使用
        ///   <para>Indicates that the build was cancelled by the user.</para>
        /// </summary>
        Cancelled,

        #region 自定义Command错误码，初始值从1000起
        /// <summary>
        /// 自定义Command执行完成
        /// </summary>
        CmdCompleted = 999999,
        /// <summary>
        /// 打包配置文件丢失
        /// </summary>
        ConfigFileMissing = 1000,
        /// <summary>
        /// 输出路径无效
        /// </summary>
        OutputPathInvalid,
        /// <summary>
        /// 打包命令无效
        /// </summary>
        CommandExecuteFailed,
        /// <summary>
        /// 打包AB文件失败
        /// </summary>
        BuildAssetBundleFailed,
        /// <summary>
        /// 分布式打包AB主节点失败
        /// </summary>
        DistributedMainNodeFailed,
        /// <summary>
        /// 分布式打包子节点失败
        /// </summary>
        DistributedChildNodeFailed,
        /// <summary>
        /// 序列化配置信息失败
        /// </summary>
        SerializeConfigsFailed,
        /// <summary>
        /// 场景列表为空
        /// </summary>
        NoActiveScene,
        /// <summary>
        /// Version名不符合规范
        /// </summary>
        BundleVersionFailure,
        /// <summary>
        /// i18n转换Key失败
        /// </summary>
        I18NSwapKeyFailed,
        /// <summary>
        /// 生成配置初始化失败
        /// </summary>
        GenPackageConfigsInitFailed,
        /// <summary>
        /// 生成配置失败
        /// </summary>
        GenPackageConfigsFailed,
        /// <summary>
        /// 拷贝资源失败
        /// </summary>
        CopyAssetsFailed,
        /// 打包后处理错误
        /// </summary>
        BuildPostProcessorError,
        /// <summary>
        /// Command未知错误
        /// </summary>
        CmdUnknownError,
        /// <summary>
        /// 自定义Command通用错误码
        /// </summary>
        CmdCustomError,
        /// <summary>
        /// 脚本编译失败
        /// </summary>
        CompileFailed = 2000,
        /// <summary>
        /// Unity编译时拷贝Assembly失败
        /// 该错误需要打包机重启一次Unity尝试二次打包
        /// </summary>
        CopyAssemblyFailed = 2001,
        /// <summary>
        /// 构建hybridclr
        /// </summary>
        BuildHybridclrError,
        /// <summary>
        /// 编译iOS特殊il2cpp
        /// </summary>
        CompileIl2CppForHybridclrError,
        /// <summary>
        /// 加密global-metadata.dat失败
        /// </summary>
        EncryptGlobalMetadataError,
        #endregion
    }
}
