Add embeddir finally and embedstrm

This commit is contained in:
2025-12-17 06:07:27 -06:00
parent deb492b8c4
commit c37b26af14
13 changed files with 484 additions and 25 deletions

View File

@@ -256,6 +256,10 @@ int main(int argc, char** argv)
Parser parser(tokens,gc,env);
parser.debug = debug;
CodeGen gen;
auto sfs = std::make_shared<SubdirFilesystem>(LocalFS,LocalFS->SystemToVFSPath(resourceDir.string()));
gen.embedFS = sfs;
gen.GenRoot(parser.ParseRoot());
gen.name = name;
gen.version = version;
@@ -275,9 +279,7 @@ int main(int argc, char** argv)
{
auto strm = std::make_shared<Tesses::Framework::Streams::FileStream>(outputDir / (name + "-" + version.ToString() + ".crvm"),"wb");
auto sfs = std::make_shared<SubdirFilesystem>(LocalFS,LocalFS->SystemToVFSPath(resourceDir.string()));
gen.Save(sfs,strm);
gen.Save(strm);
}
if(gc != nullptr)
{