From 69f55ab05e62d59fa37c347dc2247fba839ae4cb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 29 Jan 2015 13:43:52 -0400 Subject: windows: include html help file that msysgit tries to open for git annex --help Pointing to the website is easier than trying to format the man page to html on windows. Closes https://github.com/datalad/datalad/issues/39 --- Build/NullSoftInstaller.hs | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'Build') diff --git a/Build/NullSoftInstaller.hs b/Build/NullSoftInstaller.hs index 30e0b53d6..c5fefa894 100644 --- a/Build/NullSoftInstaller.hs +++ b/Build/NullSoftInstaller.hs @@ -44,7 +44,9 @@ main = do return p webappscript <- vbsLauncher tmpdir "git-annex-webapp" "git-annex webapp" autostartscript <- vbsLauncher tmpdir "git-annex-autostart" "git annex assistant --autostart" - writeFile nsifile $ makeInstaller gitannex license + let htmlhelp = tmpdir "git-annex.html" + writeFile htmlhelp htmlHelpText + writeFile nsifile $ makeInstaller gitannex license htmlhelp (catMaybes extrabins) [ webappscript, autostartscript ] mustSucceed "makensis" [File nsifile] @@ -95,11 +97,11 @@ needGit = strConcat , gitInstallDir , fromString " , it seems to not be installed, " , fromString "or may be installed in another location. " - , fromString "You can install git from http://git-scm.com//" + , fromString "You can install git from http:////git-scm.com//" ] -makeInstaller :: FilePath -> FilePath -> [FilePath] -> [FilePath] -> String -makeInstaller gitannex license extrabins launchers = nsis $ do +makeInstaller :: FilePath -> FilePath -> FilePath -> [FilePath] -> [FilePath] -> String +makeInstaller gitannex license htmlhelp extrabins launchers = nsis $ do name "git-annex" outFile $ str installer {- Installing into the same directory as git avoids needing to modify @@ -137,6 +139,8 @@ makeInstaller gitannex license extrabins launchers = nsis $ do setOutPath "$INSTDIR\\cmd" mapM_ addfile (gitannex:extrabins) section "meta" [] $ do + setOutPath "$INSTDIR\\doc\\git\\html" + addfile htmlhelp setOutPath "$INSTDIR" addfile license mapM_ addfile launchers @@ -145,6 +149,7 @@ makeInstaller gitannex license extrabins launchers = nsis $ do delete [RebootOK] $ startMenuItem delete [RebootOK] $ autoStartItem removefilesFrom "$INSTDIR/cmd" (gitannex:extrabins) + removefilesFrom "$INSTDIR\\doc\\git\\html" [htmlhelp] removefilesFrom "$INSTDIR" $ launchers ++ [ license @@ -196,3 +201,16 @@ cygwinDlls = , "cygncursesw-10.dll" , "cygusb0.dll" ] + +-- msysgit opens Program Files/Git/doc/git/html/git-annex.html +-- when git annex --help is run. +writeHtmlText :: String +writeHtmlText = unlines + [ "" + , "git-annex help" + , "" + , "For help on git-annex, run \"git annex help\", or" + , "read the man page." + , "" + , "