diff --git a/CLEditor/model/GlobalCommands.cs b/CLEditor/model/GlobalCommands.cs index 3f3b857eaca62404eb93618f5b47406d9dd1050e..6a2b009ea6cc332937c9ab6f865a4e3f4cb39dff 100644 --- a/CLEditor/model/GlobalCommands.cs +++ b/CLEditor/model/GlobalCommands.cs @@ -21,8 +21,10 @@ namespace CLEngine.Editor.model List blockedDirs = new List(); blockedDirs.Add("bin"); blockedDirs.Add("obj"); + blockedDirs.Add(".git"); + blockedDirs.Add(".vs"); - List blockedFileExtensions = new List(); + List blockedFileExtensions = new List(); blockedFileExtensions.Add(".cs"); //blockedFileExtensions.Add(".clengine"); blockedFileExtensions.Add(".csproj"); @@ -64,8 +66,9 @@ namespace CLEngine.Editor.model } RemoveEmptyFolders(destinationPath, SearchOption.AllDirectories); + CHelper.ChangeSettingsToRelease(destinationPath); - return true; + return true; case "windowsstore": // creates shadow directories foreach (string dirPath in Directory.GetDirectories(projectPath, "*", SearchOption.AllDirectories)) @@ -96,8 +99,9 @@ namespace CLEngine.Editor.model } RemoveEmptyFolders(destinationPath, SearchOption.AllDirectories); + CHelper.ChangeSettingsToRelease(destinationPath); - return true; + return true; } return false; diff --git a/Engine/CLEngine.Core/CHelper.cs b/Engine/CLEngine.Core/CHelper.cs index 8bded647422f2ef6b6c302fb95a7c20ebeed02da..da6c0122bc4e51712feec219c11b4d87a23ee9dc 100644 --- a/Engine/CLEngine.Core/CHelper.cs +++ b/Engine/CLEngine.Core/CHelper.cs @@ -295,6 +295,21 @@ namespace CLEngine.Core return Regex.Replace(camelCase, @"\s+", " "); } + + /// + /// 改变Settings.ini文件为release模式 + /// + public static void ChangeSettingsToRelease(string path) + { + var destination = Path.Combine(path, "settings.ini"); + var iniFile = new IniFile(destination); + if (!File.Exists(destination)) + return; + + iniFile.IniWriteValue("Profile", "Visible", "False"); + iniFile.IniWriteValue("Console", "Visible", "False"); + iniFile.IniWriteValue("Console", "WriteToConsole", "False"); + } } #if WIN