This commit is contained in:
max 2024-07-24 23:53:37 +02:00
parent b4c3b5ed18
commit ad2f527de5
2 changed files with 75 additions and 76 deletions

View File

@ -80,7 +80,7 @@ internal static void Compile()
return; return;
} }
Nerfed.Compiler.Compiler.Compile(ProjectFilePath, "Debug"); Compiler.Compiler.Compile(ProjectFilePath, "Debug");
} }
internal static void GenerateSolution() internal static void GenerateSolution()
@ -90,7 +90,7 @@ internal static void GenerateSolution()
return; return;
} }
Nerfed.Compiler.Generator.GenerateSolution(ProjectDirectory, Project, out string solutionFilePath); Compiler.Generator.GenerateSolution(ProjectDirectory, Project, out string solutionFilePath);
ProjectSolutionFilePath = solutionFilePath; ProjectSolutionFilePath = solutionFilePath;
} }
@ -101,35 +101,35 @@ private static void SetupDefaultFolders()
return; return;
} }
string contentPath = Path.Combine(ProjectDirectory, "Content"); string contentDirectory = Path.Combine(ProjectDirectory, "Content");
if (!Directory.Exists(contentPath)) if (!Directory.Exists(contentDirectory))
{ {
Directory.CreateDirectory(contentPath); Directory.CreateDirectory(contentDirectory);
} }
ProjectContentDirectory = contentPath; ProjectContentDirectory = contentDirectory;
string scriptsPath = Path.Combine(ProjectContentDirectory, "Scripts"); string scriptsDirectory = Path.Combine(ProjectContentDirectory, "Scripts");
if (!Directory.Exists(scriptsPath)) if (!Directory.Exists(scriptsDirectory))
{ {
Directory.CreateDirectory(scriptsPath); Directory.CreateDirectory(scriptsDirectory);
} }
string scriptsRuntimePath = Path.Combine(scriptsPath, "Runtime"); string scriptsRuntimePath = Path.Combine(scriptsDirectory, "Runtime");
if (!Directory.Exists(scriptsRuntimePath)) if (!Directory.Exists(scriptsRuntimePath))
{ {
Directory.CreateDirectory(scriptsRuntimePath); Directory.CreateDirectory(scriptsRuntimePath);
} }
// Test create csproject. // Test create csproject.
string gameplayRuntimePath = Path.Combine(scriptsRuntimePath, Compiler.Generator.AssemblyDefinitionExtensionName); string gameplayRuntimeFilePath = Path.Combine(scriptsRuntimePath, Compiler.Generator.AssemblyDefinitionExtensionName);
if (!File.Exists(gameplayRuntimePath)) if (!File.Exists(gameplayRuntimeFilePath))
{ {
Compiler.AssemblyDefinition.Create(gameplayRuntimePath, "Gameplay", out Compiler.AssemblyDefinition project); Compiler.AssemblyDefinition.Create(gameplayRuntimeFilePath, "Gameplay", out Compiler.AssemblyDefinition project);
} }
string tempPath = Path.Combine(ProjectDirectory, "Temp"); string tempDirectory = Path.Combine(ProjectDirectory, "Temp");
if (!Directory.Exists(tempPath)) if (!Directory.Exists(tempDirectory))
{ {
Directory.CreateDirectory(tempPath); Directory.CreateDirectory(tempDirectory);
} }
ProjectTempDirectory = tempPath; ProjectTempDirectory = tempDirectory;
} }
} }

View File

@ -1,9 +1,9 @@
using ImGuiNET; using ImGuiNET;
namespace Nerfed.Editor.Project namespace Nerfed.Editor.Project;
internal static class ProjectGui
{ {
internal static class ProjectGui
{
private static string projectDirectory = string.Empty; private static string projectDirectory = string.Empty;
private static string projectName = string.Empty; private static string projectName = string.Empty;
private static string projectFilePath = string.Empty; private static string projectFilePath = string.Empty;
@ -64,5 +64,4 @@ internal static void OnGui()
ImGui.EndGroup(); ImGui.EndGroup();
ImGui.End(); ImGui.End();
} }
}
} }