comparison build-win32.sh @ 50:402446a76794

And more build system work.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 07 Apr 2017 06:04:07 +0300
parents 179e7df4dc80
children 423d2383a605
comparison
equal deleted inserted replaced
49:b86eb06070ba 50:402446a76794
1 #!/bin/sh 1 #!/bin/sh
2 INSTALL_USB="/mnt/sdb1/Syntilista/" 2 INSTALL_USB="/mnt/sdb1/Syntilista/"
3 INSTALL_WINE="$HOME/.wine/drive_c/Syntilista/" 3 INSTALL_WINE="$HOME/.wine/drive_c/Syntilista/"
4 4
5 QT5PATH="/misc/packages/qt5-src/qtbase/" 5 QT5PATH="/misc/packages/qt5-src/qtbase/"
6 BUILDPATH="release/" 6 BUILDPATH="win32/"
7 MINGWPATH="/usr/lib/gcc/i686-w64-mingw32/6.3-win32/" 7 MINGWPATH="/usr/lib/gcc/i686-w64-mingw32/6.3-win32/"
8 QMAKE="$QT5PATH/bin/qmake"
9 8
10 do_cpinstall() 9 do_cpinstall()
11 { 10 {
12 # $1 src base path 11 # $1 src base path
13 # $2 dst base path 12 # $2 dst base path
38 cp -f "$MINGWPATH/$i.dll" "$TARGET" 37 cp -f "$MINGWPATH/$i.dll" "$TARGET"
39 strip "$TARGET/$i.dll" 38 strip "$TARGET/$i.dll"
40 done 39 done
41 40
42 cp -f "$BUILDPATH/Syntilista.exe" "$TARGET" 41 cp -f "$BUILDPATH/Syntilista.exe" "$TARGET"
42 return 0
43 } 43 }
44 44
45 if test ! -e "$QMAKE"; then
46 echo "ERROR: $QMAKE not found."
47 exit 1
48 fi
49 45
50 $QMAKE 46 ### Create cross-building makefiles
47 make -f Makefile.cross-mingw-win32 QT5_PREFIX="$QT5PATH" BINPATH="$BUILDPATH"
51 48
52 #make -f Makefile.Release clean 49 ### Install to targets
53 make -f Makefile.Release 50 do_install "$INSTALL_USB" && rm -f "$INSTALL_USB/syntilista.sqlite3"
54
55 do_install "$INSTALL_USB"
56 rm -f "$INSTALL_USB/syntilista.sqlite3"
57 do_install "$INSTALL_WINE" 51 do_install "$INSTALL_WINE"
58
59 qmake