Rendering Engine 0.2.9
Modular Graphics Rendering Engine | v0.2.9
create_project Namespace Reference

Functions

def create_project (name)
 

Variables

 TEMPLATE_ROOT = os.path.join("RenderingEngine", "Scripts", "Templates")
 
 DEST_ROOT = os.path.join("UserApplications")
 

Function Documentation

◆ create_project()

def create_project.create_project (   name)
@brief Create a new Rendering Engine test/demo project.

Generates the folder structure, copies template files, and appends
'add_subdirectory()' to TestApplications/CMakeLists.txt.

@param name  Name of the project to create.

Definition at line 60 of file create_project.py.

60def create_project(name):
61 """
62 @brief Create a new Rendering Engine test/demo project.
63
64 Generates the folder structure, copies template files, and appends
65 'add_subdirectory()' to TestApplications/CMakeLists.txt.
66
67 @param name Name of the project to create.
68 """
69 project_dir = os.path.join(DEST_ROOT, name)
70 if os.path.exists(project_dir):
71 print(f"Error: Project '{name}' already exists.")
72 return
73
74 os.makedirs(project_dir)
75 copy_template(TEMPLATE_ROOT, project_dir, name)
76 FILE_PATH = os.path.join(DEST_ROOT, "CMakeLists.txt")
77 CMAKE_ADD_PROJECT = "\n" + "add_subdirectory(" + name + ")"
78 with open(FILE_PATH, "a") as cmake_file:
79 cmake_file.write(CMAKE_ADD_PROJECT)
80 print(f"Created new project at {project_dir}")
81
def create_project(name)

Variable Documentation

◆ DEST_ROOT

create_project.DEST_ROOT = os.path.join("UserApplications")

Definition at line 30 of file create_project.py.

◆ TEMPLATE_ROOT

create_project.TEMPLATE_ROOT = os.path.join("RenderingEngine", "Scripts", "Templates")

Definition at line 29 of file create_project.py.