mirror of
https://github.com/juzzlin/Heimer.git
synced 2025-05-09 12:53:20 +08:00
29 lines
1.2 KiB
Bash
Executable File
29 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Builds AppImage in Docker
|
|
|
|
HEIMER_VERSION=4.0.0
|
|
|
|
CMD="export LANG=en_US.UTF-8 && \
|
|
export LC_ALL=en_US.UTF-8 && \
|
|
rm -rf /heimer-build-appimage && mkdir -p /heimer/build-appimage && \
|
|
cd /heimer/build-appimage && \
|
|
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TESTS=OFF -DPACKAGE_TYPE=AppImage && \
|
|
make -j$(nproc) && \
|
|
make DESTDIR=appdir -j$(nproc) install && find appdir/ && \
|
|
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" && \
|
|
chmod a+x linuxdeployqt-continuous-x86_64.AppImage && \
|
|
unset QTDIR && unset QT_PLUGIN_PATH && unset LD_LIBRARY_PATH && \
|
|
export VERSION=${HEIMER_VERSION} && \
|
|
./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -bundle-non-qt-libs && \
|
|
./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -appimage"
|
|
|
|
if [ -f /.dockerenv ]; then
|
|
echo "Script inside Docker"
|
|
bash -c "${CMD}"
|
|
else
|
|
echo "Script outside Docker"
|
|
docker run --privileged -t -v $(pwd):/heimer juzzlin/qt5-18.04:latest bash -c "${CMD}"
|
|
fi
|
|
|