Mercurial > hg > syntilista
annotate 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 |
rev | line source |
---|---|
28
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
1 #!/bin/sh |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
2 INSTALL_USB="/mnt/sdb1/Syntilista/" |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
3 INSTALL_WINE="$HOME/.wine/drive_c/Syntilista/" |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
4 |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
5 QT5PATH="/misc/packages/qt5-src/qtbase/" |
50 | 6 BUILDPATH="win32/" |
28
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
7 MINGWPATH="/usr/lib/gcc/i686-w64-mingw32/6.3-win32/" |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
8 |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
9 do_cpinstall() |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
10 { |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
11 # $1 src base path |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
12 # $2 dst base path |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
13 # $3 common sub path |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
14 # $4 filename |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
15 |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
16 mkdir -p "$2/$3" |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
17 cp -f "$1/$3/$4" "$2/$3/$4" |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
18 } |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
19 |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
20 do_install() |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
21 { |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
22 TARGET="$1" |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
23 if test ! -d "$TARGET"; then |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
24 echo "ERROR: Target directory '$TARGET' does not exist." |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
25 return 1 |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
26 fi |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
27 |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
28 echo "Installing to '$TARGET' ..." |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
29 |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
30 do_cpinstall "$QT5PATH/plugins/" "$TARGET" "platforms" "qwindows.dll" |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
31 do_cpinstall "$QT5PATH/plugins/" "$TARGET" "sqldrivers" "qsqlite.dll" |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
32 for i in Core Gui Sql Widgets; do |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
33 cp -f "$QT5PATH/bin/Qt5$i.dll" "$TARGET" |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
34 done |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
35 |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
36 for i in libstdc++-6 libgcc_s_sjlj-1; do |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
37 cp -f "$MINGWPATH/$i.dll" "$TARGET" |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
38 strip "$TARGET/$i.dll" |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
39 done |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
40 |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
41 cp -f "$BUILDPATH/Syntilista.exe" "$TARGET" |
50 | 42 return 0 |
28
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
43 } |
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
44 |
29
0129b619511c
Check for qt5 crossbuild qmake before trying to build anything.
Matti Hamalainen <ccr@tnsp.org>
parents:
28
diff
changeset
|
45 |
50 | 46 ### Create cross-building makefiles |
47 make -f Makefile.cross-mingw-win32 QT5_PREFIX="$QT5PATH" BINPATH="$BUILDPATH" | |
37 | 48 |
50 | 49 ### Install to targets |
50 do_install "$INSTALL_USB" && rm -f "$INSTALL_USB/syntilista.sqlite3" | |
28
b749685958d7
Add a script that performs the win32 cross-build (only the Syntilista
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
51 do_install "$INSTALL_WINE" |