From b3372adb7e6c6dca8809e15278fd83c5ca394322 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 14 May 2013 17:15:02 -0400 Subject: add check for git --- Build/NullSoftInstaller.hs | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/Build/NullSoftInstaller.hs b/Build/NullSoftInstaller.hs index 6aa76de04..8b1a5e91c 100755 --- a/Build/NullSoftInstaller.hs +++ b/Build/NullSoftInstaller.hs @@ -2,6 +2,18 @@ - - git-annex should already be built by cabal, and ssh and rsync, - as well as cygwin libraries, already installed. + - + - This uses the Haskell nsis package (cabal install nsis) + - to generate a .nsi file, which is then used to produce + - 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. + - + - Copyright 2013 Joey Hess + - + - Licensed under the GNU GPL version 3 or higher. -} {-# LANGUAGE OverloadedStrings #-} @@ -10,9 +22,13 @@ import Development.NSIS main = writeFile "git-annex.nsi" $ nsis $ do name "git-annex" - outFile "git-annex.exe" + outFile "git-annex-installer.exe" installDir "$DESKTOP/git-annex" requestExecutionLevel User + iff_ (fileExists "$WINDIR/git.exe") + (return ()) $ do + messageBox [MB_ABORTRETRYIGNORE] + "git does not seem to be installed. git-annex can't be used without git!" -- Pages to display page Directory -- Pick where to install page InstFiles -- Give a progress bar while installing @@ -22,7 +38,12 @@ main = writeFile "git-annex.nsi" $ nsis $ do file [] "dist/build/git-annex/git-annex.exe" fromcygwin "rsync.exe" fromcygwin "ssh.exe" + fromcygwin "sha256.exe" + fromcygwin "sha1.exe" + fromcygwin "sha512.exe" + fromcygwin "sha384.exe" section "DLLS" [] $ mapM_ fromcygwin + setOutPath "$INSTDIR" [ "cygwin1.dll" , "cygasn1-8.dll" , "cygheimbase-1.dll" -- cgit v1.2.3