2019-10-13 12:51:22 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
script_path=$(readlink -f "$0")
|
|
|
|
script_dir=$(dirname "$script_path")
|
|
|
|
chatterino_dir=$(dirname "$script_dir")
|
|
|
|
|
2019-08-11 13:36:09 +02:00
|
|
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/qt512/lib/
|
2019-10-13 12:51:22 +02:00
|
|
|
|
2019-08-11 13:36:09 +02:00
|
|
|
ldd ./bin/chatterino
|
2019-10-13 12:51:22 +02:00
|
|
|
make INSTALL_ROOT=appdir -j"$(nproc)" install ; find appdir/
|
|
|
|
cp "$chatterino_dir"/resources/icon.png ./appdir/chatterino.png
|
|
|
|
|
2019-10-13 13:06:03 +02:00
|
|
|
linuxdeployqt_path="linuxdeployqt-6-x86_64.AppImage"
|
|
|
|
linuxdeployqt_url="https://github.com/probonopd/linuxdeployqt/releases/download/6/linuxdeployqt-6-x86_64.AppImage"
|
2019-08-11 20:35:25 +02:00
|
|
|
|
2019-10-13 12:52:26 +02:00
|
|
|
if [ ! -f "$linuxdeployqt_path" ]; then
|
|
|
|
wget -nv "$linuxdeployqt_url"
|
|
|
|
chmod a+x "$linuxdeployqt_path"
|
2019-10-13 12:51:22 +02:00
|
|
|
fi
|
|
|
|
if [ ! -f appimagetool-x86_64.AppImage ]; then
|
|
|
|
wget -nv "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
|
|
|
|
chmod a+x appimagetool-x86_64.AppImage
|
|
|
|
fi
|
2019-10-13 12:52:26 +02:00
|
|
|
./"$linuxdeployqt_path" \
|
2019-08-11 20:35:25 +02:00
|
|
|
appdir/usr/share/applications/*.desktop \
|
|
|
|
-no-translations \
|
|
|
|
-bundle-non-qt-libs \
|
|
|
|
-unsupported-allow-new-glibc \
|
|
|
|
-qmake=/opt/qt512/bin/qmake
|
|
|
|
|
|
|
|
rm -rf appdir/home
|
|
|
|
rm appdir/AppRun
|
|
|
|
|
|
|
|
# shellcheck disable=SC2016
|
|
|
|
echo '#!/bin/sh
|
|
|
|
here="$(dirname "$(readlink -f "${0}")")"
|
|
|
|
export QT_QPA_PLATFORM_PLUGIN_PATH="$here/usr/plugins"
|
|
|
|
cd "$here/usr"
|
|
|
|
exec "$here/usr/bin/chatterino" "$@"' > appdir/AppRun
|
|
|
|
chmod a+x appdir/AppRun
|
|
|
|
|
|
|
|
./appimagetool-x86_64.AppImage appdir
|