-------------------------------------------------------------------- -- | -- Module : SOE -- Description : Specification/template for the SOE 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 Base.hs just what those exports are. -- -- [Having Haskell as the only 'specification language' for packages -- is not a goal. ] -------------------------------------------------------------------- module SOE where import MSIExtra import Util.Dir import Package defaultOutFile = "SOE.msi" srcDir = "c:\\src" pkg :: Package pkg = Package { name = "SOE" , title = "School of Expression Software" , productVersion = "1.0.0.0" , author = "Paul Hudak" , comment = "Software accompanying textbook" , date = pkg_date , revisionGUID = "{07a7cf12-5509-45d3-92d3-826b95dde09f}" , packageGUID = "{79a39c17-1723-437f-a415-b7ca566fa96b}" , creationTime = pkg_date } where pkg_date = "13/01/2002 23:00:00" webSite :: String webSite = "http://haskell.org/soe" bannerBitmap :: Maybe FilePath bannerBitmap = Just "c:/src/bamse/soe/banner.bmp" registry :: [RegEntry] registry = haskellProject "SOE" [ hugsPath "[TARGETDIR]src;[TARGETDIR]graphics\\lib\\win32;[TARGETDIR]haskore\\src" ] hugsPath val = ("hugsPath", val) haskellProject nm values = RegEntry "HKLM" "Software" (CreateKey False) : RegEntry "HKLM" "Software\\Haskell" (CreateKey False) : RegEntry "HKLM" "Software\\Haskell\\Projects" (CreateKey False) : RegEntry "HKLM" proj_path (CreateKey True) : map (\ (nm,val) -> RegEntry "HKLM" proj_path (CreateName (Just nm) val)) values where proj_path = "Software\\Haskell\\Projects\\"++nm features :: [(String, String)] features = [ baseFeature ] baseFeature :: (String, String) baseFeature = ("SOE", "School of Expression") startMenu :: (String, [Shortcut]) startMenu = ("School of Expression", entries) where entries :: [Shortcut] entries = [ Shortcut "Source code" "c:\\src\\soelib\\src\\Code.html" "" "Example code" (Just ("c:\\src\\bamse\\soe\\html.exe")) 1 "[TARGETDIR]src" ] desktopShortcuts :: [Shortcut] desktopShortcuts = [] extensions :: [ Extension ] extensions = [] verbs :: [ ( String -- extension , String -- verb , String -- label , String -- arguments ) ] verbs = [] dirTrees :: IO [DirTree] dirTrees = do fs <- findFiles ofInterest (srcDir ++ "\\soelib") return [fs] where ofInterest file = not (last file == '~') license :: Maybe FilePath license = Nothing -- Just "c:\\src\\soelib\\license.rtf" userRegistration :: Bool userRegistration = False defaultInstallFolder :: Maybe String defaultInstallFolder = Nothing