-------------------------------------------------------------------- -- | -- Module : Alex -- Description : Specification/template for the Alex installer builder. -- Copyright : (c) Sigbjorn Finne, 2004-2009 -- License : BSD3 -- -- Maintainer : Sigbjorn Finne -- 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 Alex where import Data.List import Util.Dir import Util.Path import Util.List import Bamse.Package import Bamse.PackageUtils pkgName = "alex" pkgVersion = "2.01" pkgDoc = "doc\\alex\\alex.html" defaultOutFile = toMsiFileName pkgName pkg :: Package pkg = Package { name = pkgName , title = pkgName , productVersion = "2.0.1.0" , author = "Simon Marlow" , comment = unwords [pkgName, "Version", pkgVersion] } webSite :: String webSite = "http://haskell.org/alex" bannerBitmap :: InstallEnv -> Maybe FilePath bannerBitmap ienv = Just (lFile (toolDir ienv) "art/banner.bmp") bgroundBitmap :: InstallEnv -> Maybe FilePath bgroundBitmap _ienv = Nothing {- The installer needs to record the following in the Registry: * the location of the installation directory. -- used by the Cryptol interpreter to set up the Cryptol import path when invoking GHC. * Cryptol as a Hugs 'project' -- requires the addition of a (large) set of directories to the search path. -} registry :: [RegEntry] registry = [] features :: [Tree Feature] features = [ Leaf baseFeature ] baseFeatureName :: String baseFeatureName = pkgName baseFeature :: Feature baseFeature = (baseFeatureName, pkgName ++ '-':pkgVersion) startMenu :: InstallEnv -> (String, [Shortcut]) startMenu ienv = (pkgName, entries) where iconDir = lFile (toolDir ienv) "icons" entries :: [Shortcut] entries = [ Shortcut "Alex user manual" (lFile (srcDir ienv) pkgDoc) "" "Alex documentation" (Just (lFile iconDir "html.exe")) 1 "[TARGETDIR]" ] 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 = findFiles ofInterest (srcDir ienv) where ofInterest file = not (last file == '~') && not (baseName file == "CVS") 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 = Just $ "[WindowsVolume]"++pkgName++'\\':pkgName++'-':pkgVersion finalMessage :: Maybe String finalMessage = Nothing userInstall :: Bool userInstall = False services :: [Service] services = [] ghcPackageInfo :: Maybe GhcPackage ghcPackageInfo = Nothing nestedInstalls = []