代码拉取完成,页面将自动刷新
#!/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 libgcrypt11-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 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 -no-accessibility -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 -no-accessibility -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 -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 ../..
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。