Rethink how we integrate resources in binaries.
We have currently a small solution to embedded resource file in binaries. The resource file is just store in a C array and the code just read it and interpret it as a file content.
This work well but it could be improved :
- Some files/resources work together and can be seen as a pack. (stop words list for xapian, all html/css/js for the topbar, ...)
- It is somehow complicated to allow customization (kiwix/kiwix-tools#17) or update of the resources. For now the two solutions are either to recompile the binary or use env variables to overwrite the content.
This is somehow a pity as we are a project who embedded different files in a read efficient archive, handling file hierarchy and so. We can probably use our own code base to store and read those resource files :)
Stop words are meanwhile stored in the ZIM files themselves.
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.
@mgautierfr What would be a better approach?
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.
Why not just using a zip blob? Would be easy to read in c++ and easy to build for anybody whatever the platform. We could then just allow to load an external ZIP fs path tomcustomize things.
At that time, I was thinking about using a zim archive. Now I would use a jubako based container.
We won't use anything overkill. Package should better be done via tools people are familiar with. Why is a simple tar or zip not good enough?