matrixion/.ci/linux/deploy.sh

47 lines
1.3 KiB
Bash
Raw Normal View History

2017-11-05 18:56:02 +03:00
#!/usr/bin/env bash
2018-01-13 15:59:48 +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
TAG=`git tag -l --points-at HEAD`
2017-11-26 22:32:18 +03:00
# Set up AppImage structure.
2018-06-17 16:53:14 +03:00
mkdir -p ${DIR}/usr/{bin,lib,share/pixmaps,share/applications}
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-continuous-x86_64.AppImage ] ; then
wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
fi
2017-11-05 18:56:02 +03:00
chmod a+x linuxdeployqt*.AppImage
unset QTDIR
unset QT_PLUGIN_PATH
unset LD_LIBRARY_PATH
export ARCH=$(uname -m)
2018-06-17 16:53:14 +03:00
2018-06-22 23:54:35 +03:00
if [ ! -z $TRAVIS_TAG ]; then
2018-06-23 21:17:33 +03:00
export LD_LIBRARY_PATH=.deps/usr/lib/:$LD_LIBRARY_PATH
2018-06-22 23:54:35 +03:00
fi
./linuxdeployqt*.AppImage ${DIR}/usr/share/applications/*.desktop -bundle-non-qt-libs
./linuxdeployqt*.AppImage ${DIR}/usr/share/applications/*.desktop -appimage
2017-11-05 20:14:52 +03:00
2017-11-05 21:07:14 +03:00
chmod +x nheko-x86_64.AppImage
2018-06-17 16:53:14 +03:00
if [ ! -z $TRAVIS_TAG ]; then
mv nheko-x86_64.AppImage nheko-${TRAVIS_TAG}-x86_64.AppImage
fi