withTmpDir "nsis-build" $ \tmpdir -> do\r
let gitannex = tmpdir </> gitannexprogram\r
mustSucceed "ln" [File "git-annex.exe", File gitannex]\r
+ mapM_ (\f -> mustSucceed "ln" [File f, File (tmpdir </> f)]) (magicDLLs ++ magicShare)\r
let license = tmpdir </> licensefile\r
mustSucceed "sh" [Param "-c", Param $ "zcat standalone/licences.gz > '" ++ license ++ "'"]\r
webappscript <- vbsLauncher tmpdir "git-annex-webapp" "git annex webapp"\r
let gitannexcmd = tmpdir </> "git-annex.cmd"\r
writeFile gitannexcmd "git annex %*"\r
writeFile nsifile $ makeInstaller\r
- gitannex gitannexcmd license htmlhelp winPrograms\r
+ gitannex gitannexcmd license htmlhelp (winPrograms ++ magicDLLs) magicShare\r
[ webappscript, autostartscript ]\r
mustSucceed "makensis" [File nsifile]\r
removeFile nsifile -- left behind if makensis fails\r
, fromString "You can install git from http:////git-scm.com//"\r
]\r
\r
-makeInstaller :: FilePath -> FilePath -> FilePath -> FilePath -> [FilePath] -> [FilePath] -> String\r
-makeInstaller gitannex gitannexcmd license htmlhelp extrabins launchers = nsis $ do\r
+makeInstaller :: FilePath -> FilePath -> FilePath -> FilePath -> [FilePath] -> [FilePath] -> [FilePath] -> String\r
+makeInstaller gitannex gitannexcmd license htmlhelp extrabins sharefiles launchers = nsis $ do\r
name "git-annex"\r
outFile $ str installer\r
{- Installing into the same directory as git avoids needing to modify\r
-- there.\r
setOutPath "$INSTDIR\\usr\\bin"\r
mapM_ addfile (gitannex:extrabins)\r
+ setOutPath "$INSTDIR\\usr\\share\\misc"\r
+ mapM_ addfile sharefiles\r
-- This little wrapper is installed in the cmd directory,\r
-- so that "git-annex" works (as well as "git annex"),\r
-- when only that directory is in PATH (ie, in a ms-dos\r