-- -- (c) 2007, Galois, Inc. -- -- To create a package, you need to define a module -- which exports information and functions that together -- define the functionality (and contents) of your package. -- -- [Having Haskell as the only 'specification language' for packages -- is not a goal. ] module Greencard where import Util.Dir import Util.Path import Bamse.Package import Bamse.PackageUtils gcVersion = "gc-2.05" versionNumber = "2.05" defaultOutFile = toMsiFileName gcVersion pkg :: Package pkg = Package { name = "GreenCard" , title = "GreenCard - Haskell FFI preprocessor" , productVersion = "1.0.0.0" , author = "Sigbjorn Finne" , comment = "Version: " ++ versionNumber } webSite :: String webSite = "http://haskell.org/greencard" bannerBitmap :: InstallEnv -> Maybe FilePath bannerBitmap ienv = Just (lFile (toolDir ienv) "art/banner.bmp") bgroundBitmap :: InstallEnv -> Maybe FilePath bgroundBitmap _ienv = Nothing registry :: [RegEntry] registry = haskellProject "GreenCard" [ hugsPath "[TARGETDIR]\\lib\\hugs" ] features :: [Tree Feature] features = [ Leaf baseFeature ] baseFeatureName :: String baseFeatureName = "GreenCard" baseFeature :: Feature baseFeature = (baseFeatureName, "GreenCard") startMenu :: InstallEnv -> (String, [Shortcut]) startMenu ienv = ("GreenCard", entries) where entries :: [Shortcut] entries = [ Shortcut "GreenCard Readme" (lFile (srcDir ienv) "README.txt") "" "GHC Readme" (Just (lFile iconDir "txt.exe")) 1 "[TARGETDIR]" , Shortcut "User guide" (lFile (srcDir ienv) "doc\\green-card\\greencard.html") "" "User guide" (Just (lFile iconDir "html.exe")) 1 "[TARGETDIR]" ] iconDir = toolDir ienv ++ "\\icons" 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 == gcVersion) && not (baseName file == "green-card.junk") && not (baseName file == "distrib") && not (baseName file == "CVS") && not (baseName file == "mk") && (not (fileSuffix file == "o") || (baseName file == "HSgreencard.o")) && (not (fileSuffix file == "hi") || (baseName file == "StdDIS.hi")) 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 = Just "Please remember to add [TARGETDIR] to your PATH." userInstall :: Bool userInstall = False services :: [Service] services = [] ghcPackageInfo :: Maybe GhcPackage ghcPackageInfo = Nothing nestedInstalls = []