matrixion/.ci/linux/deploy.sh

59 lines
1.5 KiB
Bash
Raw Normal View History

#!/usr/bin/env sh
2017-11-05 18:56:02 +03:00
set -ex
2017-11-05 18:56:02 +03:00
2017-11-26 22:32:18 +03:00
APP=nheko
DIR=${APP}.AppDir
# unused but may be useful...
#TAG=$(git tag -l --points-at HEAD)
2017-11-26 22:32:18 +03:00
# Set up AppImage structure.
for d in bin lib share/pixmaps share/applications
do
mkdir -p ${DIR}/usr/$d
done
2017-11-26 22:32:18 +03:00
# Copy resources.
cp build/nheko ${DIR}/usr/bin
cp resources/nheko.desktop ${DIR}/usr/share/applications/nheko.desktop
cp resources/nheko.png ${DIR}/usr/share/pixmaps/nheko.png
for iconSize in 16 32 48 64 128 256 512; do
IconDir=${DIR}/usr/share/icons/hicolor/${iconSize}x${iconSize}/apps
mkdir -p ${IconDir}
cp resources/nheko-${iconSize}.png ${IconDir}/nheko.png
done
2017-11-05 18:56:02 +03:00
# Only download the file when not already present
if ! [ -f linuxdeployqt-6-x86_64.AppImage ] ; then
wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/6/linuxdeployqt-6-x86_64.AppImage"
fi
2017-11-05 18:56:02 +03:00
chmod a+x linuxdeployqt*.AppImage
unset QTDIR
unset QT_PLUGIN_PATH
2017-11-05 18:56:02 +03:00
unset LD_LIBRARY_PATH
ARCH=$(uname -m)
export ARCH
2019-12-14 19:08:36 +03:00
LD_LIBRARY_PATH=$(pwd)/.deps/usr/lib/:/usr/local/lib/:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
for res in ./linuxdeployqt*.AppImage
do
linuxdeployqt=$res
done
2018-06-22 23:54:35 +03:00
2019-10-06 03:28:25 +03:00
./"$linuxdeployqt" ${DIR}/usr/share/applications/*.desktop -unsupported-allow-new-glibc -bundle-non-qt-libs -qmldir=./resources/qml -appimage
2017-11-05 20:14:52 +03:00
2019-02-01 03:29:34 +03:00
chmod +x nheko-*x86_64.AppImage
2018-06-17 16:53:14 +03:00
2019-08-05 01:47:21 +03:00
mkdir artifacts
cp nheko-*x86_64.AppImage artifacts/
if [ -n "$VERSION" ]; then
2019-02-01 04:04:00 +03:00
# commented out for now, as AppImage file appears to already contain the version.
#mv nheko-*x86_64.AppImage nheko-${VERSION}-x86_64.AppImage
2019-02-01 04:47:27 +03:00
echo "nheko-${VERSION}-x86_64.AppImage"
fi