Refactor into a oop
This commit is contained in:
39
src/app.h
Normal file
39
src/app.h
Normal 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
|
||||
Reference in New Issue
Block a user