packages feed

nsis 0.2.4 → 0.2.5

raw patch · 7 files changed

+30/−18 lines, 7 filesdep +directoryPVP ok

version bump matches the API change (PVP)

Dependencies added: directory

API changes (from Hackage documentation)

+ Development.NSIS: OName :: (Exp String) -> Attrib

Files

CHANGES.txt view
@@ -1,5 +1,7 @@ Changelog for NSIS +0.2.5+    Support OName on file 0.2.4     #3, clone the EnvVarUpdate plugin     Add abort
Development/NSIS/Show.hs view
@@ -83,7 +83,7 @@     [unwords $ "SectionGroup" : ["/e"|secgExpanded] ++ [show secgName, "_sec" ++ show secgId]] ++     map indent (outs fs xs) ++     ["SectionGroupEnd"]-out fs (File AFile{..}) = [unwords $ "File" : ["/nonfatal"|fileNonFatal] ++ ["/r"|fileRecursive] ++ [show filePath]]+out fs (File AFile{..}) = [unwords $ "File" : ["/nonfatal"|fileNonFatal] ++ ["/r"|fileRecursive] ++ [show $ Literal "/oname=" : x | Just x <- [fileOName]] ++ [show filePath]] out fs (Labeled i) = [show i ++ ":"] out fs (CreateShortcut AShortcut{..}) = return $ unwords $     ["CreateShortcut", show scFile, show scTarget, show scParameters, show scIconFile
Development/NSIS/Sugar.hs view
@@ -536,6 +536,7 @@     | KeyboardShortcut String     | Id SectionId     | Timeout Int+    | OName (Exp String)       deriving Show  @@ -955,10 +956,11 @@         f c x = error $ "Invalid attribute to setCompress: " ++ show x  file :: [Attrib] -> Exp FilePath -> Action ()-file as x = do Value x <- x; emit $ File $ foldl f def{filePath=x} as+file as x = do Value x <- x; emit . File =<< foldM f def{filePath=x} as     where-        f c Recursive = c{fileRecursive=True}-        f c NonFatal = c{fileNonFatal=True}+        f c Recursive = return c{fileRecursive=True}+        f c NonFatal = return c{fileNonFatal=True}+        f c (OName x) = do Value x <- x; return c{fileOName=Just x}         f c x = error $ "Invalid attribute to file: " ++ show x  section :: Exp String -> [Attrib] -> Action () -> Action ()
Development/NSIS/Type.hs view
@@ -204,9 +204,10 @@     {filePath :: Val     ,fileNonFatal :: Bool     ,fileRecursive :: Bool+    ,fileOName :: Maybe Val     } deriving (Data,Typeable,Show) -instance Default AFile where def = AFile def False False+instance Default AFile where def = AFile def False False Nothing  data ARMDir = ARMDir     {rmDir :: Val
LICENSE view
@@ -1,4 +1,4 @@-Copyright Neil Mitchell 2012-2014.+Copyright Neil Mitchell 2012-2015. All rights reserved.  Redistribution and use in source and binary forms, with or without
Main.hs view
@@ -5,9 +5,9 @@ import Data.List import Data.Maybe import System.Process+import System.Directory import System.Environment import System.Exit-import System.Info  import Development.NSIS import Examples.Base64@@ -21,7 +21,7 @@   examples = let (*) = (,) in-    ["base64" * base64, "example1" * example1, "example2" * example2+    ["example1" * example1, "example2" * example2, "base64" * base64     ,"finish" * finish, "primes" * primes, "taskbar" * taskbar     ,"winmessages" * winmessages, "envvarupdate" * envvarupdate] @@ -38,6 +38,7 @@             ,"  --help     Show this message"             ,"  --nowrite  Don't write out the scripts"             ,"  --nobuild  Don't build"+            ,"  --build    Do build"             ,"  --run      Run the result"             ]         exitSuccess@@ -46,15 +47,20 @@         putStrLn "** Running nsis test suite, run with '--help' to see arguments **"         putStrLn "*****************************************************************"     names <- return $ if null names then map fst examples else names++    b <- findExecutable "makensis"+    let build | "--build" `elem` flags = True+              | "--nobuild" `elem` flags = False+              | otherwise = isJust b+     forM_ names $ \name -> do         let script = fromMaybe (error $ "Unknown example: " ++ name) $ lookup name examples         unless ("--nowrite" `elem` flags) $ writeFile (name ++ ".nsi") $ nsis script-        unless ("--nobuild" `elem` flags) $-            if os == "mingw32" then do-                r <- system $ "makensis " ++ name ++ ".nsi"-                when (r /= ExitSuccess) $ error "NSIS FAILED"-            else-                putStrLn "Not building because not on Windows"+        when build $ do+            r <- system $ "makensis -V3 " ++ name ++ ".nsi"+            when (r /= ExitSuccess) $ error "NSIS FAILED"         when ("--run" `elem` flags) $ do             system $ name ++ ".exe"             return ()+    when (isNothing b) $+        putStrLn "Warning: No nsis on the PATH, files were not built"
nsis.cabal view
@@ -1,15 +1,15 @@ cabal-version:      >= 1.10 build-type:         Simple name:               nsis-version:            0.2.4+version:            0.2.5 license:            BSD3 license-file:       LICENSE category:           Development author:             Neil Mitchell <ndmitchell@gmail.com> maintainer:         Neil Mitchell <ndmitchell@gmail.com>-copyright:          Neil Mitchell 2012-2014+copyright:          Neil Mitchell 2012-2015 synopsis:           DSL for producing Windows Installer using NSIS.-tested-with:        GHC==7.8.3, GHC==7.6.3, GHC==7.4.2, GHC==7.2.2+tested-with:        GHC==7.10.1, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2, GHC==7.2.2 description:     NSIS (Nullsoft Scriptable Install System, <http://nsis.sourceforge.net/>) is a tool that allows programmers     to create installers for Windows.@@ -47,7 +47,7 @@         Development.NSIS.Sugar         Development.NSIS.Type -test-suite shake-test+test-suite nsis-test     default-language: Haskell2010     type: exitcode-stdio-1.0     main-is: Main.hs@@ -55,6 +55,7 @@         base == 4.*,         transformers >= 0.2,         uniplate >= 1.5,+        directory,         process      other-modules: