Parent: [3bc4e8] (diff)

Download this file

mkinstdir.sh    94 lines (76 with data), 2.2 kB

 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/bin/sh
fatal()
{
echo $*
exit 1
}
Usage()
{
fatal mkinstdir.sh targetdir
}
test $# -eq 1 || Usage
DESTDIR=$1
test -d $DESTDIR || mkdir $DESTDIR || fatal cant create $DESTDIR
# Script to make a prototype recoll install directory from locally compiled
# software. *** Needs msys or cygwin ***
################################
# Local values (to be adjusted)
# Upplay src tree
UPP=c:/users/bill/documents/upnp/upplay
ReleaseBuild=y
# Where to find libgcc_s_dw2-1.dll for progs which need it copied
gccpath=`which gcc`
MINGWBIN=`dirname $gccpath`
test -z "$MINGWBIN" && fatal cannot find gcc
# Where to copy the Qt Dlls from:
QTBIN=C:/Qt/Qt5.8.0/5.8/mingw53_32/bin
PATH=$QTBIN:$PATH
export PATH
# Qt arch
QTA=Desktop_Qt_5_8_0_MinGW_32bit
if test X$ReleaseBuild = X'y'; then
qtsdir=release
else
qtsdir=debug
fi
# Release/debug needs to be changed in the left pane of qtcreator for
# this to work
GUIBIN=$UPP/../build-upplay-${QTA}-${qtsdir}/${qtsdir}/upplay.exe
# checkcopy.
chkcp()
{
cp $@ || fatal cp $@ failed
}
copyupplay()
{
chkcp $UPP/dirbrowser/cdbrowser.css $DESTDIR//share/cdbrowser
chkcp $UPP/dirbrowser/standard.css $DESTDIR/share/cdbrowser
chkcp $UPP/dirbrowser/dark.css $DESTDIR/share/cdbrowser
cp -rp $UPP/GUI/icons $DESTDIR/share
chkcp $UPP/GUI/standard.qss $DESTDIR/share
chkcp $UPP/GUI/dark.qss $DESTDIR/share
chkcp $UPP/GUI/common.qss $DESTDIR/share
chkcp $UPP/GUI/icons/upplay.ico $DESTDIR
chkcp -rp $UPP/GUI/icons $DESTDIR
chkcp $GUIBIN $DESTDIR
}
copyqt()
{
cd $DESTDIR
$QTBIN/windeployqt upplay.exe
# Apparently because the webkit part was grafted "by hand" on the
# Qt set, we need to copy some dll explicitely
addlibs="Qt5Core.dll Qt5Multimedia.dll \
Qt5MultimediaWidgets.dll Qt5OpenGL.dll \
Qt5Positioning.dll Qt5PrintSupport.dll Qt5Sensors.dll \
Qt5Sql.dll icudt57.dll \
icuin57.dll icuuc57.dll libQt5WebKit.dll \
libQt5WebKitWidgets.dll \
libxml2-2.dll libxslt-1.dll"
for i in $addlibs;do
chkcp $QTBIN/$i $DESTDIR
done
}
test -d $DESTDIR/share/cdbrowser || mkdir -p $DESTDIR/share/cdbrowser || exit 1
copyupplay
copyqt