Skip to content

Instantly share code, notes, and snippets.

@JonMagon
Last active September 2, 2022 18:50
Show Gist options
  • Save JonMagon/248f341e1975184d92585e25d95492f1 to your computer and use it in GitHub Desktop.
Save JonMagon/248f341e1975184d92585e25d95492f1 to your computer and use it in GitHub Desktop.
Build appimage
docker run -it --cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfined -v"/home/jonmagon/Projects/KDiskMark_appimage/":/opt/kdiskmark local/qtappimage
cd /opt/kdiskmark
git clone https://github.com/JonMagon/KDiskMark.git
mkdir build && cd build
cmake -DPERFORM_PAGECACHE_CLEARING_USING_KF5AUTH=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_PREFIX_PATH=/opt/Qt/5.15.1/gcc_64/ ..
make DESTDIR=appdir -j(nproc) install ; find appdir/
cat > appdir/AppRun << 'EOF'
#!/bin/bash
HERE="$(dirname "$(readlink -f "${0}")")"
export PATH="$HERE/usr/bin/:$PATH"
$HERE/usr/bin/kdiskmark
EOF
chmod +x appdir/AppRun
mkdir /opt/fio && cd /opt/fio
wget https://github.com/axboe/fio/archive/refs/tags/fio-3.26.tar.gz
tar -xzf fio-3.26.tar.gz
./configure --disable-native
make DESTDIR="/opt/kdiskmark/build/appdir" prefix=/usr install
cp -a /opt/qt*/share/icons/breeze ./appdir/usr/share/icons/
cp /usr/lib/x86_64-linux-gnu/qt5/plugins/styles/breeze.so /opt/Qt/5.15.1/gcc_64/plugins/styles/
./linuxdeployqt-continuous-x86_64.AppImage /opt/kdiskmark/build/appdir/usr/share/applications/*.desktop -appimage -qmake=/opt/Qt/5.15.1/gcc_64/bin/qmake -extra-plugins=styles/breeze.so
FROM ubuntu:bionic
RUN apt-get update && \
apt-get install --yes cmake qt5-default gcc fish nano extra-cmake-modules qttools5-dev \
libkf5auth-dev g++ libfuse-dev qt5-style-plugins libaio-dev wget git python3-pip \
kde-style-breeze
RUN pip3 install setuptools
RUN pip3 install aqtinstall
RUN aqt install --outputdir /opt/Qt 5.15.1 linux desktop
CMD /usr/bin/fish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment