Пример #1
0
        public static void BuildPackage()
        {
            //1. 解析命令行参数
            ParseCommandLineArgs();

            //2. 修改打包参数
            bool             cancel      = false;
            BuildTargetGroup targetGroup = BuildPipelineCommonTools.BuildUtils.GetBuildTargetGroup(mBatchBuildTargetString);
            BuildTarget      target      = BuildPipelineCommonTools.BuildUtils.GetBuildTarget(targetGroup);

            if (!BuildPipelineValidator.CheckSupportedTarget(targetGroup, target))
            {
                return;
            }
            if (cancel)
            {
                Debug.LogWarning("Build canceled (not enough information)");
                return;
            }

            ProjectBuildPresetSettings buildPresetSettings = new ProjectBuildPresetSettings()
            {
                buildTarget            = target,
                bundleVersionCode      = mBatchBuildNumber,
                version                = mBatchBundleVersion,
                overrideBuildPath      = true,
                buildPath              = mBatchBuildPath,
                overrideExecutableName = true,
                executableName         = mBatchExecutableName,
            };

            //3. 执行打包逻辑
            BuildPipelineExecutor.Build(buildPresetSettings);
        }
Пример #2
0
        public static void BuildBundles()
        {
            //1. 解析命令行参数
            ParseCommandLineArgs();

            BuildTargetGroup targetGroup = BuildPipelineCommonTools.BuildUtils.GetBuildTargetGroup(mBatchBuildTargetString);
            BuildTarget      target      = BuildPipelineCommonTools.BuildUtils.GetBuildTarget(targetGroup);

            if (!BuildPipelineValidator.CheckSupportedTarget(targetGroup, target))
            {
                return;
            }

            //这里调用项目自己的ab打包方法
        }