From 112bb82fc2caa1d2b6bf1a9aa28f24e36d5aedbe Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 21 Jan 2019 15:47:32 -0400 Subject: [PATCH] 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. --- Build/NullSoftInstaller.hs | 11 ++++++++++- CHANGELOG | 3 +++ ...8___autostart_for_annex_64bit_looks_under_x86.mdwn | 3 +++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Build/NullSoftInstaller.hs b/Build/NullSoftInstaller.hs index 0f56eef12b..257b60851d 100644 --- a/Build/NullSoftInstaller.hs +++ b/Build/NullSoftInstaller.hs @@ -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. diff --git a/CHANGELOG b/CHANGELOG index 27f70f9efb..719cde42bb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -36,6 +36,9 @@ git-annex (7.20181212) UNRELEASED; urgency=medium * The .git/annex/misctmp directory is no longer used and git-annex will delete anything lingering in there after it's 1 week old. * Estimated time to completion display shortened from eg "1h1m1s" to "1h1m". + * Windows: If 64 bit git is installed, use it when installing git-annex. + (However, rsync still won't work and this is still not the documented way + to install it.) -- Joey Hess Tue, 18 Dec 2018 12:24:52 -0400 diff --git a/doc/bugs/windows__58___autostart_for_annex_64bit_looks_under_x86.mdwn b/doc/bugs/windows__58___autostart_for_annex_64bit_looks_under_x86.mdwn index 77eb3fe849..c8c776b5ae 100644 --- a/doc/bugs/windows__58___autostart_for_annex_64bit_looks_under_x86.mdwn +++ b/doc/bugs/windows__58___autostart_for_annex_64bit_looks_under_x86.mdwn @@ -6,3 +6,6 @@ The problem came upon reboot when I got "Windows Script Host" error "Can not fin P.S. I really hope that someone eventually takes time to make git-annex become available for Windows from conda-forge. [[!meta author=yoh]] + +> Made the NSIS gitInstallDir probe which of PROGRAMFILES/Git +> and PROGRAMFILES/Git exists, and use whichever. [[done]] --[[Joey]]