/** 开发 */
        void OnGUI_Develop()
        {
            HGUILayout.BeginCenterHorizontal();
            if (GUILayout.Button("生成版本信息", GUILayout.MinHeight(50), GUILayout.MaxWidth(200)))
            {
                if (currentDvancedSettingData.GetValue(DvancedSettingType.GameConstConfig))
                {
                    GameConstConfig config = GameConstConfig.Load();
                    config.DevelopMode     = true;
                    config.TestVersionMode = false;
                    config.Save();
                }


                if (currentDvancedSettingData.GetValue(DvancedSettingType.Clear_AssetBundleName))
                {
                    AssetBundleEditor.ClearAssetBundleNames();
                    AssetDatabase.RemoveUnusedAssetBundleNames();
                }


                if (currentDvancedSettingData.GetValue(DvancedSettingType.Set_AssetBundleName))
                {
                    AssetBundleEditor.SetNames_Develop();
                }

                if (currentDvancedSettingData.GetValue(DvancedSettingType.GeneratorLoadAssetListCsv))
                {
                    LoadAssetListCsv.Generator();
                }
            }
            HGUILayout.EndCenterHorizontal();
        }
Esempio n. 2
0
        /** 补丁 */
        void OnGUI_Patch()
        {
            Version version = patchVersion;

            if (version.revised <= 0)
            {
                version.revised = 1;
            }

            GUILayout.BeginHorizontal(HGUILayout.boxMPStyle, GUILayout.Height(50));
            EditorGUILayout.LabelField("参照App版本", HGUILayout.labelCenterStyle, GUILayout.Width(150), GUILayout.Height(25));
            int preCompareIndex = compareIndex;

            compareIndex = EditorGUILayout.Popup(compareIndex, VersionList.appVersionStrArr);
            if (preCompareIndex != compareIndex && compareIndex != -1)
            {
                Version v = VersionList.appVersionList[compareIndex];

                compareVersion.Copy(v);
                version.Copy(VersionList.GetLastAppRevised(compareVersion));
                version.verType = VersionType.Patch;
                version.revised++;
            }
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            HGUILayout.Version("补丁版本", version, VersionType.Patch);
            GUILayout.BeginVertical();

            if (GUILayout.Button("最后一次", GUILayout.Width(100), GUILayout.Height(30)))
            {
                VersionList.Read(true);

                compareVersion.Copy(VersionList.lastAppVersion);

                version.Copy(VersionList.GetLastAppRevised(compareVersion));
                version.verType = VersionType.Patch;
                compareIndex    = VersionList.appVersionStrList.IndexOf(compareVersion.ToString());
            }

            if (GUILayout.Button("自动", GUILayout.Width(100), GUILayout.Height(30)))
            {
                VersionList.Read(true);

                compareVersion.Copy(VersionList.lastAppVersion);
                version.Copy(VersionList.GetLastAppRevised(compareVersion));
                version.verType = VersionType.Patch;
                version.revised++;
                compareIndex = VersionList.appVersionStrList.IndexOf(compareVersion.ToString());
            }
            GUILayout.EndVertical();
            GUILayout.EndHorizontal();

            GUILayout.Space(20);


            HGUILayout.BeginCenterHorizontal();
            if (GUILayout.Button("生成版本信息", GUILayout.MinHeight(50), GUILayout.MaxWidth(200)))
            {
                version.SetNowDatetime();

                bool isRefresh = false;
                if (currentDvancedSettingData.GetValue(DvancedSettingType.ClearAllPlatformDirctory))
                {
                    PathUtil.ClearAllPlatformDirctory();
                    isRefresh = true;
                }

                if (currentDvancedSettingData.GetValue(DvancedSettingType.ClearOtherPlatformDirctory))
                {
                    PathUtil.ClearOtherPlatformDirctory(runtimePlatform);
                    isRefresh = true;
                }

                if (currentDvancedSettingData.GetValue(DvancedSettingType.ClearTestData))
                {
                    PathUtil.ClearTestData();
                    isRefresh = true;
                }

                if (isRefresh)
                {
                    AssetDatabase.Refresh();
                }

                if (currentDvancedSettingData.GetValue(DvancedSettingType.Clear_AssetBundleName))
                {
                    AssetBundleEditor.ClearAssetBundleNames();
                    AssetDatabase.RemoveUnusedAssetBundleNames();
                }


                if (currentDvancedSettingData.GetValue(DvancedSettingType.Set_AssetBundleName))
                {
                    AssetBundleEditor.SetNames();
                }

                if (currentDvancedSettingData.GetValue(DvancedSettingType.AB_AssetBundle))
                {
                    AssetBundleEditor.BuildAssetBundles();
                }

                if (currentDvancedSettingData.GetValue(DvancedSettingType.AB_luacode))
                {
                    AB.Lua();
                }

                if (currentDvancedSettingData.GetValue(DvancedSettingType.AB_config))
                {
                    AB.Config();
                }



                if (currentDvancedSettingData.GetValue(DvancedSettingType.GameConstConfig))
                {
                    GameConstConfig config = GameConstConfig.Load();
                    config.DevelopMode = false;
                    config.Version     = version.ToConfig();
                    config.Save();
                }


                if (currentDvancedSettingData.GetValue(DvancedSettingType.GeneratorLoadAssetListCsv))
                {
                    LoadAssetListCsv.Generator();
                }

                if (currentDvancedSettingData.GetValue(DvancedSettingType.GeneratorStreamingAssetsFilesCSV))
                {
                    FilesCsvForStreamingAssets.Generator();
                }


                if (currentDvancedSettingData.GetValue(DvancedSettingType.PlayerSettings))
                {
                    SetPlayerSettings(runtimePlatform);
                }

                if (currentDvancedSettingData.GetValue(DvancedSettingType.PlayerSettingsVersion))
                {
                    SetPlayerSettingsVersion(appVersion);
                }

                if (currentDvancedSettingData.GetValue(DvancedSettingType.GenerateVersionInfo))
                {
                    FilesCsvForStreamingAssets.CopyStreamFilesCsvToVersion(version);
                }


                if (currentDvancedSettingData.GetValue(DvancedSettingType.GeneratorUpdateAssetList))
                {
                    FilesCsvForStreamingAssets.GeneratorUpdateList(compareVersion);
                }
            }
            HGUILayout.EndCenterHorizontal();
        }
Esempio n. 3
0
        void OnGUI()
        {
            gitServerEditor.Init();
            Init();

            scrollPos = EditorGUILayout.BeginScrollView(scrollPos);

            GUILayout.Space(20);
            gitServerEditor.OnGUI();

            GUILayout.Space(20);

            // center
            foldout_center = EditorGUILayout.Foldout(foldout_center, "发行商选择");
            if (foldout_center)
            {
                GUILayout.BeginVertical(HGUILayout.boxMPStyle, GUILayout.Height(50));
                for (int i = 0; i < centerList.Count; i++)
                {
                    CenterSwitcher.CenterItem item = centerList[i];
                    item.gitToggle = EditorGUILayout.ToggleLeft(item.name, item.gitToggle, GUILayout.Width(250));
                }

                GUILayout.Space(20);

                HGUILayout.BeginCenterHorizontal();
                if (GUILayout.Button("全选", GUILayout.MinHeight(30), GUILayout.MaxWidth(200)))
                {
                    for (int i = 0; i < centerList.Count; i++)
                    {
                        CenterSwitcher.CenterItem item = centerList[i];
                        item.gitToggle = true;
                    }
                }


                GUILayout.Space(20);

                if (GUILayout.Button("全不选", GUILayout.MinHeight(30), GUILayout.MaxWidth(200)))
                {
                    for (int i = 0; i < CenterSwitcher.centerItemList.Length; i++)
                    {
                        CenterSwitcher.CenterItem item = CenterSwitcher.centerItemList[i];
                        item.gitToggle = false;
                    }
                }

                HGUILayout.EndCenterHorizontal();

                GUILayout.EndVertical();
            }

            GUILayout.Space(30);

            // Res
            foldout_res = EditorGUILayout.Foldout(foldout_res, "资源");
            if (foldout_res)
            {
                GUILayout.BeginVertical(HGUILayout.boxMPStyle, GUILayout.Height(50));


                //  选项
                foldout_res_popups = EditorGUILayout.Foldout(foldout_res_popups, "选项");
                if (foldout_res_popups)
                {
                    GUILayout.BeginVertical(HGUILayout.boxMPStyle, GUILayout.Height(50));
                    copyType = (CopyType)EditorGUILayout.EnumPopup("拷贝内容方式: ", copyType);
                    GUILayout.Space(20);
                    alreadyExistTagPlan = (AlreadyExistTagPlan)EditorGUILayout.EnumPopup("如果已经存在相同tag执行方案: ", alreadyExistTagPlan);

                    GUILayout.Space(20);
                    gitNeedPassword = EditorGUILayout.ToggleLeft("git是否需要密码提交", gitNeedPassword);
                    gitPassword     = EditorGUILayout.TextField("git密码:", gitPassword);

                    GUILayout.Space(20);
                    gitPullVisiableWindow = EditorGUILayout.ToggleLeft("Pull时是否显示命令窗口", gitPullVisiableWindow);

                    GUILayout.Space(20);
                    versionReadFile = (VersionReadFile)EditorGUILayout.EnumPopup("版本号读取目录: ", versionReadFile);
                    EditorGUILayout.LabelField(version);

                    GUILayout.EndVertical();
                }
                GUILayout.Space(20);



                HGUILayout.BeginCenterHorizontal();
                if (GUILayout.Button("推送资源", GUILayout.MinHeight(50), GUILayout.MaxWidth(200)))
                {
                    Step_Begin();
                    Step_CheckBranch();

                    if (stepIsContinue)
                    {
                        Step_CheckTag();
                    }

                    if (stepIsContinue)
                    {
                        Step_Copy();
                    }

                    if (stepIsContinue)
                    {
                        Step_CommitBranch();
                    }

                    if (stepIsContinue)
                    {
                        Step_AddTag();
                    }

                    if (stepIsContinue)
                    {
                        Step_PushBranchAndTag();
                    }
                }
                HGUILayout.EndCenterHorizontal();



                foldout_res_option = EditorGUILayout.Foldout(foldout_res_option, "高级");
                if (foldout_res_option)
                {
                    GUILayout.BeginVertical(HGUILayout.boxMPStyle, GUILayout.Height(50));


                    if (GUILayout.Button("Begin", GUILayout.MinHeight(30)))
                    {
                        Step_Begin();
                    }


                    if (GUILayout.Button("检测分支", GUILayout.MinHeight(30)))
                    {
                        Step_CheckBranch();
                    }


                    if (GUILayout.Button("检查tag是否已经存在", GUILayout.MinHeight(30)))
                    {
                        Step_CheckTag();
                    }

                    if (GUILayout.Button("拷贝内容", GUILayout.MinHeight(30)))
                    {
                        Step_Copy();
                    }


                    if (GUILayout.Button("commit branch", GUILayout.MinHeight(30)))
                    {
                        Step_CheckTag();
                        Step_CommitBranch();
                    }

                    if (GUILayout.Button("add tag", GUILayout.MinHeight(30)))
                    {
                        Step_CheckTag();
                        if (stepIsContinue)
                        {
                            Step_AddTag();
                        }
                    }



                    if (GUILayout.Button("push", GUILayout.MinHeight(30)))
                    {
                        Step_PushBranchAndTag();
                    }



                    GUILayout.EndVertical();
                }


                foldout_res_option2 = EditorGUILayout.Foldout(foldout_res_option2, "其他");
                if (foldout_res_option2)
                {
                    GUILayout.BeginVertical(HGUILayout.boxMPStyle, GUILayout.Height(50));
                    if (GUILayout.Button("清除所有本地tag", GUILayout.MinHeight(30)))
                    {
                        ClearAllTagLoacl();
                    }


                    if (GUILayout.Button("清除所有服务器tag", GUILayout.MinHeight(30)))
                    {
                        ClearAllTagOrigin();
                    }

                    GUILayout.EndVertical();
                }

                GUILayout.EndVertical();
            }


            // 版本信息
            foldout_verinfo = EditorGUILayout.Foldout(foldout_verinfo, "版本信息");
            if (foldout_verinfo)
            {
                GUILayout.BeginVertical(HGUILayout.boxMPStyle, GUILayout.Height(50));
                HGUILayout.BeginCenterHorizontal();
                if (GUILayout.Button("推送正式版本信息", GUILayout.MinHeight(50), GUILayout.MaxWidth(200)))
                {
                    Step_Begin();
                    Step_Verinfo_CopyFromTest();
                    Step_CommitBranch(true);
                    if (stepIsContinue)
                    {
                        Step_PushBranch();
                    }
                }

                if (GUILayout.Button("打开版本信息编辑面板", GUILayout.MinHeight(50), GUILayout.MaxWidth(200)))
                {
                    VersionInfoWindow.Open();
                }
                HGUILayout.EndCenterHorizontal();


                //  选项
                foldout_verinfo_option = EditorGUILayout.Foldout(foldout_verinfo_option, "选项");
                if (foldout_verinfo_option)
                {
                    GUILayout.BeginVertical(HGUILayout.boxMPStyle, GUILayout.Height(50));

                    if (GUILayout.Button("Copy From Test", GUILayout.MinHeight(30)))
                    {
                        Step_Verinfo_CopyFromTest();
                    }


                    if (GUILayout.Button("commit branch", GUILayout.MinHeight(30)))
                    {
                        Step_CommitBranch(true);
                    }



                    if (GUILayout.Button("push branch", GUILayout.MinHeight(30)))
                    {
                        Step_PushBranch();
                    }


                    GUILayout.EndVertical();
                }

                GUILayout.EndVertical();
            }

            EditorGUILayout.EndScrollView();
        }
Esempio n. 4
0
        void OnGUI()
        {
            VersionList.Read();



            TabType tabType = HGUILayout.TabGroup <TabType>(tabGroupData);



            scrollPos = EditorGUILayout.BeginScrollView(scrollPos);


            GUILayout.Space(20);


            currentDvancedSettingData = dvancedSettingDataDict[tabType];
            switch (tabType)
            {
            case TabType.Develop:
                OnGUI_Develop();
                break;

            case TabType.App:
                OnGUI_App();
                break;

            case TabType.Patch:
                OnGUI_Patch();
                break;
            }



            currentDvancedSettingData.foldout = EditorGUILayout.Foldout(currentDvancedSettingData.foldout, "执行选项");

            if (currentDvancedSettingData.foldout)
            {
                GUILayout.BeginVertical(HGUILayout.boxMPStyle);
                for (int i = 0; i < currentDvancedSettingData.list.Count; i++)
                {
                    DvancedSettingItem item = currentDvancedSettingData.list[i];



                    GUILayout.BeginHorizontal();
                    item.value = EditorGUILayout.ToggleLeft(item.name, item.value, GUILayout.Width(250));



                    if (GUILayout.Button(item.name, GUILayout.Width(250)))
                    {
                        switch (item.type)
                        {
                        case DvancedSettingType.ClearAllPlatformDirctory:
                            PathUtil.ClearAllPlatformDirctory();
                            AssetDatabase.Refresh();
                            break;


                        case DvancedSettingType.ClearOtherPlatformDirctory:
                            PathUtil.ClearOtherPlatformDirctory(runtimePlatform);
                            AssetDatabase.Refresh();
                            break;


                        case DvancedSettingType.ClearTestData:
                            PathUtil.ClearTestData();
                            AssetDatabase.Refresh();
                            break;


                        case DvancedSettingType.AB_luacode:
                            AB.Lua();
                            break;

                        case DvancedSettingType.AB_config:
                            AB.Config();
                            break;



                        case DvancedSettingType.Clear_AssetBundleName:
                            AssetBundleEditor.ClearAssetBundleNames();
                            AssetDatabase.RemoveUnusedAssetBundleNames();
                            break;

                        case DvancedSettingType.Set_AssetBundleName:
                            switch (tabType)
                            {
                            case TabType.Develop:
                                AssetBundleEditor.SetNames_Develop();
                                break;

                            default:
                                AssetBundleEditor.SetNames();
                                break;
                            }

                            break;


                        case DvancedSettingType.AB_AssetBundle:
                            AssetBundleEditor.BuildAssetBundles();
                            break;



                        case DvancedSettingType.GameConstConfig:

                            GameConstConfig config = GameConstConfig.Load();
                            switch (tabType)
                            {
                            case TabType.Develop:
                                config.DevelopMode     = true;
                                config.TestVersionMode = false;
                                break;

                            case TabType.App:
                                config.DevelopMode = false;
                                config.Version     = appVersion.ToConfig();
                                break;

                            case TabType.Patch:
                                config.DevelopMode = false;
                                config.Version     = patchVersion.ToConfig();
                                break;
                            }

                            config.Save();
                            break;


                        case DvancedSettingType.GeneratorStreamingAssetsFilesCSV:
                            FilesCsvForStreamingAssets.Generator();
                            break;


                        case DvancedSettingType.GeneratorLoadAssetListCsv:
                            LoadAssetListCsv.Generator();
                            break;


                        case DvancedSettingType.PlayerSettings:
                            SetPlayerSettings(runtimePlatform);
                            break;

                        case DvancedSettingType.PlayerSettingsVersion:
                            switch (tabType)
                            {
                            case TabType.App:
                                SetPlayerSettingsVersion(appVersion);
                                break;

                            case TabType.Patch:
                                SetPlayerSettingsVersion(patchVersion);
                                break;
                            }
                            break;


                        case DvancedSettingType.GenerateVersionInfo:
                            switch (tabType)
                            {
                            case TabType.App:
                                appVersion.SetNowDatetime();
                                FilesCsvForStreamingAssets.CopyStreamFilesCsvToVersion(appVersion);
                                break;

                            case TabType.Patch:
                                patchVersion.SetNowDatetime();
                                FilesCsvForStreamingAssets.CopyStreamFilesCsvToVersion(patchVersion);
                                break;
                            }
                            break;

                        case DvancedSettingType.GeneratorUpdateAssetList:
                            switch (tabType)
                            {
                            case TabType.App:
                                FilesCsvForStreamingAssets.GeneratorUpdateList(null);
                                break;

                            case TabType.Patch:
                                FilesCsvForStreamingAssets.GeneratorUpdateList(compareVersion);
                                break;
                            }
                            break;
                        }
                    }

                    GUILayout.EndHorizontal();

                    GUILayout.Space(10);
                }
                GUILayout.EndVertical();
            }



            switch (tabType)
            {
            case TabType.App:
            case TabType.Patch:
                OnGUI_AssetBundleServer();
                OnGUI_TestVersionModel();
                break;
            }

            EditorGUILayout.EndScrollView();
        }
Esempio n. 5
0
        public void OnGUI()
        {
            if (index == -1)
            {
                index = LaunchAssetBundleServer.ServerRootPath == AssetManagerSetting.EditorAssetBundleServerRoot_WWW ? 0 : 1;

                if (index == 0)
                {
                    selectRoot = AssetManagerSetting.EditorAssetBundleServerRoot_WWW;
                }
                else
                {
                    selectRoot = AssetManagerSetting.EditorAssetBundleServerRoot_StreamingAssets;
                }
            }

            GUILayout.BeginHorizontal(HGUILayout.boxMPStyle, GUILayout.Height(50));
            EditorGUILayout.LabelField("选择服务器目录", HGUILayout.labelCenterStyle, GUILayout.Width(150), GUILayout.Height(25));
            int preSelectIndex = index;

            index = EditorGUILayout.Popup(index, serverRoots);
            if (preSelectIndex != index)
            {
                preSelectIndex = index;
                if (index == 0)
                {
                    selectRoot = AssetManagerSetting.EditorAssetBundleServerRoot_WWW;
                }
                else
                {
                    selectRoot = AssetManagerSetting.EditorAssetBundleServerRoot_StreamingAssets;
                }
            }
            GUILayout.EndHorizontal();


            if (index == 0)
            {
                HGUILayout.BeginCenterHorizontal();
                if (GUILayout.Button("清除该目录数据", GUILayout.MinHeight(30), GUILayout.MaxWidth(200)))
                {
                    PathUtil.ClearDirectory(selectRoot + "/StreamingAssets");
                }

                GUILayout.Space(20);

                if (GUILayout.Button("复制更新数据到该目录", GUILayout.MinHeight(30), GUILayout.MaxWidth(200)))
                {
                    AssetBundleServerData.CopyUpdateAsset(selectRoot + "/StreamingAssets");
                }


                GUILayout.Space(20);

                if (GUILayout.Button("复制所有数据到该目录", GUILayout.MinHeight(30), GUILayout.MaxWidth(200)))
                {
                    AssetBundleServerData.CopyAlleAsset(selectRoot + "/StreamingAssets");
                }

                HGUILayout.EndCenterHorizontal();
            }


            if (LaunchAssetBundleServer.IsRunning())
            {
                GUILayout.BeginVertical(HGUILayout.boxMPStyle, GUILayout.Height(50));
                EditorGUILayout.LabelField("Host: ", LaunchAssetBundleServer.Host);
                EditorGUILayout.LabelField("RuningRoot: ", LaunchAssetBundleServer.ServerRootPath);
                EditorGUILayout.LabelField("SelectRoot: ", selectRoot);
                GUILayout.EndVertical();



                HGUILayout.BeginCenterHorizontal();
                if (GUILayout.Button("关闭服务器", GUILayout.MinHeight(50), GUILayout.MaxWidth(200)))
                {
                    LaunchAssetBundleServer.KillRunningAssetBundleServer();
                    LaunchCheckServer.KillRunningServer();
                }

                GUILayout.Space(20);

                if (GUILayout.Button("重启服务器", GUILayout.MinHeight(50), GUILayout.MaxWidth(200)))
                {
                    LaunchAssetBundleServer.KillRunningAssetBundleServer();

                    LaunchAssetBundleServer.ServerRootPath = selectRoot;
                    LaunchAssetBundleServer.Run();
                }
                HGUILayout.EndCenterHorizontal();
            }
            else
            {
                GUILayout.BeginVertical(HGUILayout.boxMPStyle, GUILayout.Height(50));
                EditorGUILayout.LabelField("SelectRoot: ", selectRoot);
                GUILayout.EndVertical();

                HGUILayout.BeginCenterHorizontal();
                if (GUILayout.Button("启动服务器", GUILayout.MinHeight(50), GUILayout.MaxWidth(200)))
                {
                    LaunchAssetBundleServer.ServerRootPath = selectRoot;
                    LaunchAssetBundleServer.Run();
                    LaunchCheckServer.Run();
                }
                HGUILayout.EndCenterHorizontal();
            }


            GUILayout.Space(20);
        }
Esempio n. 6
0
        /** App */
        void OnGUI_App()
        {
            Version version = appVersion;


            GUILayout.BeginHorizontal();
            HGUILayout.Version("App版本", version, VersionType.App);
            GUILayout.BeginVertical();
            if (GUILayout.Button("最后一次", GUILayout.Width(100), GUILayout.Height(30)))
            {
                VersionList.Read(true);

                version.Copy(VersionList.lastAppVersion);
                version.revised = 0;
                version.verType = VersionType.App;
            }

            if (GUILayout.Button("自动", GUILayout.Width(100), GUILayout.Height(30)))
            {
                VersionList.Read(true);

                version.Copy(VersionList.lastAppVersion);
                version.minor++;
                version.revised = 0;
                version.verType = VersionType.App;
            }
            GUILayout.EndVertical();
            GUILayout.EndHorizontal();

            GUILayout.Space(20);


            HGUILayout.BeginCenterHorizontal();
            if (GUILayout.Button("生成版本信息", GUILayout.MinHeight(50), GUILayout.MaxWidth(200)))
            {
                version.SetNowDatetime();


                bool isRefresh = false;
                if (currentDvancedSettingData.GetValue(DvancedSettingType.ClearAllPlatformDirctory))
                {
                    PathUtil.ClearAllPlatformDirctory();
                    isRefresh = true;
                }

                if (currentDvancedSettingData.GetValue(DvancedSettingType.ClearOtherPlatformDirctory))
                {
                    PathUtil.ClearOtherPlatformDirctory(runtimePlatform);
                    isRefresh = true;
                }

                if (currentDvancedSettingData.GetValue(DvancedSettingType.ClearTestData))
                {
                    PathUtil.ClearTestData();
                    isRefresh = true;
                }

                if (isRefresh)
                {
                    AssetDatabase.Refresh();
                }

                if (currentDvancedSettingData.GetValue(DvancedSettingType.Clear_AssetBundleName))
                {
                    AssetBundleEditor.ClearAssetBundleNames();
                    AssetDatabase.RemoveUnusedAssetBundleNames();
                }


                if (currentDvancedSettingData.GetValue(DvancedSettingType.Set_AssetBundleName))
                {
                    AssetBundleEditor.SetNames();
                }

                if (currentDvancedSettingData.GetValue(DvancedSettingType.AB_AssetBundle))
                {
                    AssetBundleEditor.BuildAssetBundles();
                }

                if (currentDvancedSettingData.GetValue(DvancedSettingType.AB_luacode))
                {
                    AB.Lua();
                }

                if (currentDvancedSettingData.GetValue(DvancedSettingType.AB_config))
                {
                    AB.Config();
                }



                if (currentDvancedSettingData.GetValue(DvancedSettingType.GameConstConfig))
                {
                    GameConstConfig config = GameConstConfig.Load();
                    config.DevelopMode = false;
                    config.Version     = version.ToConfig();
                    config.Save();
                }


                if (currentDvancedSettingData.GetValue(DvancedSettingType.GeneratorLoadAssetListCsv))
                {
                    LoadAssetListCsv.Generator();
                }

                if (currentDvancedSettingData.GetValue(DvancedSettingType.GeneratorStreamingAssetsFilesCSV))
                {
                    FilesCsvForStreamingAssets.Generator();
                }


                if (currentDvancedSettingData.GetValue(DvancedSettingType.PlayerSettings))
                {
                    SetPlayerSettings(runtimePlatform);
                }

                if (currentDvancedSettingData.GetValue(DvancedSettingType.PlayerSettingsVersion))
                {
                    SetPlayerSettingsVersion(appVersion);
                }

                if (currentDvancedSettingData.GetValue(DvancedSettingType.GenerateVersionInfo))
                {
                    FilesCsvForStreamingAssets.CopyStreamFilesCsvToVersion(version);
                }


                if (currentDvancedSettingData.GetValue(DvancedSettingType.GeneratorUpdateAssetList))
                {
                    FilesCsvForStreamingAssets.GeneratorUpdateList(null);
                }
            }
            HGUILayout.EndCenterHorizontal();
        }
Esempio n. 7
0
        void OnGUI()
        {
            gitServerEditor.Init();


            scrollPos = EditorGUILayout.BeginScrollView(scrollPos);

            GUILayout.Space(20);
            gitServerEditor.OnGUI();
            GUILayout.Space(30);

            // center
            foldout_center = EditorGUILayout.Foldout(foldout_center, "发行商选择");
            if (foldout_center)
            {
                GUILayout.BeginVertical(HGUILayout.boxMPStyle, GUILayout.Height(50));
                for (int i = 0; i < centerList.Count; i++)
                {
                    CenterSwitcher.CenterItem item = centerList[i];
                    item.gitToggle = EditorGUILayout.ToggleLeft(item.name, item.gitToggle, GUILayout.Width(250));
                }

                GUILayout.Space(20);

                HGUILayout.BeginCenterHorizontal();
                if (GUILayout.Button("全选", GUILayout.MinHeight(30), GUILayout.MaxWidth(200)))
                {
                    for (int i = 0; i < centerList.Count; i++)
                    {
                        CenterSwitcher.CenterItem item = centerList[i];
                        item.gitToggle = true;
                    }
                }


                GUILayout.Space(20);

                if (GUILayout.Button("全不选", GUILayout.MinHeight(30), GUILayout.MaxWidth(200)))
                {
                    for (int i = 0; i < CenterSwitcher.centerItemList.Length; i++)
                    {
                        CenterSwitcher.CenterItem item = CenterSwitcher.centerItemList[i];
                        item.gitToggle = false;
                    }
                }

                HGUILayout.EndCenterHorizontal();

                GUILayout.EndVertical();
            }

            GUILayout.Space(30);



            // global
            foldout_global = EditorGUILayout.Foldout(foldout_global, "全局");
            if (foldout_global)
            {
                if (GUILayout.Button("刷新", GUILayout.MinHeight(25)))
                {
                    _versionInfo = null;
                }
                GUILayout.Space(30);


                GUILayout.BeginVertical(HGUILayout.boxMPStyle, GUILayout.ExpandWidth(true));
                versionInfo.version = EditorGUILayout.TextField("版本号: ", versionInfo.version, GUILayout.ExpandWidth(true));
                if (GUILayout.Button("修改选择的应用商", GUILayout.MinHeight(25), GUILayout.MaxWidth(200)))
                {
                    for (int i = 0; i < CenterSwitcher.centerItemList.Length; i++)
                    {
                        CenterSwitcher.CenterItem item = CenterSwitcher.centerItemList[i];
                        if (item.gitToggle)
                        {
                            VersionInfo itemVerInfo = VersionInfo.Load(gitServerEditor.GetGitVerinfoPath(item.name, true));
                            itemVerInfo.version = versionInfo.version;
                            itemVerInfo.Save(gitServerEditor.GetGitVerinfoPath(item.name, true));
                        }
                    }
                }
                GUILayout.Space(30);

                EditorGUILayout.LabelField("大版本更新通知:");
                versionInfo.noteDownApp = EditorGUILayout.TextArea(versionInfo.noteDownApp, GUILayout.ExpandWidth(true), GUILayout.Height(60));
                if (GUILayout.Button("修改选择的应用商", GUILayout.MinHeight(25), GUILayout.MaxWidth(200)))
                {
                    for (int i = 0; i < CenterSwitcher.centerItemList.Length; i++)
                    {
                        CenterSwitcher.CenterItem item = CenterSwitcher.centerItemList[i];
                        if (item.gitToggle)
                        {
                            VersionInfo itemVerInfo = VersionInfo.Load(gitServerEditor.GetGitVerinfoPath(item.name, true));
                            itemVerInfo.noteDownApp = versionInfo.noteDownApp;
                            itemVerInfo.Save(gitServerEditor.GetGitVerinfoPath(item.name, true));
                        }
                    }
                }

                GUILayout.Space(30);
                EditorGUILayout.LabelField("热更新通知:");
                versionInfo.noteHostUpdate = EditorGUILayout.TextArea(versionInfo.noteHostUpdate, GUILayout.ExpandWidth(true), GUILayout.Height(60));
                if (GUILayout.Button("修改选择的应用商", GUILayout.MinHeight(25), GUILayout.MaxWidth(200)))
                {
                    for (int i = 0; i < CenterSwitcher.centerItemList.Length; i++)
                    {
                        CenterSwitcher.CenterItem item = CenterSwitcher.centerItemList[i];
                        if (item.gitToggle)
                        {
                            VersionInfo itemVerInfo = VersionInfo.Load(gitServerEditor.GetGitVerinfoPath(item.name, true));
                            itemVerInfo.noteHostUpdate = versionInfo.noteHostUpdate;
                            itemVerInfo.Save(gitServerEditor.GetGitVerinfoPath(item.name, true));
                        }
                    }
                }



                GUILayout.Space(30);
                versionInfo.isClose = EditorGUILayout.ToggleLeft("是否停服", versionInfo.isClose == 1) ? 1 : 0;
                if (GUILayout.Button("修改选择的应用商", GUILayout.MinHeight(25), GUILayout.MaxWidth(200)))
                {
                    for (int i = 0; i < CenterSwitcher.centerItemList.Length; i++)
                    {
                        CenterSwitcher.CenterItem item = CenterSwitcher.centerItemList[i];
                        if (item.gitToggle)
                        {
                            VersionInfo itemVerInfo = VersionInfo.Load(gitServerEditor.GetGitVerinfoPath(item.name, true));
                            itemVerInfo.isClose = versionInfo.isClose;
                            itemVerInfo.Save(gitServerEditor.GetGitVerinfoPath(item.name, true));
                        }
                    }
                }
                GUILayout.EndVertical();
            }


            // center list
            foldout_centerList = EditorGUILayout.Foldout(foldout_centerList, "版本信息列表");
            if (foldout_centerList)
            {
                if (GUILayout.Button("刷新所有", GUILayout.MinHeight(25)))
                {
                    for (int i = 0; i < CenterSwitcher.centerItemList.Length; i++)
                    {
                        CenterSwitcher.CenterItem item = CenterSwitcher.centerItemList[i];
                        item.versionInfo = null;
                    }
                }
                GUILayout.Space(20);


                for (int i = 0; i < CenterSwitcher.centerItemList.Length; i++)
                {
                    GUILayout.Space(20);
                    CenterSwitcher.CenterItem item = CenterSwitcher.centerItemList[i];
                    GUILayout.BeginVertical(HGUILayout.boxMPStyle, GUILayout.ExpandWidth(true));

                    EditorGUILayout.LabelField(item.name + "  ( " + gitServerEditor.GetGitVerinfoPath(item.name, true).Replace(gitServerEditor.gitVerinfoRoot, "") + " )");


                    GUILayout.Space(20);

                    if (item.versionInfo == null)
                    {
                        item.versionInfo = VersionInfo.Load(gitServerEditor.GetGitVerinfoPath(item.name, true));
                    }


                    item.versionInfo.version = EditorGUILayout.TextField("版本号: ", item.versionInfo.version, GUILayout.ExpandWidth(true));
                    GUILayout.Space(10);

                    EditorGUILayout.LabelField("大版本更新通知:");
                    item.versionInfo.noteDownApp = EditorGUILayout.TextArea(item.versionInfo.noteDownApp, GUILayout.ExpandWidth(true), GUILayout.Height(60));
                    GUILayout.Space(10);

                    EditorGUILayout.LabelField("热更新通知:");
                    item.versionInfo.noteHostUpdate = EditorGUILayout.TextArea(item.versionInfo.noteHostUpdate, GUILayout.ExpandWidth(true), GUILayout.Height(60));
                    GUILayout.Space(10);

                    item.versionInfo.isClose = EditorGUILayout.ToggleLeft("是否停服", item.versionInfo.isClose == 1) ? 1 : 0;
                    GUILayout.Space(10);

                    HGUILayout.BeginCenterHorizontal();

                    if (GUILayout.Button("保存", GUILayout.MinHeight(25), GUILayout.MaxWidth(200)))
                    {
                        item.versionInfo.Save(gitServerEditor.GetGitVerinfoPath(item.name, true));
                    }

                    if (GUILayout.Button("刷新", GUILayout.MinHeight(25), GUILayout.MaxWidth(200)))
                    {
                        item.versionInfo = null;
                    }
                    HGUILayout.EndCenterHorizontal();

                    GUILayout.EndVertical();
                    GUILayout.Space(20);
                }
            }


            // git
            foldout_git = EditorGUILayout.Foldout(foldout_git, "git");
            if (foldout_git)
            {
                GUILayout.BeginVertical(HGUILayout.boxMPStyle, GUILayout.ExpandWidth(true));

                HGUILayout.BeginCenterHorizontal();
                if (GUILayout.Button("CopyFromTest", GUILayout.MinHeight(50), GUILayout.MaxWidth(200)))
                {
                    Step_Verinfo_CopyFromTest();
                }
                HGUILayout.EndCenterHorizontal();
                GUILayout.Space(10);

                HGUILayout.BeginCenterHorizontal();
                if (GUILayout.Button("推送", GUILayout.MinHeight(50), GUILayout.MaxWidth(200)))
                {
                    Step_Begin();


//                    if (stepIsContinue)
//                        Step_CheckBranch();

                    if (stepIsContinue)
                    {
                        Step_CommitBranch();
                    }

                    if (stepIsContinue)
                    {
                        Step_PushBranchAndTag();
                    }
                }
                HGUILayout.EndCenterHorizontal();



                GUILayout.EndVertical();
                GUILayout.Space(30);
            }



            EditorGUILayout.EndScrollView();
        }