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
This commit is contained in:
parent
f61d891f2e
commit
5fe41d3ef5
1 changed files with 22 additions and 4 deletions
|
@ -44,7 +44,9 @@ main = do
|
||||||
return p
|
return p
|
||||||
webappscript <- vbsLauncher tmpdir "git-annex-webapp" "git-annex webapp"
|
webappscript <- vbsLauncher tmpdir "git-annex-webapp" "git-annex webapp"
|
||||||
autostartscript <- vbsLauncher tmpdir "git-annex-autostart" "git annex assistant --autostart"
|
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)
|
(catMaybes extrabins)
|
||||||
[ webappscript, autostartscript ]
|
[ webappscript, autostartscript ]
|
||||||
mustSucceed "makensis" [File nsifile]
|
mustSucceed "makensis" [File nsifile]
|
||||||
|
@ -95,11 +97,11 @@ needGit = strConcat
|
||||||
, gitInstallDir
|
, gitInstallDir
|
||||||
, fromString " , it seems to not be installed, "
|
, fromString " , it seems to not be installed, "
|
||||||
, fromString "or may be installed in another location. "
|
, 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 :: FilePath -> FilePath -> FilePath -> [FilePath] -> [FilePath] -> String
|
||||||
makeInstaller gitannex license extrabins launchers = nsis $ do
|
makeInstaller gitannex license htmlhelp extrabins launchers = nsis $ do
|
||||||
name "git-annex"
|
name "git-annex"
|
||||||
outFile $ str installer
|
outFile $ str installer
|
||||||
{- Installing into the same directory as git avoids needing to modify
|
{- 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"
|
setOutPath "$INSTDIR\\cmd"
|
||||||
mapM_ addfile (gitannex:extrabins)
|
mapM_ addfile (gitannex:extrabins)
|
||||||
section "meta" [] $ do
|
section "meta" [] $ do
|
||||||
|
setOutPath "$INSTDIR\\doc\\git\\html"
|
||||||
|
addfile htmlhelp
|
||||||
setOutPath "$INSTDIR"
|
setOutPath "$INSTDIR"
|
||||||
addfile license
|
addfile license
|
||||||
mapM_ addfile launchers
|
mapM_ addfile launchers
|
||||||
|
@ -145,6 +149,7 @@ makeInstaller gitannex license extrabins launchers = nsis $ do
|
||||||
delete [RebootOK] $ startMenuItem
|
delete [RebootOK] $ startMenuItem
|
||||||
delete [RebootOK] $ autoStartItem
|
delete [RebootOK] $ autoStartItem
|
||||||
removefilesFrom "$INSTDIR/cmd" (gitannex:extrabins)
|
removefilesFrom "$INSTDIR/cmd" (gitannex:extrabins)
|
||||||
|
removefilesFrom "$INSTDIR\\doc\\git\\html" [htmlhelp]
|
||||||
removefilesFrom "$INSTDIR" $
|
removefilesFrom "$INSTDIR" $
|
||||||
launchers ++
|
launchers ++
|
||||||
[ license
|
[ license
|
||||||
|
@ -196,3 +201,16 @@ cygwinDlls =
|
||||||
, "cygncursesw-10.dll"
|
, "cygncursesw-10.dll"
|
||||||
, "cygusb0.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"
|
||||||
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue