|
@@ -2,6 +2,7 @@
|
|
using GFGGame;
|
|
using GFGGame;
|
|
using System;
|
|
using System;
|
|
using System.IO;
|
|
using System.IO;
|
|
|
|
+using System.Threading;
|
|
using UnityEditor;
|
|
using UnityEditor;
|
|
using UnityEditor.Compilation;
|
|
using UnityEditor.Compilation;
|
|
using UnityEngine;
|
|
using UnityEngine;
|
|
@@ -31,6 +32,10 @@ namespace GFGEditor
|
|
UpdateProject();
|
|
UpdateProject();
|
|
UpdateAndImportArtRes();
|
|
UpdateAndImportArtRes();
|
|
UpdateAndImportExcel();
|
|
UpdateAndImportExcel();
|
|
|
|
+ if (CommitWhenRelease)
|
|
|
|
+ {
|
|
|
|
+ CommitProject();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
[MenuItem("策划/更新并导入Excel", false, (int)TOOL_MENU_PRIORITY.UpdateAndImportExcel)]
|
|
[MenuItem("策划/更新并导入Excel", false, (int)TOOL_MENU_PRIORITY.UpdateAndImportExcel)]
|
|
@@ -38,6 +43,10 @@ namespace GFGEditor
|
|
{
|
|
{
|
|
UpdateExcel();
|
|
UpdateExcel();
|
|
ImportExcel();
|
|
ImportExcel();
|
|
|
|
+ if (CommitWhenRelease)
|
|
|
|
+ {
|
|
|
|
+ CommitProject();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
[MenuItem("策划/更新并导入美术资源", false, (int)TOOL_MENU_PRIORITY.UpdateAndImportArtRes)]
|
|
[MenuItem("策划/更新并导入美术资源", false, (int)TOOL_MENU_PRIORITY.UpdateAndImportArtRes)]
|
|
@@ -45,6 +54,10 @@ namespace GFGEditor
|
|
{
|
|
{
|
|
UpdateArtRes();
|
|
UpdateArtRes();
|
|
ImportArtRes();
|
|
ImportArtRes();
|
|
|
|
+ if (CommitWhenRelease)
|
|
|
|
+ {
|
|
|
|
+ CommitProject();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
[MenuItem("策划/更新至内网版本", false, (int)TOOL_MENU_PRIORITY.BuildBundlesRes)]
|
|
[MenuItem("策划/更新至内网版本", false, (int)TOOL_MENU_PRIORITY.BuildBundlesRes)]
|
|
@@ -55,13 +68,16 @@ namespace GFGEditor
|
|
EditorUtility.ClearProgressBar();
|
|
EditorUtility.ClearProgressBar();
|
|
if (CommitWhenRelease)
|
|
if (CommitWhenRelease)
|
|
{
|
|
{
|
|
- CommitProject();
|
|
|
|
|
|
+ CommitBundles();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- [MenuItem("策划/其它/更新项目", false, (int)TOOL_MENU_PRIORITY.UpdateProject)]
|
|
|
|
|
|
+ [MenuItem("策划/其它/更新项目(会丢弃未推送内容)", false, (int)TOOL_MENU_PRIORITY.UpdateProject)]
|
|
static void UpdateProject()
|
|
static void UpdateProject()
|
|
{
|
|
{
|
|
|
|
+ //关闭sqlite连接并延迟,否则sqlite文件会被占用导致不能通过命令行还原
|
|
|
|
+ SQLiteHelper.Instance.CloseConnection();
|
|
|
|
+ Thread.Sleep(1000);
|
|
EditorUtility.DisplayProgressBar("进度", "正在更新项目", 1);
|
|
EditorUtility.DisplayProgressBar("进度", "正在更新项目", 1);
|
|
ProcessUtil.ExcuteBat("Assets/Editor/Bat/", "updateGame.bat");
|
|
ProcessUtil.ExcuteBat("Assets/Editor/Bat/", "updateGame.bat");
|
|
EditorUtility.ClearProgressBar();
|
|
EditorUtility.ClearProgressBar();
|
|
@@ -93,6 +109,13 @@ namespace GFGEditor
|
|
EditorUtility.ClearProgressBar();
|
|
EditorUtility.ClearProgressBar();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ static void CommitBundles()
|
|
|
|
+ {
|
|
|
|
+ EditorUtility.DisplayProgressBar("进度", "正在提交Bundles", 1);
|
|
|
|
+ ProcessUtil.ExcuteBat("Assets/Editor/Bat/", "commitBundles.bat");
|
|
|
|
+ EditorUtility.ClearProgressBar();
|
|
|
|
+ }
|
|
|
|
+
|
|
[MenuItem("策划/其它/导入配置表", false, (int)TOOL_MENU_PRIORITY.ImportExcel)]
|
|
[MenuItem("策划/其它/导入配置表", false, (int)TOOL_MENU_PRIORITY.ImportExcel)]
|
|
public static void ImportExcel()
|
|
public static void ImportExcel()
|
|
{
|
|
{
|
|
@@ -133,6 +156,7 @@ namespace GFGEditor
|
|
File.Copy(ResPathUtil.SQLITE_FILE_PATH, ExcelConfig.sqliteFilePathCSShare, true);
|
|
File.Copy(ResPathUtil.SQLITE_FILE_PATH, ExcelConfig.sqliteFilePathCSShare, true);
|
|
AssetDatabase.Refresh();
|
|
AssetDatabase.Refresh();
|
|
EditorUtility.ClearProgressBar();
|
|
EditorUtility.ClearProgressBar();
|
|
|
|
+ SQLiteHelper.Instance.CloseConnection();
|
|
}
|
|
}
|
|
|
|
|
|
[MenuItem("策划/检查配置表", false, (int)TOOL_MENU_PRIORITY.CheckExcel)]
|
|
[MenuItem("策划/检查配置表", false, (int)TOOL_MENU_PRIORITY.CheckExcel)]
|