get git-annex working even if user doesn't add git to path

This is pretty complicated, but I have both "git-annex" and "git annex"
working both in the git bash shell even with git not added to path.
And, when git's added to path, both work from MS-DOS prompt window too.

I think that the webapp startup does still need git in path, so
instructions will keep saying to do that. But, users often disregard them,
and hopefully this will reduce support traffic.

Also, switched the wget from the cygwin one to the msys2 one, avoiding the
complication of needing to bundle any cygwin dlls.
This commit is contained in:
Joey Hess 2015-09-11 12:32:00 -04:00
parent e766dcc940
commit c7a6296ef3
4 changed files with 49 additions and 46 deletions

View file

@ -35,7 +35,4 @@ fi
# Build the installer
cabal install nsis
ghc --make Build/NullSoftInstaller.hs -fno-warn-tabs
PATH="$PATH:/cygdrive/c/Program Files/NSIS"
# Want to include cygwin programs in bundle, not others, since
# it includes the cygwin libs that go with them.
withcygpreferred Build/NullSoftInstaller.exe
PATH="$PATH:/cygdrive/c/Program Files/NSIS" Build/NullSoftInstaller.exe

View file

@ -58,20 +58,25 @@ if ! withcyg cabal build; then
Build/EvilLinker
fi
# Build the installer
cabal install nsis
ghc -fforce-recomp --make Build/NullSoftInstaller.hs -fno-warn-tabs
# Want to include cygwin programs in bundle, not others, since
# it includes the cygwin libs that go with them.
# Currently need an different version of rsync than the one from cygwin.
# This rsync build originally comes from https://msys2.github.io/,
# and it works with the ssh bundled with git for windows.
# Get extra programs to bundle with git-annex.
# These are msys2 programs, from https://msys2.github.io/.
# Since git for windows uses msys2, and includes its libraries,
# these programs will work well with it.
if [ ! -e rsync.exe ] || [ "$(sha1sum rsync.exe)" != "85cb7a4d16d274fcf8069b39042965ad26abd6aa" ]; then
rm -f rsync.exe || true
withcyg wget https://downloads.kitenet.net/git-annex/windows/assets/rsync.exe
withcyg chmod +x rsync.exe
fi
PATH=".:/c/cygwin/bin:$PATH" Build/NullSoftInstaller.exe
if [ ! -e wget.exe ] || [ "$(sha1sum wget.exe)" != "044380729200d5762965b10123a4f134806b01cf" ]; then
rm -f wget.exe || true
withcyg wget https://downloads.kitenet.net/git-annex/windows/assets/wget.exe
withcyg chmod +x wget.exe
fi
# Build the installer
cabal install nsis
ghc -fforce-recomp --make Build/NullSoftInstaller.hs -fno-warn-tabs
Build/NullSoftInstaller.exe
rm -f last-incremental-failed