The packnl Project ================== *packnl* is a tool for "packing" a newlisp application into an executable by using the embedding feature of newlisp. Such a packed binary will have +incore.lsp+ as its embedded script, and then it is extended with the application files in a "simple archive" format. In short, the executable is a newlisp interpreter packed together with the application scripts into a single binary file. The packed appplication uses the first application file as its "main script", which is loaded and executed automatically. Other application files are available for the +load+, +read-file+ and +file?+ functions. Usage Examples -------------- .Writing a packed binary ==== ---- packnl -w binary ( file | -a name | -A name | -C path )* ---- This commandline form is used for preparing a binary with the given files. The nominated files will be appended to the binary in the given order. * The *-a* option is used for registering the members of an +ar+ style archive to subseqently be selectively nominated for inclusion into the binary. * The *-A* option is used for including all members of an +ar+ style archive. * The *-C* option is used for changing (input) directory as given. ==== .Listing a packed binary ==== ---- packnl -t binary ---- This commandline form is used for reviewing a packed binary as a list of its included members. ==== .Unpack a packed binary ==== ---- packnl -u binary directory ---- This commandline form is used for unpacking a packed binary into a given target directory. ==== Packed Binary Format -------------------- A packed binary is essentially a concatenation of an embedded newlisp executable (together with its embedded script) and an archive file in "ar" format. The latter is a concatenation of the files included where each has a 2-line preamble consisting of the pathname in one line, then the content byte size as a 10-base number in ascii. Please review the Makefile which creates *packnl* as a conformant packed binary using plain *sh* commands.