2019-04-24 02:55:05 +03:00
|
|
|
#!/usr/bin/env sh
|
2017-11-05 18:56:02 +03:00
|
|
|
|
2019-05-01 20:01: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
|
2019-04-24 02:55:05 +03:00
|
|
|
# unused but may be useful...
|
|
|
|
#TAG=$(git tag -l --points-at HEAD)
|
2017-12-30 19:32:16 +03:00
|
|
|
|
2017-11-26 22:32:18 +03:00
|
|
|
# Set up AppImage structure.
|
2019-04-24 02:55:05 +03:00
|
|
|
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
|
|
|
|
2018-01-15 00:20:22 +03:00
|
|
|
# Only download the file when not already present
|
2019-10-04 00:03:03 +03:00
|
|
|
if ! [ -f linuxdeployqt-6-x86_64.AppImage ] ; then
|
|
|
|
wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/6/linuxdeployqt-6-x86_64.AppImage"
|
2018-01-15 00:20:22 +03:00
|
|
|
fi
|
2017-11-05 18:56:02 +03:00
|
|
|
chmod a+x linuxdeployqt*.AppImage
|
|
|
|
|
|
|
|
unset QTDIR
|
2019-04-24 02:55:05 +03:00
|
|
|
unset QT_PLUGIN_PATH
|
2017-11-05 18:56:02 +03:00
|
|
|
unset LD_LIBRARY_PATH
|
|
|
|
|
2019-04-24 02:55:05 +03:00
|
|
|
ARCH=$(uname -m)
|
|
|
|
export ARCH
|
|
|
|
LD_LIBRARY_PATH=$(pwd)/.deps/usr/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-04-24 02:55:05 +03:00
|
|
|
./"$linuxdeployqt" ${DIR}/usr/share/applications/*.desktop -unsupported-allow-new-glibc -bundle-non-qt-libs
|
|
|
|
./"$linuxdeployqt" ${DIR}/usr/share/applications/*.desktop -unsupported-allow-new-glibc -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"
|
2019-04-24 02:55:05 +03:00
|
|
|
fi
|