libkiwix icon indicating copy to clipboard operation
libkiwix copied to clipboard

Rethink how we integrate resources in binaries.

Open mgautierfr opened this issue 8 years ago • 7 comments

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 :)

mgautierfr avatar Mar 15 '17 10:03 mgautierfr

Stop words are meanwhile stored in the ZIM files themselves.

kelson42 avatar May 14 '17 17:05 kelson42

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.

stale[bot] avatar Nov 21 '19 00:11 stale[bot]

@mgautierfr What would be a better approach?

kelson42 avatar Jan 12 '22 12:01 kelson42

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.

stale[bot] avatar Mar 30 '22 05:03 stale[bot]

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.

kelson42 avatar May 25 '24 15:05 kelson42

At that time, I was thinking about using a zim archive. Now I would use a jubako based container.

mgautierfr avatar May 27 '24 09:05 mgautierfr

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?

kelson42 avatar May 27 '24 09:05 kelson42