move git-annex to git/cmd

This way, it works both when using msgit, which will look in both bin and
cmd, but also when using cygwin's git, which only looks in PATH, which
includes cmd but not bin.
This commit is contained in:
Joey Hess 2014-07-16 18:05:40 -04:00
parent a6fdc4b3bc
commit 5afc8b28e0

View file

@ -121,7 +121,7 @@ makeInstaller gitannex license extrabins launchers = nsis $ do
[ Target "wscript.exe" [ Target "wscript.exe"
, Parameters "\"$INSTDIR/git-annex-webapp.vbs\"" , Parameters "\"$INSTDIR/git-annex-webapp.vbs\""
, StartOptions "SW_SHOWNORMAL" , StartOptions "SW_SHOWNORMAL"
, IconFile "$INSTDIR/bin/git-annex.exe" , IconFile "$INSTDIR/cmd/git-annex.exe"
, IconIndex 2 , IconIndex 2
, KeyboardShortcut "ALT|CONTROL|a" , KeyboardShortcut "ALT|CONTROL|a"
, Description "git-annex webapp" , Description "git-annex webapp"
@ -130,15 +130,16 @@ makeInstaller gitannex license extrabins launchers = nsis $ do
[ Target "wscript.exe" [ Target "wscript.exe"
, Parameters "\"$INSTDIR/git-annex-autostart.vbs\"" , Parameters "\"$INSTDIR/git-annex-autostart.vbs\""
, StartOptions "SW_SHOWNORMAL" , StartOptions "SW_SHOWNORMAL"
, IconFile "$INSTDIR/bin/git-annex.exe" , IconFile "$INSTDIR/cmd/git-annex.exe"
, IconIndex 2 , IconIndex 2
, Description "git-annex autostart" , Description "git-annex autostart"
] ]
-- Groups of files to install
section "bins" [] $ do section "bins" [] $ do
setOutPath "$INSTDIR\\bin" setOutPath "$INSTDIR\\bin"
addfile gitannex
mapM_ addfile extrabins mapM_ addfile extrabins
section "cmd" [] $ do
setOutPath "$INSTDIR\\cmd"
addfile gitannex
section "meta" [] $ do section "meta" [] $ do
setOutPath "$INSTDIR" setOutPath "$INSTDIR"
addfile license addfile license
@ -147,13 +148,13 @@ makeInstaller gitannex license extrabins launchers = nsis $ do
uninstall $ do uninstall $ do
delete [RebootOK] $ startMenuItem delete [RebootOK] $ startMenuItem
delete [RebootOK] $ autoStartItem delete [RebootOK] $ autoStartItem
removefilesFrom "$INSTDIR/bin" extrabins
removefilesFrom "$INSTDIR/cmd" [gitannex]
removefilesFrom "$INSTDIR" $ removefilesFrom "$INSTDIR" $
launchers ++
[ license [ license
, uninstaller , uninstaller
] ++ launchers ]
removefilesFrom "$INSTDIR/bin" $
[ gitannex
] ++ extrabins
where where
addfile f = file [] (str f) addfile f = file [] (str f)
removefilesFrom d = mapM_ (\f -> delete [RebootOK] $ fromString $ d ++ "/" ++ takeFileName f) removefilesFrom d = mapM_ (\f -> delete [RebootOK] $ fromString $ d ++ "/" ++ takeFileName f)