Rendering Engine 0.2.0
Modular Graphics Rendering Engine | v0.2.0
Loading...
Searching...
No Matches
create_project Namespace Reference

Functions

 create_project (name)

Variables

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

Function Documentation

◆ create_project()

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 59 of file create_project.py.

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

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.