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

@@ -24,13 +24,14 @@ int main(int argc, char** argv)
Parser parser(tokens);
CodeGen gen;
auto sfs = std::make_shared<SubdirFilesystem>(LocalFS,VFSPath("."));
gen.embedFS = sfs;
gen.GenRoot(parser.ParseRoot());
std::vector<uint8_t> data;
{
auto sfs = std::make_shared<SubdirFilesystem>(LocalFS,VFSPath("."));
auto strm2 = std::make_shared<Tesses::Framework::Streams::MemoryStream>(true);
gen.Save(sfs,strm2);
gen.Save(strm2);
{
@@ -78,11 +79,12 @@ int main(int argc, char** argv)
Parser parser(tokens);
CodeGen gen;
auto sfs = std::make_shared<SubdirFilesystem>(LocalFS,VFSPath("."));
gen.embedFS = sfs;
gen.GenRoot(parser.ParseRoot());
auto sfs = std::make_shared<SubdirFilesystem>(LocalFS,VFSPath("."));
gen.Save(sfs, strm2);
gen.Save(strm2);
}
else if(source == "exit")
@@ -98,11 +100,13 @@ int main(int argc, char** argv)
Parser parser(tokens);
CodeGen gen;
auto sfs = std::make_shared<SubdirFilesystem>(LocalFS,VFSPath("."));
gen.embedFS = sfs;
gen.GenRoot(parser.ParseRoot());
auto sfs = std::make_shared<SubdirFilesystem>(LocalFS,VFSPath("."));
gen.Save(sfs,strm2);
gen.Save(strm2);
}
{