Mercurial > hg > syntilista
comparison build-win32.sh @ 227:07e7f254ef16
Improve windows build script.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 12 Mar 2018 10:52:21 +0200 |
parents | 1abb318f7ae3 |
children | 20ce1339f36b |
comparison
equal
deleted
inserted
replaced
226:c0dfbbd67692 | 227:07e7f254ef16 |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 INSTALL_USB="/mnt/sdb1/Syntilista/" | 2 INSTALL_USB="/mnt/sdb1" |
3 INSTALL_WINE="$HOME/.wine/drive_c/Syntilista/" | 3 INSTALL_WINE="$HOME/.wine/drive_c/Syntilista/" |
4 TMPFILE="unix2dos.tmp" | 4 TMPFILE="unix2dos.tmp" |
5 | 5 |
6 BUILDPATH="win32/" | 6 BUILDPATH="win32/" |
7 | 7 |
22 } | 22 } |
23 | 23 |
24 do_install() | 24 do_install() |
25 { | 25 { |
26 TARGET="$1" | 26 TARGET="$1" |
27 if test ! -d "$TARGET"; then | 27 if test -d "$TARGET"; then |
28 echo "ERROR: Target directory '$TARGET' does not exist." | 28 rm -fr "$TARGET" |
29 else | |
30 echo "ERROR: Target '$TARGET' exists but is not a directory!" | |
31 return 1 | |
32 fi | |
33 if ! mkdir -p "$TARGET"; then | |
34 echo "ERROR: Could not create target directory '$TARGET'." | |
29 return 1 | 35 return 1 |
30 fi | 36 fi |
31 | 37 |
32 echo "Installing to '$TARGET' ..." | 38 echo "Installing to '$TARGET' ..." |
33 | 39 |
53 | 59 |
54 ### Create cross-building makefiles | 60 ### Create cross-building makefiles |
55 make -f Makefile.cross-mingw-win32 QT5_PREFIX="$QT5_PREFIX" BINPATH="$BUILDPATH" | 61 make -f Makefile.cross-mingw-win32 QT5_PREFIX="$QT5_PREFIX" BINPATH="$BUILDPATH" |
56 | 62 |
57 ### Install to targets | 63 ### Install to targets |
58 do_install "$INSTALL_USB" | 64 if test -d "$INSTALL_USB" && mount|grep -q "$INSTALL_USB"; then |
65 do_install "$INSTALL_USB/Syntilista" | |
66 else | |
67 echo "INFO: '$INSTALL_USB' is not mounted. Not installing." | |
68 fi | |
59 do_install "$INSTALL_WINE" | 69 do_install "$INSTALL_WINE" |