update windows build scripts to use stack

Not tested yet.

The EvilLinker workaround is removed. That got fixed in ghc 8.0.1,
(per https://ghc.haskell.org/trac/ghc/ticket/8596)
which will finally be used by the windows autobuilder now.

I have not deleted the EvilLinker yet (or closed its bugs).

This commit was sponsored by John Peloquin on Patreon.
This commit is contained in:
Joey Hess 2017-10-17 13:00:29 -04:00
parent 193b5f4ca4
commit 59a0308f5f
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 29 additions and 69 deletions

View file

@ -11,28 +11,20 @@ PATH="/c/Program Files/Git/cmd:/c/Program Files/NSIS:$PATH"
withcyg () {
PATH="$PATH:/c/cygwin/bin" "$@"
}
# Prefer programs from cygwin.
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
# Deps are not built with cygwin environment, because we don't want
# configure scripts for haskell libraries to link them with the cygwin
# libraries.
stack setup
stack build --dependencies-only
# 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
withcyg stack build
# Build the installer
cabal install nsis
ghc --make Build/NullSoftInstaller.hs -fno-warn-tabs
PATH="$PATH:/cygdrive/c/Program Files/NSIS" Build/NullSoftInstaller.exe
withcygpreferred stack runghc --package nsis Build/NullSoftInstaller.hs