mikke89 / RmlUi

RmlUi - The HTML/CSS User Interface library evolved
https://mikke89.github.io/RmlUiDoc/
MIT License
2.82k stars 308 forks source link

Bundling the html/rml files #695

Open std-microblock opened 2 days ago

std-microblock commented 2 days ago

It would make the distribution of softwares easier if we can bundle every file into one file instead of sending a folder containing all the files needed, in which the users can mess everything up.

std-microblock commented 2 days ago

I've been a sciter user for a long time. It made an tool like tar to bundle a folder into one file, then support loading it. I think it should be ok if we use the tar format directly.

ShawnCZek commented 2 days ago

I believe the library does not need to handle this at all. One usually uses RmlUi with an existing engine; for instance, Unity or Unreal have their own way of handling assets. If you use this with your engine, you also probably want to pack such assets together with them, which is connected with providing your file interface for handling such custom packages.

std-microblock commented 2 days ago

I believe the library does not need to handle this at all. One usually uses RmlUi with an existing engine; for instance, Unity or Unreal have their own way of handling assets. If you use this with your engine, you also probably want to pack such assets together with them, which is connected with providing your file interface for handling such custom packages.

In my case, I'm using rmlui to implement normal applications, so it would be helpful.

hyblocker commented 2 days ago

You can use context->LoadDocumentFromMemory to load a document from a UTF-8 char*. You can thus embed your files internally and use that to load documents, and a custom FileInterface to handle file resolution to data loaded in memory instead of I/O reads.

std-microblock commented 1 day ago

You can use context->LoadDocumentFromMemory to load a document from a UTF-8 char*. You can thus embed your files internally and use that to load documents, and a custom FileInterface to handle file resolution to data loaded in memory instead of I/O reads.

Yeah, if this process can be integrated into rmlui, it would be nice. Will the PR implementing this be accepted if I make one?