-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
111 lines (105 loc) · 3.04 KB
/
build.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
105
106
107
108
109
110
111
#!/bin/bash
echo "QRC file generate"
pyside6-rcc resource.qrc -o src/utils/resource.py
echo "Start building..."
pyinstaller src/main.py \
--clean \
--strip \
--noconfirm \
--name midtool \
--add-data 'config:config' \
--add-binary 'lib/fingerprint/*.so:lib/fingerprint/' \
--add-data 'script:script' \
--add-data 'i18n:i18n' \
--add-data 'content/images/icon.png:.' \
--collect-all tzdata
cd dist/midtool/_internal || exit
echo "Delete useless lib and symlink"
rm -f \
libQt6Charts*.so.6 \
libQt6DataVisualization*.so.6 \
libQt6Egl*.so.6 \
libQt6Location.so.6 \
libQt6Pdf*.so.6 \
libQt6Positioning*.so.6 \
libQt6Quick3D*.so.6 \
libQt6QuickControls2Fusion*.so.6 \
libQt6QuickControls2Imagine*.so.6 \
libQt6QuickControls2Material*.so.6 \
libQt6QuickControls2Universal*.so.6 \
libQt6QuickEffects.so.6 \
libQt6QuickParticles.so.6 \
libQt6QuickShapes.so.6 \
libQt6QuickTest.so.6 \
libQt6QuickTimeline*.so.6 \
libQt6RemoteObjects*.so.6 \
libQt6Scxml*.so.6 \
libQt6Sensors*.so.6 \
libQt6ShaderTools.so.6 \
libQt6SpatialAudio.so.6 \
libQt6Sql.so.6 \
libQt6StateMachine*.so.6 \
libQt6Test.so.6 \
libQt6TextToSpeech.so.6 \
libQt6Web*.so.6 \
*Widgets.so.6 \
libQt63D*.so.6 \
libFLAC.so.8 \
libgstreamer-1.0.so.0 \
libpulse.so.0 \
libpulsecommon-*.so
echo "Delete useless Qt lib"
rm -f \
PySide6/*Widgets.abi3.so \
PySide6/Qt/lib/libQt6Charts*.so.6 \
PySide6/Qt/lib/libQt6DataVisualization*.so.6 \
PySide6/Qt/lib/libQt6Egl*.so.6 \
PySide6/Qt/lib/libQt6Location.so.6 \
PySide6/Qt/lib/libQt6Pdf*.so.6 \
PySide6/Qt/lib/libQt6Positioning*.so.6 \
PySide6/Qt/lib/libQt6Quick3D*.so.6 \
PySide6/Qt/lib/libQt6QuickControls2Fusion*.so.6 \
PySide6/Qt/lib/libQt6QuickControls2Imagine*.so.6 \
PySide6/Qt/lib/libQt6QuickControls2Material*.so.6 \
PySide6/Qt/lib/libQt6QuickControls2Universal*.so.6 \
PySide6/Qt/lib/libQt6QuickEffects.so.6 \
PySide6/Qt/lib/libQt6QuickParticles.so.6 \
PySide6/Qt/lib/libQt6QuickShapes.so.6 \
PySide6/Qt/lib/libQt6QuickTest.so.6 \
PySide6/Qt/lib/libQt6QuickTimeline*.so.6 \
PySide6/Qt/lib/libQt6RemoteObjects*.so.6 \
PySide6/Qt/lib/libQt6Scxml*.so.6 \
PySide6/Qt/lib/libQt6Sensors*.so.6 \
PySide6/Qt/lib/libQt6ShaderTools.so.6 \
PySide6/Qt/lib/libQt6SpatialAudio.so.6 \
PySide6/Qt/lib/libQt6Sql.so.6 \
PySide6/Qt/lib/libQt6StateMachine*.so.6 \
PySide6/Qt/lib/libQt6Test.so.6 \
PySide6/Qt/lib/libQt6TextToSpeech.so.6 \
PySide6/Qt/lib/libQt6Web*.so.6 \
PySide6/Qt/lib/*Widgets.so.6 \
PySide6/Qt/lib/libQt63D*.so.6
echo "Delete useless folder"
rm -rf \
*.dist-info \
PySide6/Qt/translations \
PySide6/Qt/plugins/egldeviceintegrations \
PySide6/Qt/plugins/qmltooling \
PySide6/Qt/qml/Qt3D \
PySide6/Qt/qml/Qt5Compat \
PySide6/Qt/qml/QtCharts \
PySide6/Qt/qml/QtDataVisualization \
PySide6/Qt/qml/QtLocation \
PySide6/Qt/qml/QtPositioning \
PySide6/Qt/qml/QtQuick3D \
PySide6/Qt/qml/QtRemoteObjects \
PySide6/Qt/qml/QtScxml \
PySide6/Qt/qml/QtSensors \
PySide6/Qt/qml/QtTest \
PySide6/Qt/qml/QtTextToSpeech \
PySide6/Qt/qml/QtWeb*
cd ../..
echo "Compress the folder to *.tar.gz pkg"
midtool_ver=$(python3 ../src/utils/version.py)
lsb=$(lsb_release -r -s)
tar -zcf midtool_"$midtool_ver"_"$lsb".tar.gz midtool