forked from mpc-qt/mpc-qt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake-release-win.sh
104 lines (90 loc) · 1.9 KB
/
make-release-win.sh
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
94
95
96
97
98
99
100
101
102
103
104
#!/bin/bash
# Make windows release script using 64bit libs
VERSION=`date +'%y%m'`
DOTTEDVERSION=`date +'%y.%m'`
BUILD=release
SUFFIX="win-x64-$VERSION"
DEST="mpc-qt-$SUFFIX"
qmake6 "MPCQT_VERSION=$DOTTEDVERSION" "ENABLE_LOCAL_MPV=1" mpc-qt.pro
mkdir -p release
rm release/*
make release-clean
make -j`nproc` release
read -r -d '' dirs <<'EOF'
.
/doc
/iconengines
/imageformats
/platforms
/styles
EOF
read -r -d '' dlls <<'EOF'
libb2-1.dll
libbrotlicommon.dll
libbrotlidec.dll
libbz2-1.dll
libdouble-conversion.dll
libfreetype-6.dll
libgcc_s_seh-1.dll
libglib-2.0-0.dll
libgraphite2.dll
libharfbuzz-0.dll
libiconv-2.dll
libintl-8.dll
libjpeg-8.dll
libmd4c.dll
libpcre2-8-0.dll
libpcre2-16-0.dll
libpng16-16.dll
libstdc++-6.dll
libwinpthread-1.dll
libzstd.dll
zlib1.dll
Qt6Core.dll
Qt6Gui.dll
Qt6Network.dll
Qt6OpenGL.dll
Qt6OpenGLWidgets.dll
Qt6Svg.dll
Qt6Widgets.dll
Qt6Xml.dll
EOF
read -r -d '' plugins <<'EOF'
iconengines/qsvgicon.dll
imageformats/qjpeg.dll
imageformats/qsvg.dll
platforms/qdirect2d.dll
platforms/qminimal.dll
platforms/qoffscreen.dll
platforms/qwindows.dll
styles/qwindowsvistastyle.dll
EOF
read -r -d '' docs <<'EOF'
ipc.md
EOF
read -r -d '' binaries <<'EOF'
yt-dlp.exe
EOF
(while read -r dir; do
mkdir -p "$DEST/$dir"
done)<<<"$dirs"
(while read -r dll; do
cp `which "$dll"` "$DEST/$dll"
done)<<<"$dlls"
# The libicu dlls change name very often, copy with a glob
cp /mingw64/bin/libicudt*.dll "$DEST"
cp /mingw64/bin/libicuin*.dll "$DEST"
cp /mingw64/bin/libicuuc*.dll "$DEST"
(while read -r plugin; do
cp "/mingw64/share/qt6/plugins/$plugin" "$DEST/$plugin"
done)<<<"$plugins"
(while read -r doc; do
cp "DOCS/$doc" "$DEST/doc/$doc"
done)<<<"$docs"
(while read -r binary; do
cp "binaries/$binary" "$DEST/$binary"
done)<<<"$binaries"
cp "$BUILD/mpc-qt.exe" "$DEST"
cp mpv-dev/lib/libmpv-2.dll "$DEST"
7z a "$DEST.zip" "./$DEST/*"
sha512sum "$DEST.zip" >"$DEST.zip.sha512"