forked from vedderb/vesc_tool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_lin
executable file
·143 lines (126 loc) · 6.03 KB
/
build_lin
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#!/bin/bash
# https://github.com/LairdCP/UwTerminalX/wiki/Compiling-Qt-Statically
# https://wiki.qt.io/Building_Qt_5_from_Git
# sudo apt-get build-dep qt5-default
# sudo apt-get install libxcb-xinerama0-dev build-essential perl python git "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev flex bison gperf libicu-dev libxslt-dev ruby libssl-dev libxcursor-dev libxcomposite-dev libxdamage-dev libxrandr-dev libfontconfig1-dev libcap-dev libxtst-dev libpulse-dev libudev-dev libpci-dev libnss3-dev libasound2-dev libxss-dev libegl1-mesa-dev gperf bison libbz2-dev libgcrypt20-dev libdrm-dev libcups2-dev libatkmm-1.6-dev libasound2-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libbluetooth-dev bluetooth blueman bluez libusb-dev libdbus-1-dev bluez-hcidump bluez-tools libbluetooth-dev libgles2-mesa-dev
# OpenSSL (Not too sure about this...)
# cd /opt
# sudo mkdir openssl
# sudo chown $USER openssl
# git clone git://git.openssl.org/openssl.git
# cd openssl
# git checkout OpenSSL_1_1_1c
# ./config no-shared
# make -j8
# sudo make install
# sudo ldconfig
# Qt 5.9:
# cd /opt
# sudo mkdir qt5
# sudo chown $USER qt5
# git clone https://code.qt.io/qt/qt5.git
# cd qt5
# git checkout 5.9
# perl init-repository --module-subset=default,-qtwebkit,-qtwebkit-examples,-qtwebengine
# mkdir build
# cd build
# ../configure -prefix /opt/Qt/5.9-static/ -release -opensource -confirm-license -static -no-sql-mysql -no-sql-psql -no-sql-sqlite -no-journald -qt-zlib -no-mtdev -no-gif -qt-libpng -qt-libjpeg -qt-harfbuzz -qt-pcre -qt-xcb -no-xinput2 -no-glib -qt-xkbcommon-x11 -no-compile-examples -no-cups -no-iconv -no-tslib -dbus-linked -no-xcb-xlib -no-eglfs -no-directfb -no-linuxfb -no-kms -nomake examples -nomake tests -skip qtwebsockets -skip qtwebchannel -skip qtwebengine -skip qtwayland -skip qtwinextras -skip qtsvg -skip qtsensors -skip multimedia -no-xkbcommon-evdev -no-evdev -no-libproxy -no-icu -skip imageformats -no-xinput2 -qt-freetype -opengl es2
# make -j9
# sudo make install
# Qt 5.12:
# cd /opt
# sudo mkdir qt5
# sudo chown $USER qt5
# git clone https://code.qt.io/qt/qt5.git
# cd qt5
# git checkout 5.12
# perl init-repository --module-subset=default,-qtwebkit,-qtwebkit-examples,-qtwebengine
# mkdir build
# cd build
# ../configure -prefix /opt/Qt/5.12-static/ -release -opensource -confirm-license -static -no-sql-mysql -no-sql-psql -no-sql-sqlite -no-journald -qt-zlib -no-mtdev -no-gif -qt-libpng -qt-libjpeg -qt-harfbuzz -qt-pcre -qt-xcb -no-glib -no-compile-examples -no-cups -no-iconv -no-tslib -dbus-linked -no-xcb-xlib -no-eglfs -no-directfb -no-linuxfb -no-kms -nomake examples -nomake tests -skip qtwebsockets -skip qtwebchannel -skip qtwebengine -skip qtwayland -skip qtwinextras -skip qtsvg -skip qtsensors -skip multimedia -no-evdev -no-libproxy -no-icu -qt-freetype -skip qtimageformats -opengl es2
# make -j9
# sudo make install
# Qt 5.13:
# cd /opt
# sudo mkdir qt5
# sudo chown $USER qt5
# git clone https://code.qt.io/qt/qt5.git
# cd qt5
# git checkout 5.13
# perl init-repository --module-subset=default,-qtwebkit,-qtwebkit-examples,-qtwebengine
# mkdir build
# cd build
# ../configure -prefix /opt/Qt/5.13-static/ -release -opensource -confirm-license -static -no-sql-mysql -no-sql-psql -no-sql-sqlite -no-journald -qt-zlib -no-mtdev -no-gif -qt-libpng -qt-libjpeg -qt-harfbuzz -qt-pcre -qt-xcb -no-glib -no-compile-examples -no-cups -no-iconv -no-tslib -dbus-linked -no-xcb-xlib -no-eglfs -no-directfb -no-linuxfb -no-kms -nomake examples -nomake tests -skip qtwebsockets -skip qtwebchannel -skip qtwebengine -skip qtwayland -skip qtwinextras -skip qtsvg -skip qtsensors -skip multimedia -no-evdev -no-libproxy -no-icu -qt-freetype -skip qtimageformats -opengl es2
# make -j9
# sudo make install
# Qt 5.15:
# cd /opt
# sudo mkdir qt5
# sudo chown $USER qt5
# git clone https://code.qt.io/qt/qt5.git
# cd qt5
# git checkout 5.15
# perl init-repository --module-subset=default,-qtwebkit,-qtwebkit-examples,-qtwebengine
# mkdir build
# cd build
# ../configure -prefix /opt/Qt/5.15-static/ -release -opensource -confirm-license -static -no-sql-mysql -no-sql-psql -no-sql-sqlite -no-journald -qt-zlib -no-mtdev -no-gif -qt-libpng -qt-libjpeg -qt-harfbuzz -qt-pcre -no-glib -no-compile-examples -no-cups -no-iconv -no-tslib -dbus-linked -no-xcb-xlib -no-eglfs -no-directfb -no-linuxfb -no-kms -nomake examples -nomake tests -skip qtwebsockets -skip qtwebchannel -skip qtwebengine -skip qtwayland -skip qtwinextras -skip qtsvg -skip qtsensors -skip multimedia -no-evdev -no-libproxy -no-icu -no-accessibility -qt-freetype -skip qtimageformats -opengl es2
# make -j9
# sudo make install
# Note: -no-dbus and -skip qtconnectivity can also be added, but then bluetooth and window titlebar menus don't work.
set -e
export PATH=/opt/Qt/5.12-static/bin:$PATH
rm -rf build/lin/*
# Original
qmake -config release "CONFIG += release_lin build_original"
make clean
make -j8
rm -rf build/lin/obj
cd build/lin
zip vesc_tool_original_linux.zip `ls | grep -v '\.zip$'`
ls | grep -v '\.zip$' | xargs rm
cd ../..
# Platinum
qmake -config release "CONFIG += release_lin build_platinum"
make clean
make -j8
rm -rf build/lin/obj
cd build/lin
zip vesc_tool_platinum_linux.zip `ls | grep -v '\.zip$'`
ls | grep -v '\.zip$' | xargs rm
cd ../..
# Gold
qmake -config release "CONFIG += release_lin build_gold"
make clean
make -j8
rm -rf build/lin/obj
cd build/lin
zip vesc_tool_gold_linux.zip `ls | grep -v '\.zip$'`
ls | grep -v '\.zip$' | xargs rm
cd ../..
# Silver
qmake -config release "CONFIG += release_lin build_silver"
make clean
make -j8
rm -rf build/lin/obj
cd build/lin
zip vesc_tool_silver_linux.zip `ls | grep -v '\.zip$'`
ls | grep -v '\.zip$' | xargs rm
cd ../..
# Bronze
qmake -config release "CONFIG += release_lin build_bronze"
make clean
make -j8
rm -rf build/lin/obj
cd build/lin
zip vesc_tool_bronze_linux.zip `ls | grep -v '\.zip$'`
ls | grep -v '\.zip$' | xargs rm
cd ../..
# Free of charge
qmake -config release "CONFIG += release_lin build_free"
make clean
make -j8
rm -rf build/lin/obj
cd build/lin
zip vesc_tool_free_linux.zip `ls | grep -v '\.zip$'`
ls | grep -v '\.zip$' | xargs rm
cd ../..