summaryrefslogtreecommitdiff
path: root/Build/NullSoftInstaller.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-01-29 13:43:52 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-01-29 13:43:52 -0400
commit69f55ab05e62d59fa37c347dc2247fba839ae4cb (patch)
tree56b3f7daeabedf6d90e5b3e3b64d5f91225efbc3 /Build/NullSoftInstaller.hs
parentf062f10796fc20858554891a0c24838faa83038c (diff)
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
Diffstat (limited to 'Build/NullSoftInstaller.hs')
-rw-r--r--Build/NullSoftInstaller.hs26
1 files changed, 22 insertions, 4 deletions
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
+ [ "<html>"
+ , "<title>git-annex help</title>"
+ , "<body>"
+ , "For help on git-annex, run \"git annex help\", or"
+ , "<a href=\"https://git-annex.branchable.com/git-annex/\">read the man page</a>."
+ , "</body>"
+ , "</html"
+ ]