Upgrade to Qt6 Static (#170)
* Upgrade to Qt6 Static * Enable linkage to wayland platform plugins * Temporary disable docker layer caching * Enable docker layer cache * Exclude unnecessary X11 and wayland libraries --------- Co-authored-by: Georgii Surkov <georgii.surkov@outlook.com>
This commit is contained in:
parent
9dfb53c136
commit
e26b3de243
|
@ -46,11 +46,11 @@ Note: STM32 Bootloader driver is not provided in this repository.
|
|||
|
||||
Setup dev container by running:
|
||||
```sh
|
||||
docker-compose up -d
|
||||
docker compose up -d
|
||||
```
|
||||
Compile qFlipper by running:
|
||||
```sh
|
||||
docker-compose exec dev ./build_linux.sh
|
||||
docker compose exec dev ./build_linux.sh
|
||||
```
|
||||
|
||||
#### Standalone build
|
||||
|
|
|
@ -31,6 +31,10 @@ CONFIG += embed_translations
|
|||
|
||||
QML_IMPORT_PATH += $$PWD/imports
|
||||
|
||||
unix:!macx {
|
||||
QTPLUGIN.platforms = qxcb qwayland-egl qwayland-generic
|
||||
}
|
||||
|
||||
win32:!win32-g++ {
|
||||
PRE_TARGETDEPS += \
|
||||
$$OUT_PWD/../backend/backend.lib \
|
||||
|
|
|
@ -5,15 +5,27 @@ set -euxo pipefail;
|
|||
TARGET="qFlipper"
|
||||
BUILDDIR="build"
|
||||
APPDIR_PREFIX="$PWD/$BUILDDIR/AppDir/usr"
|
||||
|
||||
LIBSSL1_OVERRIDE="$(ldconfig -p | grep x86-64 | grep -oP '/[^\s]+/libssl.so.1.1' | head -n1)"
|
||||
|
||||
export OUTPUT="$TARGET-x86_64.AppImage"
|
||||
export QML_SOURCES_PATHS=".."
|
||||
LIBWAYLAND_EXCLUDE="libwayland*"
|
||||
LIBXCB_EXCLUDE="libxcb*"
|
||||
LIBXKB_EXCLUDE="libxkb*"
|
||||
LIBX11_EXCLUDE="libX*"
|
||||
|
||||
mkdir -p "$BUILDDIR"
|
||||
cd "$BUILDDIR"
|
||||
qmake "../$TARGET.pro" -spec linux-g++ CONFIG+=qtquickcompiler PREFIX="$APPDIR_PREFIX"
|
||||
export OUTPUT="$TARGET-x86_64.AppImage"
|
||||
|
||||
mkdir -p "$BUILDDIR" && cd "$BUILDDIR"
|
||||
|
||||
qmake "../$TARGET.pro" -spec linux-g++ "CONFIG+=release qtquickcompiler" PREFIX="$APPDIR_PREFIX"
|
||||
make qmake_all
|
||||
make -j"$(nproc)"
|
||||
make install
|
||||
linuxdeploy --appdir=AppDir -o appimage --custom-apprun="../installer-assets/appimage/AppRun" --plugin=qt --library="$LIBSSL1_OVERRIDE"
|
||||
|
||||
linuxdeploy --appdir=AppDir -o appimage \
|
||||
--custom-apprun="../installer-assets/appimage/AppRun" \
|
||||
--library="$LIBSSL1_OVERRIDE" \
|
||||
--exclude-library="$LIBWAYLAND_EXCLUDE" \
|
||||
--exclude-library="$LIBXCB_EXCLUDE" \
|
||||
--exclude-library="$LIBXKB_EXCLUDE" \
|
||||
--exclude-library="$LIBX11_EXCLUDE"
|
||||
|
|
|
@ -1,45 +1,66 @@
|
|||
FROM ubuntu:18.04
|
||||
FROM ubuntu:20.04
|
||||
|
||||
WORKDIR /project
|
||||
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
software-properties-common
|
||||
|
||||
RUN add-apt-repository ppa:beineri/opt-qt-5.15.2-bionic && \
|
||||
apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt update
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt install -y \
|
||||
software-properties-common \
|
||||
wget \
|
||||
file \
|
||||
pkg-config \
|
||||
git \
|
||||
curl \
|
||||
libfuse2 \
|
||||
zlib1g-dev \
|
||||
libusb-1.0-0-dev \
|
||||
ca-certificates \
|
||||
build-essential \
|
||||
libgl-dev \
|
||||
qt515tools \
|
||||
qt515base \
|
||||
qt5153d \
|
||||
qt515svg \
|
||||
qt515serialport \
|
||||
qt515declarative \
|
||||
qt515quickcontrols \
|
||||
qt515quickcontrols2 \
|
||||
qt515graphicaleffects \
|
||||
qt515wayland \
|
||||
libxkbcommon-x11-dev \
|
||||
libxcb-icccm4-dev \
|
||||
libxcb-image0-dev \
|
||||
libxcb-keysyms1-dev \
|
||||
libxcb-randr0-dev \
|
||||
libxcb-render-util0-dev \
|
||||
libxcb-sync-dev \
|
||||
libdbus-1-dev \
|
||||
libmd4c-dev \
|
||||
libegl-dev \
|
||||
libxcb-xfixes0-dev \
|
||||
libsm-dev \
|
||||
libice-dev \
|
||||
libxcb-glx0-dev \
|
||||
libdrm-dev \
|
||||
libx11-xcb-dev \
|
||||
libopengl-dev \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
RUN wget https://update.flipperzero.one/builds/misc/linuxdeploy-x86_64-29092022.AppImage -O /usr/bin/linuxdeploy \
|
||||
&& chmod +x /usr/bin/linuxdeploy
|
||||
RUN echo 'deb http://download.opensuse.org/repositories/home:drunkbatya/xUbuntu_20.04/ /' \
|
||||
| tee /etc/apt/sources.list.d/home:drunkbatya.list
|
||||
RUN curl -fsSL https://download.opensuse.org/repositories/home:drunkbatya/xUbuntu_20.04/Release.key \
|
||||
| gpg --dearmor | tee /etc/apt/trusted.gpg.d/home_drunkbatya.gpg > /dev/null
|
||||
|
||||
RUN wget https://update.flipperzero.one/builds/misc/linuxdeploy-plugin-qt-x86_64-29092022.AppImage -O /usr/bin/linuxdeploy-plugin-qt \
|
||||
&& chmod +x /usr/bin/linuxdeploy-plugin-qt
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt update
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt -y install \
|
||||
qtbase6-static \
|
||||
qtwayland6-static \
|
||||
qt3d6-static \
|
||||
qtdeclarative6-static \
|
||||
qtserialport6-static \
|
||||
qtshadertools6-static \
|
||||
qtsvg6-static \
|
||||
qttools6-static \
|
||||
qt5compat6-static
|
||||
|
||||
RUN wget https://update.flipperzero.one/builds/misc/linuxdeploy-x86_64-29092022.AppImage \
|
||||
-O /usr/bin/linuxdeploy && chmod +x /usr/bin/linuxdeploy
|
||||
|
||||
RUN wget https://update.flipperzero.one/builds/misc/linuxdeploy-plugin-qt-x86_64-29092022.AppImage \
|
||||
-O /usr/bin/linuxdeploy-plugin-qt && chmod +x /usr/bin/linuxdeploy-plugin-qt
|
||||
|
||||
RUN git config --global --replace-all safe.directory '*'
|
||||
|
||||
ENV QT_BASE_DIR=/opt/qt515
|
||||
ENV QT_BASE_DIR=/opt/qt6.4-static
|
||||
|
||||
ENV PATH="${QT_BASE_DIR}/bin:${PATH}"
|
||||
|
||||
|
|
|
@ -74,6 +74,8 @@ elif [[ "$1" = 'gui' ]]; then
|
|||
"$THIS_DIR"/usr/bin/qFlipper "$@"
|
||||
elif [[ "$1" = 'cli' ]]; then
|
||||
shift 1
|
||||
export QT_QPA_PLATFORMTHEME=xdgdesktopportal
|
||||
unset QT_STYLE_OVERRIDE
|
||||
"$THIS_DIR"/usr/bin/qFlipper-cli "$@"
|
||||
elif [[ "$1" = 'rules' ]]; then
|
||||
case "$2" in
|
||||
|
|
Loading…
Reference in New Issue