Skip to content
Chris Petersen edited this page Oct 16, 2014 · 1 revision

packtool-unpack extracts an embedded file at startup. It is part of packtool which allows an application to package arbitrary files within it. It is used for example to include configuration files on platform like iOS and Android.

Note: This is not normally invoked directly by the user. Instead, an EMBED file with space separated filenames is placed into the application's main folder. For this tool to work (include "embed.scm") needs to be present at the top of an application's main.scm file, which then will automatically unpack the files into the system directory if they don't yet exist (i.e. on first app launch).

Parameter Description
file Filename for the target file
cdata u8vector with compressed binary data

Example

Example 1: Unpack the string "cmss.ttf 7 18 ascii" to the file FONTS.

(packtool-unpack "FONTS" '#u8(1 19 99 109 115 115 46 116 116 102 32 55 32 49 56 32 97 115 99 105 105 10))
Clone this wiki locally