Fix AppImage not containing all SSL dependencies (#4400)
This means the AppImage is built on Ubuntu 20.04 using Qt 5.12
This commit is contained in:
+29
-10
@@ -2,13 +2,18 @@
|
||||
|
||||
set -e
|
||||
|
||||
# Print all commands as they are run
|
||||
set -x
|
||||
|
||||
if [ ! -f ./bin/chatterino ] || [ ! -x ./bin/chatterino ]; then
|
||||
echo "ERROR: No chatterino binary file found. This script must be run in the build folder, and chatterino must be built first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/qt512/lib/"
|
||||
export PATH="/opt/qt512/bin:$PATH"
|
||||
echo "Qt5_DIR set to: ${Qt5_DIR}"
|
||||
|
||||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${Qt5_DIR}/lib"
|
||||
export PATH="${Qt5_DIR}/bin:$PATH"
|
||||
|
||||
script_path=$(readlink -f "$0")
|
||||
script_dir=$(dirname "$script_path")
|
||||
@@ -25,20 +30,32 @@ echo ""
|
||||
|
||||
cp "$chatterino_dir"/resources/icon.png ./appdir/chatterino.png
|
||||
|
||||
linuxdeployqt_path="linuxdeployqt-6-x86_64.AppImage"
|
||||
linuxdeployqt_url="https://github.com/probonopd/linuxdeployqt/releases/download/6/linuxdeployqt-6-x86_64.AppImage"
|
||||
linuxdeployqt_path="linuxdeployqt-x86_64.AppImage"
|
||||
linuxdeployqt_url="https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
|
||||
|
||||
if [ ! -f "$linuxdeployqt_path" ]; then
|
||||
wget -nv "$linuxdeployqt_url"
|
||||
echo "Downloading LinuxDeployQT from $linuxdeployqt_url to $linuxdeployqt_path"
|
||||
curl --location --fail --silent "$linuxdeployqt_url" -o "$linuxdeployqt_path"
|
||||
chmod a+x "$linuxdeployqt_path"
|
||||
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
|
||||
|
||||
appimagetool_path="appimagetool-x86_64.AppImage"
|
||||
appimagetool_url="https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
|
||||
|
||||
if [ ! -f "$appimagetool_path" ]; then
|
||||
echo "Downloading AppImageTool from $appimagetool_url to $appimagetool_path"
|
||||
curl --location --fail --silent "$appimagetool_url" -o "$appimagetool_path"
|
||||
chmod a+x "$appimagetool_path"
|
||||
fi
|
||||
|
||||
# For some reason, the copyright file for libc was not found. We need to manually copy it from the host system
|
||||
mkdir -p appdir/usr/share/doc/libc6/
|
||||
cp /usr/share/doc/libc6/copyright appdir/usr/share/doc/libc6/
|
||||
|
||||
echo "Run LinuxDeployQT"
|
||||
./"$linuxdeployqt_path" \
|
||||
appdir/usr/share/applications/*.desktop \
|
||||
--appimage-extract-and-run \
|
||||
appdir/usr/share/applications/com.chatterino.chatterino.desktop \
|
||||
-no-translations \
|
||||
-bundle-non-qt-libs \
|
||||
-unsupported-allow-new-glibc
|
||||
@@ -56,7 +73,9 @@ cd "$here/usr"
|
||||
exec "$here/usr/bin/chatterino" "$@"' > appdir/AppRun
|
||||
chmod a+x appdir/AppRun
|
||||
|
||||
./appimagetool-x86_64.AppImage appdir
|
||||
./"$appimagetool_path" \
|
||||
--appimage-extract-and-run \
|
||||
appdir
|
||||
|
||||
# TODO: Create appimage in a unique directory instead maybe idk?
|
||||
rm -rf appdir
|
||||
|
||||
Reference in New Issue
Block a user