Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Good candidates for being packaged w/ linuxdeploy-plugin-conda #8

Open
probonopd opened this issue Jan 2, 2019 · 3 comments
Open

Comments

@probonopd
Copy link
Contributor

probonopd commented Jan 2, 2019

Good candidates for being packaged w/ linuxdeploy-plugin-conda:

@TheAssassin
Copy link
Member

What's the intention behind this "issue"?

@probonopd
Copy link
Contributor Author

probonopd commented Jan 2, 2019

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)

@TheAssassin
Copy link
Member

TheAssassin commented Jan 2, 2019

Note for <rest of world>: the SSL part in the AppRun script isn't strictly necessary, fixed some issues with Pext's plugin system IIRC. See https://github.com/Pext/Pext/blob/e0cf8cfd68827a678317a75226aacb8e23fe1a16/travis/build-appimage.sh#L29 for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants