Open probonopd opened 5 years ago
What's the intention behind this "issue"?
A "note to self" which projects to send PRs ;-)
Vaguely along the lines of
#! /bin/bash
export APPDIR="retext.AppDir"
export PIP_REQUIREMENTS="-e git+https://github.com/retext-project/retext#egg=retext PyQt5"
wget -c https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
wget -c "https://raw.githubusercontent.com/TheAssassin/linuxdeploy-plugin-conda/master/linuxdeploy-plugin-conda.sh"
chmod +x linuxdeploy-x86_64.AppImage linuxdeploy-plugin-conda.sh
rm -r "$APPDIR" || true
cat > retext.desktop <<\EOF
[Desktop Entry]
Version=1.0
Name=ReText
Exec=retext %U
Terminal=false
Type=Application
Icon=retext
Categories=Office;WordProcessor;
MimeType=application/x-extension-md;application/x-extension-rst;
EOF
# set up custom AppRun script
# set up custom AppRun script
cat > AppRun.sh <<\EAT
#! /bin/sh
# make sure to set APPDIR when run directly from the AppDir
if [ -z $APPDIR ]; then APPDIR=$(readlink -f $(dirname "$0")); fi
export LD_LIBRARY_PATH="$APPDIR"/usr/lib
for path in /etc/ssl/ca-bundle.pem \
/etc/ssl/certs/ca-certificates.crt \
/etc/ssl/cert.pem /etc/pki/tls/certs/ca-bundle.crt \
/etc/pki/tls/cert.pem /etc/pki/tls/cacert.pem \
/usr/local/share/certs/ca-root-nss.crt; do
if [ -f "$path" ]; then
export SSL_CERT_FILE="$path"
break
fi
done
exec "$APPDIR"/usr/bin/python "$APPDIR"/usr/bin/retext "$@"
EAT
chmod +x AppRun.sh
touch retext.svg
./linuxdeploy-x86_64.AppImage --appdir "$APPDIR" --plugin conda -i retext.svg -d retext.desktop --custom-apprun AppRun.sh --output appimage
(kept here so that it won't be forgotten - credits to @TheAssassin, this is pure magic)
Note for \
Good candidates for being packaged w/ linuxdeploy-plugin-conda: