7#include <unordered_map>
19 static constexpr uint32_t kCurrentVersion = 1;
21 uint32_t mVersion = kCurrentVersion;
23 bool mEmbedded =
false;
24 int64_t mBuildTime = 0;
25 std::string mProjectName;
26 std::string mOutputDirectory;
28 std::vector<FileEntry> mAssets;
29 std::vector<FileEntry> mScripts;
30 std::vector<FileEntry> mConfigFiles;
33enum class BuildCacheResult
46 static BuildCache*
Get();
50 BuildCacheResult CheckRebuildNeeded(
Platform platform,
bool embedded);
51 std::string GetRebuildReason()
const {
return mRebuildReason; }
53 void BuildCurrentManifest(
Platform platform,
bool embedded);
55 bool LoadManifest(
Platform platform,
bool embedded);
57 std::string GetManifestPath(
Platform platform,
bool embedded)
const;
63 void GatherAssetFiles(std::vector<FileEntry>& outAssets);
64 void GatherScriptFiles(std::vector<FileEntry>& outScripts);
65 void GatherConfigFiles(std::vector<FileEntry>& outConfigs);
67 int64_t GetFileModTime(
const std::string& path)
const;
68 bool CompareManifests(
const BuildManifest& current,
const BuildManifest& saved);
69 bool VerifyOutputDirectory()
const;
71 static BuildCache* sInstance;
73 BuildManifest mCurrentManifest;
74 BuildManifest mSavedManifest;
75 std::string mRebuildReason;
Platform
Definition EngineTypes.h:31