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

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

Codec.SelfExtract.Distribution

Description

Defines functions that should be used in the Setup.hs file.

Synopsis

Documentation

getExe :: LocalBuildInfo -> String -> IO FilePath Source #

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 (Path Abs File) Source #

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/|]
  }