Mercurial > hg > syntilista
changeset 28:b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
application, not the Qt5 building etc. or cross compiler setup!)
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 03 Apr 2017 14:33:32 +0300 |
parents | 0ade5c3e424c |
children | 0129b619511c |
files | build-win32.sh |
diffstat | 1 files changed, 51 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build-win32.sh Mon Apr 03 14:33:32 2017 +0300 @@ -0,0 +1,51 @@ +#!/bin/sh +INSTALL_USB="/mnt/sdb1/Syntilista/" +INSTALL_WINE="$HOME/.wine/drive_c/Syntilista/" + +QT5PATH="/misc/packages/qt5-src/qtbase/" +BUILDPATH="release/" +MINGWPATH="/usr/lib/gcc/i686-w64-mingw32/6.3-win32/" + +do_cpinstall() +{ + # $1 src base path + # $2 dst base path + # $3 common sub path + # $4 filename + + mkdir -p "$2/$3" + cp -f "$1/$3/$4" "$2/$3/$4" +} + +do_install() +{ + TARGET="$1" + if test ! -d "$TARGET"; then + echo "ERROR: Target directory '$TARGET' does not exist." + return 1 + fi + + echo "Installing to '$TARGET' ..." + + do_cpinstall "$QT5PATH/plugins/" "$TARGET" "platforms" "qwindows.dll" + do_cpinstall "$QT5PATH/plugins/" "$TARGET" "sqldrivers" "qsqlite.dll" + for i in Core Gui Sql Widgets; do + cp -f "$QT5PATH/bin/Qt5$i.dll" "$TARGET" + done + + for i in libstdc++-6 libgcc_s_sjlj-1; do + cp -f "$MINGWPATH/$i.dll" "$TARGET" + strip "$TARGET/$i.dll" + done + + cp -f "$BUILDPATH/Syntilista.exe" "$TARGET" +} + +$QT5PATH/bin/qmake +#make -f Makefile.Release clean +make -f Makefile.Release + +do_install "$INSTALL_USB" +rm -f "$INSTALL_USB/syntilista.sqlite3" +do_install "$INSTALL_WINE" +