diff --git a/Build/NullSoftInstaller.hs b/Build/NullSoftInstaller.hs index 1dcc26cf66..b50f64db35 100644 --- a/Build/NullSoftInstaller.hs +++ b/Build/NullSoftInstaller.hs @@ -37,16 +37,15 @@ main = do mustSucceed "ln" [File "dist/build/git-annex/git-annex.exe", File gitannex] let license = tmpdir licensefile mustSucceed "sh" [Param "-c", Param $ "zcat standalone/licences.gz > '" ++ license ++ "'"] - extrafiles <- forM (cygwinPrograms ++ cygwinDlls) $ \f -> do + extrabins <- forM (cygwinPrograms ++ cygwinDlls) $ \f -> do p <- searchPath f when (isNothing p) $ print ("unable to find in PATH", f) return p - let webappscript = tmpdir "git-annex-webapp.vbs" webappscript <- vbsLauncher tmpdir "git-annex-webapp" "git-annex webapp" autostartscript <- vbsLauncher tmpdir "git-annex-autostart" "git annex assistant --autostart" - writeFile nsifile $ makeInstaller gitannex license $ - catMaybes extrafiles ++ + writeFile nsifile $ makeInstaller gitannex license + (catMaybes extrabins) [ webappscript, autostartscript ] mustSucceed "makensis" [File nsifile] removeFile nsifile -- left behind if makensis fails @@ -82,7 +81,7 @@ uninstaller :: FilePath uninstaller = "git-annex-uninstall.exe" gitInstallDir :: Exp FilePath -gitInstallDir = fromString "$PROGRAMFILES\\Git\\bin" +gitInstallDir = fromString "$PROGRAMFILES\\Git" startMenuItem :: Exp FilePath startMenuItem = "$SMPROGRAMS/git-annex.lnk" @@ -99,8 +98,8 @@ needGit = strConcat , fromString "You can install git from http:////git-scm.com//" ] -makeInstaller :: FilePath -> FilePath -> [FilePath] -> String -makeInstaller gitannex license extrafiles = nsis $ do +makeInstaller :: FilePath -> FilePath -> [FilePath] -> [FilePath] -> String +makeInstaller gitannex license extrabins launchers = nsis $ do name "git-annex" outFile $ str installer {- Installing into the same directory as git avoids needing to modify @@ -122,7 +121,7 @@ makeInstaller gitannex license extrafiles = nsis $ do [ Target "wscript.exe" , Parameters "\"$INSTDIR/git-annex-webapp.vbs\"" , StartOptions "SW_SHOWNORMAL" - , IconFile "$INSTDIR/git-annex.exe" + , IconFile "$INSTDIR/bin/git-annex.exe" , IconIndex 2 , KeyboardShortcut "ALT|CONTROL|a" , Description "git-annex webapp" @@ -131,27 +130,33 @@ makeInstaller gitannex license extrafiles = nsis $ do [ Target "wscript.exe" , Parameters "\"$INSTDIR/git-annex-autostart.vbs\"" , StartOptions "SW_SHOWNORMAL" - , IconFile "$INSTDIR/git-annex.exe" + , IconFile "$INSTDIR/bin/git-annex.exe" , IconIndex 2 , Description "git-annex autostart" ] -- Groups of files to install - section "main" [] $ do - setOutPath "$INSTDIR" + section "bins" [] $ do + setOutPath "$INSTDIR\\bin" addfile gitannex + mapM_ addfile extrabins + section "meta" [] $ do + setOutPath "$INSTDIR" addfile license - mapM_ addfile extrafiles + mapM_ addfile launchers writeUninstaller $ str uninstaller uninstall $ do delete [RebootOK] $ startMenuItem delete [RebootOK] $ autoStartItem - mapM_ (\f -> delete [RebootOK] $ fromString $ "$INSTDIR/" ++ f) $ - [ gitannexprogram - , licensefile + removefilesFrom "$INSTDIR" $ + [ license , uninstaller - ] ++ cygwinPrograms ++ cygwinDlls ++ extrafiles + ] ++ launchers + removefilesFrom "$INSTDIR/bin" $ + [ gitannex + ] ++ extrabins where addfile f = file [] (str f) + removefilesFrom d = mapM_ (\f -> delete [RebootOK] $ fromString $ d ++ "/" ++ takeFileName f) cygwinPrograms :: [FilePath] cygwinPrograms = map (\p -> p ++ ".exe") bundledPrograms diff --git a/debian/changelog b/debian/changelog index 42f836bedd..8640175ab5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,8 @@ git-annex (5.20140710) UNRELEASED; urgency=medium gcrypt-publish-participants. * Install nautilus hooks even when ~/.local/share/nautilus/ does not yet exist, since it is not automatically created for Gnome 3 users. + * Windows: Move .vbs files out of git\bin, to avoid that being in the + PATH, which caused some weird breakage. (Thanks, divB) -- Joey Hess Wed, 09 Jul 2014 23:29:21 -0400