Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions build_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,21 @@ 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)"

LIBWAYLAND_EXCLUDE="libwayland*"
LIBXCB_EXCLUDE="libxcb*"
LIBXKB_EXCLUDE="libxkb*"
LIBX11_EXCLUDE="libX*"
LIBSSL3_OVERRIDE="$(ldconfig -p | grep x86-64 | grep -oP '/[^\s]+/libssl.so.3' | head -n1)"

export OUTPUT="$TARGET-x86_64.AppImage"
export QML_SOURCES_PATHS="$PWD/application"
export EXTRA_QT_PLUGINS="waylandcompositor"
export EXTRA_PLATFORM_PLUGINS="libqwayland-egl.so;libqwayland-generic.so"

mkdir -p "$BUILDDIR" && cd "$BUILDDIR"

qmake "../$TARGET.pro" -spec linux-g++ "CONFIG+=release qtquickcompiler" PREFIX="$APPDIR_PREFIX"
qmake6 "../$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" \
--library="$LIBSSL1_OVERRIDE" \
--exclude-library="$LIBWAYLAND_EXCLUDE" \
--exclude-library="$LIBXCB_EXCLUDE" \
--exclude-library="$LIBXKB_EXCLUDE" \
--exclude-library="$LIBX11_EXCLUDE"
--library="$LIBSSL3_OVERRIDE" \
--plugin qt
37 changes: 15 additions & 22 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:24.04

WORKDIR /project

Expand All @@ -10,6 +10,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt install -y \
pkg-config \
git \
curl \
fuse \
libfuse2 \
zlib1g-dev \
libusb-1.0-0-dev \
Expand All @@ -35,35 +36,27 @@ RUN DEBIAN_FRONTEND=noninteractive apt install -y \
libopengl-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

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 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 \
qt6-base-dev \
qt6-wayland-dev \
qt6-3d-dev \
qt6-declarative-dev \
qt6-serialport-dev \
qt6-shadertools-dev \
qt6-svg-dev \
qt6-tools-dev \
qt6-5compat-dev \
qml6-module-*

RUN wget https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20250213-2/linuxdeploy-x86_64.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 \
RUN wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/1-alpha-20250213-1/linuxdeploy-plugin-qt-x86_64.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/qt6.4-static

ENV PATH="${QT_BASE_DIR}/bin:${PATH}"

COPY init.sh /init.sh

ENTRYPOINT ["/init.sh"]