1 Star 0 Fork 0

YHG/vesc_tool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build_lin 5.23 KB
一键复制 编辑 原始数据 按行查看 历史
#!/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 ../..
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yhg-kkk/vesc_tool.git
git@gitee.com:yhg-kkk/vesc_tool.git
yhg-kkk
vesc_tool
vesc_tool
master

搜索帮助