aboutsummaryrefslogtreecommitdiff
path: root/Build/NullSoftInstaller.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-05-16 20:41:20 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-05-16 20:41:20 -0400
commit3ea7a804e003d52e6fd3eb4ddc059b064a22284c (patch)
tree162d0a3f10aeca0500fe4d83518632242e1c3b15 /Build/NullSoftInstaller.hs
parent22a3eac594e903d6177450170ab534b878663c43 (diff)
fix uninstall of some files
Diffstat (limited to 'Build/NullSoftInstaller.hs')
-rw-r--r--Build/NullSoftInstaller.hs22
1 files changed, 16 insertions, 6 deletions
diff --git a/Build/NullSoftInstaller.hs b/Build/NullSoftInstaller.hs
index 5cb108a3a..8894585b6 100644
--- a/Build/NullSoftInstaller.hs
+++ b/Build/NullSoftInstaller.hs
@@ -31,9 +31,9 @@ import Build.BundledPrograms
main = do
withTmpDir "nsis-build" $ \tmpdir -> do
- let gitannex = tmpdir </> "git-annex.exe"
+ let gitannex = tmpdir </> gitannexprogram
mustSucceed "ln" [File "dist/build/git-annex/git-annex.exe", File gitannex]
- let license = tmpdir </> "git-annex-licenses.txt"
+ let license = tmpdir </> licensefile
mustSucceed "sh" [Param "-c", Param $ "zcat standalone/licences.gz > '" ++ license ++ "'"]
writeFile nsifile $ makeInstaller gitannex license
mustSucceed "C:\\Program Files\\NSIS\\makensis" [File nsifile]
@@ -46,9 +46,18 @@ main = do
True -> return ()
False -> error $ cmd ++ " failed"
+gitannexprogram :: FilePath
+gitannexprogram = "git-annex.exe"
+
+licensefile :: FilePath
+licensefile = "git-annex-licenses.txt"
+
installer :: FilePath
installer = "git-annex-installer.exe"
+uninstaller :: FilePath
+uninstaller = "git-annex-uninstall.exe"
+
gitInstallDir :: Exp FilePath
gitInstallDir = fromString "$PROGRAMFILES\\Git\\cmd"
@@ -84,14 +93,15 @@ makeInstaller gitannex license = nsis $ do
addfile gitannex
addfile license
mapM_ addcygfile cygwinPrograms
- writeUninstaller "git-annex-uninstall.exe"
+ writeUninstaller $ str uninstaller
section "libraries" [] $ do
setOutPath "$INSTDIR"
mapM_ addcygfile cygwinDlls
uninstall $
- mapM_ (\f -> delete [RebootOK] $ fromString $ "$INSTDIR/" ++ f)
- [ gitannex
- , license
+ mapM_ (\f -> delete [RebootOK] $ fromString $ "$INSTDIR/" ++ f) $
+ [ gitannexprogram
+ , licensefile
+ , uninstaller
] ++ cygwinPrograms ++ cygwinDlls
where
addfile f = file [] (str f)