-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBuildSystem.h
More file actions
44 lines (38 loc) · 983 Bytes
/
Copy pathBuildSystem.h
File metadata and controls
44 lines (38 loc) · 983 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#pragma once
#include "Export.h"
#include "Core/ISerializable.h"
#include "Core/UUID.h"
#include <string>
#include <vector>
#include <unordered_set>
#include <regex>
#include <filesystem>
namespace sh::core
{
class AssetBundle;
}
namespace sh::game
{
class World;
class GameObject;
}
namespace sh::editor
{
class Project;
class BuildSystem
{
public:
SH_EDITOR_API BuildSystem();
SH_EDITOR_API void Build(Project& project, const std::filesystem::path& outputPath);
private:
void ExtractUUIDs(std::unordered_set<std::string>& set, const core::Json& world);
void PackingAssets(core::AssetBundle& bundle, game::World& world);
void ExportGameManager(const std::filesystem::path& outputPath);
void CopyRuntimeBinaries(const std::filesystem::path& outputPath);
private:
Project* currentProject = nullptr;
std::regex uuidRegex;
std::unordered_set<std::string> uuids;
std::unordered_map<std::string, std::vector<std::string>> worldUUIDs;
};
}//namespace