Windows: If 64 bit git is installed, use it when installing git-annex.

However, rsync still won't work with 64 bit git and
this is still not the documented way to install it.

So, if both 64 and 32 are installed, go with 32.

And if neither git can be found, default to 32.
This commit is contained in:
Joey Hess 2019-01-21 15:47:32 -04:00
parent fe83429451
commit 112bb82fc2
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 16 additions and 1 deletions

View file

@ -87,8 +87,17 @@ installer = "git-annex-installer.exe"
uninstaller :: FilePath
uninstaller = "git-annex-uninstall.exe"
gitInstallDir32 :: Exp FilePath
gitInstallDir32 = fromString "$PROGRAMFILES\\Git"
gitInstallDir64 :: Exp FilePath
gitInstallDir64 = fromString "$PROGRAMFILES64\\Git"
gitInstallDir :: Exp FilePath
gitInstallDir = fromString "$PROGRAMFILES\\Git"
gitInstallDir = fileExists gitInstallDir32 ?
( gitInstallDir32
, fileExists gitInstallDir64 ? (gitInstallDir64, gitInstallDir32)
)
-- This intentionally has a different name than git-annex or
-- git-annex-webapp, since it is itself treated as an executable file.