c7a6296ef3
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.
38 lines
989 B
Bash
Executable file
38 lines
989 B
Bash
Executable file
#!/bin/sh
|
|
# Script to build git-annex on windows. Run by build.bat
|
|
|
|
set -e
|
|
set -x
|
|
|
|
PATH="/c/Program Files/Git/cmd:/c/Program Files/NSIS:$PATH"
|
|
|
|
# Run a command with the cygwin environment available.
|
|
# However, programs not from cygwin are preferred.
|
|
withcyg () {
|
|
PATH="$PATH:/c/cygwin/bin" "$@"
|
|
}
|
|
withcygpreferred () {
|
|
PATH="/c/cygwin/bin:$PATH" "$@"
|
|
}
|
|
|
|
# Install haskell dependencies.
|
|
# cabal install is not run in cygwin, because we don't want configure scripts
|
|
# for haskell libraries to link them with the cygwin library.
|
|
if ! cabal install --only-dependencies; then
|
|
cabal update || true
|
|
cabal install --only-dependencies
|
|
fi
|
|
|
|
# Build git-annex
|
|
if [ ! -e "dist/setup-config" ]; then
|
|
withcyg cabal configure
|
|
fi
|
|
if ! withcyg cabal build; then
|
|
ghc --make Build/EvilLinker -fno-warn-tabs
|
|
withcyg Build/EvilLinker
|
|
fi
|
|
|
|
# Build the installer
|
|
cabal install nsis
|
|
ghc --make Build/NullSoftInstaller.hs -fno-warn-tabs
|
|
PATH="$PATH:/cygdrive/c/Program Files/NSIS" Build/NullSoftInstaller.exe
|