self-extract-0.3.3: A Haskell library to make self-extracting executables

MaintainerBrandon Chinn <brandonchinn178@gmail.com>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Codec.SelfExtract

Description

Defines functions that should be used in a self-extractable executable.

Synopsis

Documentation

extractTo :: FilePath -> IO () Source #

Extract the self-bundled executable to the given path.

extractTo "dir"  -- will extract to $CWD/dir
extractTo "/usr/local/lib"

withExtractToTemp :: (FilePath -> IO ()) -> IO () Source #

Extract the self-bundled executable to a temporary path.

bundle :: FilePath -> FilePath -> IO () Source #

Bundle the given directory into the executable with the given name.

For example, to bundle the static/ directory in the executable named install-files:

bundle "./install-files" "./static/"

extractTo' :: Path b Dir -> IO () Source #

Same as extractTo, except using the Path library.

extractTo' [reldir|dir|]  -- will extract to $CWD/dir
extractTo' [absdir|/usr/local/lib|]

withExtractToTemp' :: (Path Abs Dir -> IO ()) -> IO () Source #

Same as withExtractToTemp, except using the Path library.

bundle' :: Path b File -> Path b Dir -> IO () Source #

Same as bundle, except using the Path library.

bundle' [relfile|install-files|] [reldir|static|]