Skip to content

Commit

Permalink
Try to fix appimage cert issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
leozide committed Nov 11, 2024
1 parent ed29dad commit 6c01478
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ for:
- mv library.bin AppDir/usr/share/leocad/library.bin
- cp qt/leocad.desktop AppDir/leocad.desktop
- cp tools/icon/256x256/apps/leocad.png AppDir/leocad.png
- cp tools/setup/AppRun AppDir
- appveyor DownloadFile https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
- chmod a+x linuxdeployqt*.AppImage
- unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
Expand Down
27 changes: 27 additions & 0 deletions tools/setup/AppRun
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash -e

this_dir="\$(readlink -f "\$(dirname "\$0")")"
unset QTDIR; unset QT_PLUGIN_PATH

# Find the system certificates location
# https://gitlab.com/probono/platformissues/blob/master/README.md#certificates
possible_locations=(
"/etc/ssl/certs/ca-certificates.crt" # Debian/Ubuntu/Gentoo etc.
"/etc/pki/tls/certs/ca-bundle.crt" # Fedora/RHEL
"/etc/ssl/ca-bundle.pem" # OpenSUSE
"/etc/pki/tls/cacert.pem" # OpenELEC
"/etc/ssl/certs" # SLES10/SLES11, https://golang.org/issue/12139
"/usr/share/ca-certs/.prebuilt-store/" # Clear Linux OS; https://github.com/knapsu/plex-media-player-appimage/issues/17#issuecomment-437710032
"/system/etc/security/cacerts" # Android
"/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem" # CentOS/RHEL 7
"/etc/ssl/cert.pem" # Alpine Linux
)

for location in "\${possible_locations[@]}"; do
if [ -r "\${location}" ]; then
export SSL_CERT_FILE="\${location}"
break
fi
done

exec "\${this_dir}/usr/bin/leocad" "\$@"

0 comments on commit 6c01478

Please sign in to comment.