diff options
Diffstat (limited to 'Build')
-rw-r--r-- | Build/BundledPrograms.hs | 11 | ||||
-rw-r--r-- | Build/NullSoftInstaller.hs | 27 |
2 files changed, 19 insertions, 19 deletions
diff --git a/Build/BundledPrograms.hs b/Build/BundledPrograms.hs index 2f38b11c9..dea93c18e 100644 --- a/Build/BundledPrograms.hs +++ b/Build/BundledPrograms.hs @@ -20,7 +20,7 @@ bundledPrograms :: [FilePath] bundledPrograms = catMaybes [ Nothing #ifndef mingw32_HOST_OS - -- git is not included in the windows bundle; msysgit is used + -- git is not included in the windows bundle; git for windows is used , Just "git" -- Not strictly needed in PATH by git-annex, but called -- by git when it sshes to a remote. @@ -28,7 +28,6 @@ bundledPrograms = catMaybes , Just "git-receive-pack" , Just "git-shell" #endif - , Just "cp" #ifndef mingw32_HOST_OS -- using xargs on windows led to problems, so it's not used there , Just "xargs" @@ -38,7 +37,7 @@ bundledPrograms = catMaybes #ifndef mingw32_HOST_OS -- OS X has ssh installed by default. -- Linux probably has ssh, but not guaranteed. - -- On Windows, msysgit provides ssh. + -- On Windows, git provides ssh. , Just "ssh" , Just "ssh-keygen" #endif @@ -46,7 +45,6 @@ bundledPrograms = catMaybes #ifndef mingw32_HOST_OS , Just "sh" #endif - , SysConfig.gpg , ifset SysConfig.curl "curl" #ifndef darwin_HOST_OS -- wget on OSX has been problimatic, looking for certs in the wrong @@ -56,11 +54,16 @@ bundledPrograms = catMaybes #endif , SysConfig.lsof , SysConfig.gcrypt +#ifndef mingw32_HOST_OS + -- All these utilities are included in git for Windows + , SysConfig.gpg , SysConfig.sha1 , SysConfig.sha256 , SysConfig.sha512 , SysConfig.sha224 , SysConfig.sha384 + , Just "cp" +#endif #ifdef linux_HOST_OS -- used to unpack the tarball when upgrading , Just "gunzip" diff --git a/Build/NullSoftInstaller.hs b/Build/NullSoftInstaller.hs index e300036e4..7726fdcbc 100644 --- a/Build/NullSoftInstaller.hs +++ b/Build/NullSoftInstaller.hs @@ -1,7 +1,7 @@ {- Generates a NullSoft installer program for git-annex on Windows.
-
- To build the installer, git-annex should already be built by cabal,
- - and ssh and rsync etc, as well as cygwin libraries, already installed
+ - and the necessary utility programs already installed
- from cygwin.
-
- This uses the Haskell nsis package (cabal install nsis)
@@ -9,8 +9,9 @@ - git-annex-installer.exe
-
- The installer includes git-annex, and utilities it uses, with the
- - exception of git. The user needs to install git separately,
- - and the installer checks for that.
+ - exception of git and some utilities that are bundled with git.
+ - The user needs to install git separately, and the installer checks
+ - for that.
-
- Copyright 2013-2015 Joey Hess <id@joeyh.name>
-
@@ -34,6 +35,7 @@ import Utility.Path import Utility.CopyFile
import Utility.SafeCommand
import Utility.Process
+import Utility.Exception
import Build.BundledPrograms
main = do
@@ -42,7 +44,7 @@ main = do mustSucceed "ln" [File "dist/build/git-annex/git-annex.exe", File gitannex]
let license = tmpdir </> licensefile
mustSucceed "sh" [Param "-c", Param $ "zcat standalone/licences.gz > '" ++ license ++ "'"]
- extrabins <- forM (cygwinPrograms) $ \f -> do
+ extrabins <- forM (winPrograms) $ \f -> do
p <- searchPath f
when (isNothing p) $
print ("unable to find in PATH", f)
@@ -54,7 +56,7 @@ main = do let htmlhelp = tmpdir </> "git-annex.html"
writeFile htmlhelp htmlHelpText
writeFile nsifile $ makeInstaller gitannex license htmlhelp
- (wrappers ++ catMaybes (extrabins ++ dllpaths))
+ (catMaybes (extrabins ++ dllpaths))
[ webappscript, autostartscript ]
mustSucceed "makensis" [File nsifile]
removeFile nsifile -- left behind if makensis fails
@@ -173,10 +175,10 @@ makeInstaller gitannex license htmlhelp extrabins launchers = nsis $ do addfile f = file [] (str f)
removefilesFrom d = mapM_ (\f -> delete [RebootOK] $ fromString $ d ++ "/" ++ takeFileName f)
-cygwinPrograms :: [FilePath]
-cygwinPrograms = map (\p -> p ++ ".exe") bundledPrograms
+winPrograms :: [FilePath]
+winPrograms = map (\p -> p ++ ".exe") bundledPrograms
--- msysgit opens Program Files/Git/doc/git/html/git-annex.html
+-- git opens Program Files/Git/doc/git/html/git-annex.html
-- when git annex --help is run.
htmlHelpText :: String
htmlHelpText = unlines
@@ -191,15 +193,10 @@ htmlHelpText = unlines -- Find cygwin libraries used by the specified executable.
findCygLibs :: FilePath -> IO [FilePath]
-findCygLibs p = filter iscyg . mapMaybe parse . lines <$> readProcess "ldd" [p]
+findCygLibs p = filter iscyg . mapMaybe parse . lines
+ <$> catchDefaultIO "" (readProcess "ldd" [p])
where
parse l = case words (dropWhile isSpace l) of
(dll:"=>":_dllpath:_offset:[]) -> Just dll
_ -> Nothing
iscyg f = "cyg" `isPrefixOf` f || "lib" `isPrefixOf` f
-
-wrappers :: [FilePath]
-wrappers =
- [ "standalone\\windows\\ssh.cmd"
- , "standalone\\windows\\ssh-keygen.cmd"
- ]
|