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

View File

@ -1,7 +1,7 @@
using ImGuiNET;
namespace Nerfed.Editor.Project
{
namespace Nerfed.Editor.Project;
internal static class ProjectGui
{
private static string projectDirectory = string.Empty;
@ -65,4 +65,3 @@ internal static void OnGui()
ImGui.End();
}
}
}