packages feed

bamse 0.9.4 → 0.9.5

raw patch · 21 files changed

+58/−32 lines, 21 files

Files

Bamse/Builder.hs view
@@ -38,9 +38,12 @@  import System.Cmd import System.IO-import Data.Maybe import Bamse.Options++import Data.Maybe+import Control.Monad import System.Directory+import System.Exit  -- ToDo: --     - ability to organise installed bits into features/sub parts.@@ -63,8 +66,8 @@  genBuilderOpts :: PackageData -> Options -> IO () genBuilderOpts pkg opts = do-  ds             <- (p_fileMap pkg) (opt_ienv opts)-  (dsDist, _ienv) <- mkDistTree (opt_ienv opts)        +  ds              <- (p_fileMap pkg) (opt_ienv opts)+  (dsDist, ienvN) <- mkDistTree (opt_ienv opts)                                 (normalise $ dropTrailingPathSeparator $ srcDir $ opt_ienv opts)   			        (name $ p_pkgInfo pkg) 				(p_distFileMap pkg)@@ -81,7 +84,7 @@ 			    os -> [customizeDialog os]   		, p_productGUID  = fromJust (opt_productGUID opts) 		, p_revisionGUID = fromJust (opt_revisionGUID opts)-		, p_ienv         = opt_ienv opts+		, p_ienv         = ienvN 		, p_verbose      = opt_verbose opts   		}   let bamseDir = toolDir (p_ienv pkg')@@ -91,8 +94,11 @@          WriterEnv              { w_toolDir     = bamseDir    	    , w_templateDir = lFile (lFile bamseDir "data") "msi"-	    , w_outFile     = outFile (p_ienv pkg')-	    , w_srcDir      = normalise (takeDirectory (srcDir $ p_ienv pkg'))+	    , w_outFile     = outFile ienvN+	       -- Note: using the _adjusted_ source directory here+	       -- from the dist tree, not the original one (i.e., want+	       -- to chop out the 'out/..' prefix, of course.)+	    , w_srcDir      = normalise (takeDirectory (srcDir ienvN)) 	    , w_package     = pkg' 	    }     outputMSI wenv tabs ts reps@@ -111,7 +117,7 @@ mkDistTree :: InstallEnv 	   -> FilePath 	   -> String-	   -> Maybe (FilePath -> Maybe FilePath)+	   -> Maybe (InstallEnv -> FilePath -> Maybe FilePath) 	   -> DirTree 	   -> IO (DirTree, InstallEnv) mkDistTree ienv _      _  Nothing   ds = return (ds, ienv)@@ -127,17 +133,30 @@   where     copyOver _ Empty         = return ()     copyOver outDir (File f) = do-      case fn f of+      case fn ienv f of         Nothing  -> return () 	Just fnm -> do-          let cmd = ("copy /b \"" ++ fnm ++ "\" \"" ++ +          let cmd = ("copy /b \"" ++ f ++ "\" \"" ++  	             appendP outDir (dropDirPrefix topDir fnm) ++ "\" > nul")-          system cmd+--          putStrLn ("Creating dir: " ++ fnm ++ ' ':(dropFileName $ appendP outDir (dropDirPrefix topDir fnm)))+          createDirectoryIfMissing True (dropFileName $ appendP outDir (dropDirPrefix topDir fnm))+          system' cmd           return ()     copyOver outDir (Directory fp subs) = do        maybe (return ())-             (\ f -> system ("mkdir " ++ appendP outDir (dropDirPrefix topDir f)) >> return ())-	     (fn fp)+             (\ f -> do+--                 putStrLn ("Creating dirs: " ++ fp ++ ' ':(appendP outDir (dropDirPrefix topDir f)))+	         createDirectoryIfMissing True (appendP outDir (dropDirPrefix topDir f))+		 return ())+	     (fn ienv fp)        mapM_ (copyOver outDir) subs      appendP a b = normalise (a </> b)++    system' cmd = do+--      when vb (hPutStrLn stderr ("Command exec: " ++ cmd))+      rc <- system cmd+      case rc of+       ExitSuccess{} -> return ()+       _ -> putStrLn $ "ERROR: failed exec'ing " ++ show cmd+    
Bamse/MSIExtra.hs view
@@ -51,11 +51,13 @@ shortLong :: String -> String shortLong nm = short_form  where-  badChars = " +,;=[]"+  badChars_short = badChars ++ " +,;=[]"+  badChars = "\\?<>:/*\""+  restricted_short_nm = map (\ ch -> if ch `elem` badChars_short then '_' else ch) nm   restricted_nm = map (\ ch -> if ch `elem` badChars then '_' else ch) nm   ext = case System.FilePath.takeExtension nm of { '.':xs -> xs ; xs -> xs }   short_form -   | length restricted_nm > 8 || length ext > 3 = take 6 (map toUpper restricted_nm) ++ "~1|" ++ nm+   | length nm > 8 || length ext > 3 = take 6 (map toUpper restricted_short_nm) ++ "~1|" ++ restricted_nm    | otherwise = restricted_nm  data MsidbFileAttributes
Bamse/Options.hs view
@@ -237,6 +237,7 @@    let ienv = InstallEnv   		{ toolDir  = maybe bdir id (opt_toolDir opts2) 		, srcDir   = sourceDir+		, srcBaseDir = sourceDir 		, distDir  = error "distDir not filled in yet" 		, outFile  = oFile 		, userOpts = os
Bamse/Package.hs view
@@ -41,6 +41,10 @@ 	   , distDir  :: FilePath -- user-supplied path to directory containing installer 	   	 		 -- template specific files. 	   , outFile  :: FilePath -- file to output installer as.+	   , srcBaseDir :: FilePath -- path to toplevel directory source directory; differs from @srcDir@+	                            -- in that it is in the input source dir, @srcDir@ is updated to+				    -- point to the distribution directory during building. This is+				    -- a bug really (it being updated), but stuck with it for now. 	   , userOpts :: [(String,String)] -- invocation-time (name,value) pairs 	   }    deriving Show@@ -65,7 +69,7 @@ data PackageData  = PackageData { p_files   	        :: DirTree  	       , p_fileMap              :: InstallEnv -> IO DirTree-	       , p_distFileMap          :: Maybe (FilePath -> Maybe FilePath)+	       , p_distFileMap          :: Maybe (InstallEnv -> FilePath -> Maybe FilePath) 	       , p_defOutFile           :: FilePath  	       , p_pkgInfo     	        :: Package 	       , p_webSite 	        :: String
bamse.cabal view
@@ -1,5 +1,5 @@ name: bamse
-version: 0.9.4
+version: 0.9.5
 Synopsis: A Windows Installer (MSI) generator framework
 Description:
    Bamse is a framework for building Windows Installers for
templates/Alex.hs view
@@ -107,7 +107,7 @@    ofInterest file  = not (last file == '~') &&                       not (takeFileName file == "CVS")   -distFileMap :: Maybe (FilePath -> Maybe FilePath)+distFileMap :: Maybe (InstallEnv -> FilePath -> Maybe FilePath) distFileMap = Nothing  featureMap :: Maybe (FilePath -> FeatureName)
templates/Bamse.hs view
@@ -142,7 +142,7 @@ 	"CVS" -> True 	_ -> not (null f) && last f == '~' -distFileMap :: Maybe (FilePath -> Maybe FilePath)+distFileMap :: Maybe (InstallEnv -> FilePath -> Maybe FilePath) distFileMap = Nothing  -- if provided, a mapping from dist tree filename to the
templates/Base.hs view
@@ -105,7 +105,7 @@ dirTree :: InstallEnv -> IO DirTree dirTree _ienv = return Empty -distFileMap :: Maybe (FilePath -> Maybe FilePath)+distFileMap :: Maybe (InstallEnv -> FilePath -> Maybe FilePath) distFileMap = Nothing  featureMap :: Maybe (FilePath -> FeatureName)
templates/ComPkg.hs view
@@ -124,7 +124,7 @@ 	_ -> not (null f) && last f == '~'  -distFileMap :: Maybe (FilePath -> Maybe FilePath)+distFileMap :: Maybe (InstallEnv -> FilePath -> Maybe FilePath) distFileMap = Nothing  featureMap :: Maybe (FilePath -> FeatureName)
templates/Cryptol.hs view
@@ -245,7 +245,7 @@ 	 (null suf || suf `elem` iSuffixes) -} -distFileMap :: Maybe (FilePath -> Maybe FilePath)+distFileMap :: Maybe (InstallEnv -> FilePath -> Maybe FilePath) distFileMap = Nothing  -- if provided, a mapping from dist tree filename to the
templates/GHC.hs view
@@ -149,7 +149,7 @@    ofInterest file  = not (not (null (tail file)) && last file == '~') &&                       not (takeFileName file == "CVS")   -distFileMap :: Maybe (FilePath -> Maybe FilePath)+distFileMap :: Maybe (InstallEnv -> FilePath -> Maybe FilePath) distFileMap = Nothing  featureMap :: Maybe (FilePath -> FeatureName)
templates/GaloisPkg.hs view
@@ -112,7 +112,7 @@    -} -distFileMap :: Maybe (FilePath -> Maybe FilePath)+distFileMap :: Maybe (InstallEnv -> FilePath -> Maybe FilePath) distFileMap = Nothing -- Just ( \ f -> Just (toDist f)) {-  where
templates/Greencard.hs view
@@ -114,7 +114,7 @@ 		      (not (takeExtension file == ".hi") || 		      	   (takeFileName file == "StdDIS.hi"))   -distFileMap :: Maybe (FilePath -> Maybe FilePath)+distFileMap :: Maybe (InstallEnv -> FilePath -> Maybe FilePath) distFileMap = Nothing  featureMap :: Maybe (FilePath -> FeatureName)
templates/HDirectLib.hs view
@@ -86,7 +86,7 @@    ofInterest file  =       (takeExtension file `elem` [""{-directory-}, ".dll", ".hs", ".lhs", ".idl", ".h"])   -distFileMap :: Maybe (FilePath -> Maybe FilePath)+distFileMap :: Maybe (InstallEnv -> FilePath -> Maybe FilePath) distFileMap = Nothing  featureMap :: Maybe (FilePath -> FeatureName)
templates/Haddock.hs view
@@ -108,7 +108,7 @@    ofInterest file  = not (last file == '~') &&                       not (takeFileName file == "CVS")   -distFileMap :: Maybe (FilePath -> Maybe FilePath)+distFileMap :: Maybe (InstallEnv -> FilePath -> Maybe FilePath) distFileMap = Nothing  featureMap :: Maybe (FilePath -> FeatureName)
templates/Happy.hs view
@@ -109,7 +109,7 @@    ofInterest file  = not (last file == '~') &&                       not (takeFileName file == "CVS") -distFileMap :: Maybe (FilePath -> Maybe FilePath)+distFileMap :: Maybe (InstallEnv -> FilePath -> Maybe FilePath) distFileMap = Nothing  featureMap :: Maybe (FilePath -> FeatureName)
templates/HsDotnet.hs view
@@ -99,7 +99,7 @@  where    topDir = srcDir ienv  -distFileMap :: Maybe (FilePath -> Maybe FilePath)+distFileMap :: Maybe (InstallEnv -> FilePath -> Maybe FilePath) distFileMap = Nothing  featureMap :: Maybe (FilePath -> FeatureName)
templates/Hugs98.hs view
@@ -207,7 +207,7 @@ 			, "docs\\users_guide_src" 			]   -distFileMap :: Maybe (FilePath -> Maybe FilePath)+distFileMap :: Maybe (InstallEnv -> FilePath -> Maybe FilePath) distFileMap = Nothing  featureMap :: Maybe (FilePath -> FeatureName)
templates/Hugs98Net.hs view
@@ -131,7 +131,7 @@    	              not (last file == '~') &&                       not (takeFileName file == "CVS")   -distFileMap :: Maybe (FilePath -> Maybe FilePath)+distFileMap :: Maybe (InstallEnv -> FilePath -> Maybe FilePath) distFileMap = Nothing  featureMap :: Maybe (FilePath -> FeatureName)
templates/PubCryptol.hs view
@@ -238,7 +238,7 @@ 	 (null suf || suf `elem` iSuffixes) -} -distFileMap :: Maybe (FilePath -> Maybe FilePath)+distFileMap :: Maybe (InstallEnv -> FilePath -> Maybe FilePath) distFileMap = Nothing  -- if provided, a mapping from dist tree filename to the
templates/SOE.hs view
@@ -103,7 +103,7 @@ defaultInstallFolder = Nothing  -distFileMap :: Maybe (FilePath -> Maybe FilePath)+distFileMap :: Maybe (InstallEnv -> FilePath -> Maybe FilePath) distFileMap = Nothing  -- if provided, a mapping from dist tree filename to the