aboutsummaryrefslogtreecommitdiff
path: root/standalone/windows/build-simple.sh
blob: 381f5635fd71b6c74ab8742c154cef15ea79a53d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/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" "$@"
}

# Prefer programs from cygwin.
withcygpreferred () {
	PATH="/c/cygwin/bin:$PATH" "$@"
}

# 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
withcyg stack build

# Build the installer
withcygpreferred stack runghc --package nsis Build/NullSoftInstaller.hs