-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A Haskell library to make self-extracting executables -- -- A Haskell library to make self-extracting executables. @package self-extract @version 0.3.2 -- | Defines functions that should be used in a self-extractable -- executable. module Codec.SelfExtract -- | Extract the self-bundled executable to the given path. -- --
-- extractTo "dir" -- will extract to $CWD/dir -- extractTo "/usr/local/lib" --extractTo :: FilePath -> IO () -- | Extract the self-bundled executable to a temporary path. withExtractToTemp :: (FilePath -> IO ()) -> IO () -- | 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/" --bundle :: FilePath -> FilePath -> IO () -- | Same as extractTo, except using the Path library. -- --
-- extractTo' [reldir|dir|] -- will extract to $CWD/dir -- extractTo' [absdir|/usr/local/lib|] --extractTo' :: Path b Dir -> IO () -- | Same as withExtractToTemp, except using the Path -- library. withExtractToTemp' :: (Path Abs Dir -> IO ()) -> IO () -- | Same as bundle, except using the Path library. -- --
-- bundle' [relfile|install-files|] [reldir|static|] --bundle' :: Path b File -> Path b Dir -> IO () -- | Defines functions that should be used in the Setup.hs file. module Codec.SelfExtract.Distribution -- | Get the executable with the given name with the given LocalBuildInfo. -- --
-- main = defaultMainWithHooks simpleUserHooks
-- { postCopy = args cf pd lbi -> do
-- postCopy simpleUserHooks args cf pd lbi
-- exe <- getExe lbi "name-of-executable"
-- bundle exe "./static/"
-- }
--
getExe :: LocalBuildInfo -> String -> IO FilePath
-- | Same as getExe, except using the Path library.
--
--
-- main = defaultMainWithHooks simpleUserHooks
-- { postCopy = args cf pd lbi -> do
-- postCopy simpleUserHooks args cf pd lbi
-- exe <- getExe' lbi "name-of-executable"
-- bundle' exe [reldir|./static/|]
-- }
--
getExe' :: LocalBuildInfo -> String -> IO (Path Abs File)