From ZDoom Wiki
Jump to navigation Jump to search

Zipdir is a tool created by Randy Heit and available under the terms of the GPL v2, packaged with ZDoom's source code, where it is found in the /tools/zipdir subdirectory. It is used to generate zdoom.pk3, but can also be used for other purposes.

Command line options

Usage: zipdir [-dfuq] <zip file> <directory> ...

Given one or more directories, their contents are scanned recursively. If any files are newer than the zip file or the zip file does not exist, then everything in the specified directories is stored in the zip. The base directory names are not stored in the zip file, but subdirectories recursed into are stored.

Zipdir skips hidden files and subdirectories to prevent SVN bookkeeping info (i.e., the .svn subdirectories) from being put in the archive. It also ignores any .orig file which are left by some patching utilities.

Force the use of the "deflate" algorithm. Normally zipdir guesses the most efficient compression algorithm for each file, but not all zip tools are able to recognize some of the most efficient methods. Forcing deflate results in a larger file that is guaranteed to work with any archiver. The compression methods supported by zipdir are "store" (no compression), "deflate", BZip2, LZMA and PPMd. If a file cannot be efficiently compressed, it will still be stored instead of deflated.
Force creation of archive. Normally, zipdir only updates files that are more recent than those already in the archive.
Only update changed file. The opposite of -f.
Quiet mode: do not list files. Normally zipdir prints each file it adds or updates in the archive, along with the compression method used.