bamse-0.9.4: templates/Base.hs
--------------------------------------------------------------------
-- |
-- Module : Base
-- Description : Specification/template for the Base installer builder.
-- Copyright : (c) Sigbjorn Finne, 2004-2009
-- License : BSD3
--
-- Maintainer : Sigbjorn Finne <sof@forkIO.com>
-- Stability : provisional
-- Portability : portable
--
-- To create your own installer, you need to supply a Haskell module
-- which exports functions and values that together define the
-- functionality (and contents) of your package;
-- see this module (Base.hs) just what those exports are.
--
--------------------------------------------------------------------
module Base
-- for informational purposes, here's the exports
-- the Bamse infrastructure expects:
( defaultOutFile -- :: FilePath
, pkg -- :: Package
, webSite -- :: String
, bannerBitmap -- :: InstallEnv -> Maybe FilePath
, bgroundBitmap -- :: InstallEnv -> Maybe FilePath
, registry -- :: [RegEntry]
, baseFeature -- :: Feature
, features -- :: [Tree Feature]
, startMenu -- :: InstallEnv -> (String, [Shortcut])
, desktopShortcuts -- :: InstallEnv -> [Shortcut]
, extensions -- :: InstallEnv -> [Extension]
, verbs -- :: [Extension]
, license -- :: InstallEnv -> Maybe FilePah
, userRegistration -- :: Bool
, defaultInstallFolder -- :: Maybe String
, dirTree -- :: InstallEnv -> IO DirTree
, distFileMap -- :: Maybe (FilePath -> Maybe FilePath)
, featureMap -- :: Maybe (FilePath -> FeatureName)
, finalMessage -- :: Maybe String
, userInstall -- :: Bool
, services -- :: [Service]
, ghcPackageInfo -- :: Maybe GhcPackage
, nestedInstalls -- :: [(String, Maybe String)]
, cabalPackageInfo
, assemblies
) where
import Bamse.Package
import Bamse.PackageUtils
import Bamse.Util.Dir ( DirTree, GenDirTree(..) )
appName :: String
appName = "myapp"
defaultOutFile :: FilePath
defaultOutFile = toMsiFileName appName
pkg :: Package
pkg = Package
{ name = appName
, title = "title cannot be empty"
, productVersion = "0.1.0"
, author = "SomeRandomCorp"
, comment = "Example MSI installer template"
}
webSite :: String
webSite = "http://self-promo.org/"
bannerBitmap :: InstallEnv -> Maybe FilePath
bannerBitmap _ienv = Nothing
bgroundBitmap :: InstallEnv -> Maybe FilePath
bgroundBitmap _ienv = Nothing
registry :: [RegEntry]
registry = []
baseFeatureName :: FeatureName
baseFeatureName = "MyApp"
baseFeature :: Feature
baseFeature = (baseFeatureName, "Example MSI installer template")
features :: [Tree Feature]
features = [Leaf baseFeature]
startMenu :: InstallEnv -> (String, [Shortcut])
startMenu _ienv = (baseFeatureName, [])
desktopShortcuts :: InstallEnv -> [Shortcut]
desktopShortcuts _ienv = []
extensions :: InstallEnv -> [ Extension ]
extensions _ienv = [ ]
verbs :: [ ( String -- extension
, String -- verb
, String -- label
, String -- arguments
)
]
verbs = []
dirTree :: InstallEnv -> IO DirTree
dirTree _ienv = return Empty
distFileMap :: Maybe (FilePath -> Maybe FilePath)
distFileMap = Nothing
featureMap :: Maybe (FilePath -> FeatureName)
featureMap = Nothing
license :: InstallEnv -> Maybe FilePath
license _ienv = Nothing
userRegistration :: Bool
userRegistration = False
defaultInstallFolder :: Maybe String
defaultInstallFolder = Nothing
finalMessage :: Maybe String
finalMessage = Nothing
userInstall :: Bool
userInstall = False
services :: [Service]
services = []
ghcPackageInfo :: Maybe GhcPackage
ghcPackageInfo = Nothing
cabalPackageInfo :: Maybe CabalPackage
cabalPackageInfo = Nothing
nestedInstalls :: [a]
nestedInstalls = []
assemblies :: [Assembly]
assemblies = []