Refactor into a oop

This commit is contained in:
2026-06-28 08:18:15 -04:00
parent 1c7909b8f6
commit 1813b3f5cf
9 changed files with 184 additions and 173 deletions

39
src/app.h Normal file
View File

@@ -0,0 +1,39 @@
#ifndef BUILD_SCRIPT_APP
#define BUILD_SCRIPT_APP
#include <filesystem>
#include "args.h"
#include "logging.h"
#include "types.h"
class Application {
public:
Application(Options options);
void run();
private:
bool m_DryRun;
bool m_Verbose;
BuildType m_BuildType;
Command m_Command;
void createAllLoggers();
void buildProject();
void configureProject();
void cleanProject();
void deleteProject();
void rebuildProject();
void deleteDir(const std::filesystem::path& path);
void createDir(const std::filesystem::path& path);
void checkBuildDirs();
int runCmd(std::string cmd);
void buildDir(const std::filesystem::path& path);
void configureDir(const std::filesystem::path& path, std::string buildStr);
void cleanDir(const std::filesystem::path& path);
};
#endif // !BUILD_SCRIPT_APP