View Single Post
Old 08-01-2013, 05:43 PM   #29
grumbles
Addict
grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.
 
grumbles's Avatar
 
Posts: 238
Karma: 1500000
Join Date: Nov 2009
Location: Toronto
Device: Pandigital Novel (Black), T-2 and 3, Nexus 7
The key issue with the mimetype file is that it must be the first file and it must be added as stored, not compressed. The easiest way to do this is with the command line (info)zip program. Create the file first by adding the mimetype file with compression 0 (store). Then append all the other files to this zip file with the compression factor of your choice. But the mimetype, must be the first file and it must be stored. I don't know if using WinRAR or other programs will maintain the position of the mimetype as the first. The infozip program does.

I've been planning on writing a program to specifically zip up a directory tree into an epub file. I'll get to it real soon now. I just need to find a cross-pltform zip library for Free Pascal. As I said, real soon now.
grumbles is offline   Reply With Quote