Я пересоздал репозиторий из-за большого количества мусора в прошлом
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
#include <cstdlib>
|
||||
|
||||
int main()
|
||||
{
|
||||
std::string project_name;
|
||||
std::cout << "Enter project name: ";
|
||||
std::getline(std::cin, project_name);
|
||||
|
||||
std::filesystem::create_directory(project_name);
|
||||
std::filesystem::create_directory(project_name + "/Resources");
|
||||
std::filesystem::create_directory(project_name + "/Worlds");
|
||||
std::filesystem::create_directory(project_name + "/src");
|
||||
|
||||
std::ifstream data("ProjectFile.txt");
|
||||
std::string buffer = "cmake_minimum_required(VERSION 3.14)\nset(GAME_NAME " + project_name + ")\n";
|
||||
|
||||
std::string line;
|
||||
while (std::getline(data, line))
|
||||
buffer += line + '\n';
|
||||
data.close();
|
||||
|
||||
std::ofstream out(project_name + "/CMakeLists.txt", std::ios::out);
|
||||
out << buffer;
|
||||
out.close();
|
||||
|
||||
std::cout << "Project created successfully!\n";
|
||||
system("pause");
|
||||
}
|
||||
Reference in New Issue
Block a user