Skip to content

Commit

Permalink
CHANGE: Move to using the AppImage provided by Prusa now. Additionall…
Browse files Browse the repository at this point in the history
…y adjust the way we select the version and extraction.
  • Loading branch information
helfrichmichael committed Jul 13, 2024
1 parent 4d0db7f commit 2ca3059
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
locales-all libpam0g libxt6 libxext6 dbus-x11 xauth x11-xkb-utils xkb-data python3 xterm novnc \
lxde gtk2-engines-murrine gnome-themes-standard gtk2-engines-pixbuf gtk2-engines-murrine arc-theme \
freeglut3 libgtk2.0-dev libwxgtk3.0-gtk3-dev libwx-perl libxmu-dev libgl1-mesa-glx libgl1-mesa-dri \
xdg-utils locales locales-all pcmanfm jq curl git bzip2 gpg-agent software-properties-common \
xdg-utils locales locales-all pcmanfm jq curl git bzip2 gpg-agent software-properties-common libwebkit2gtk-4.0-dev \
&& mkdir -p /usr/share/desktop-directories \
# Install Firefox without Snap.
&& add-apt-repository ppa:mozillateam/ppa \
Expand All @@ -40,8 +40,8 @@ RUN chmod +x /slic3r/get_latest_prusaslicer_release.sh \
&& slic3rReleaseName=$(/slic3r/get_latest_prusaslicer_release.sh name) \
&& curl -sSL ${latestSlic3r} > ${slic3rReleaseName} \
&& rm -f /slic3r/releaseInfo.json \
&& mkdir -p /slic3r/slic3r-dist \
&& tar -xjf ${slic3rReleaseName} -C /slic3r/slic3r-dist --strip-components 1 \
&& chmod +x /slic3r/${slic3rReleaseName} \
&& /slic3r/${slic3rReleaseName} --appimage-extract \
&& rm -f /slic3r/${slic3rReleaseName} \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get autoclean \
Expand Down
5 changes: 3 additions & 2 deletions get_latest_prusaslicer_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ TMPDIR="$(mktemp -d)"

curl -SsL https://api.github.com/repos/prusa3d/PrusaSlicer/releases/latest > $TMPDIR/latest.json

url=$(jq -r '.assets[] | select(.browser_download_url|test("linux-x64-(?!GTK2).+.tar.bz2$"))| .browser_download_url' $TMPDIR/latest.json)
name=$(jq -r '.assets[] | select(.browser_download_url|test("linux-x64-(?!GTK2).+.tar.bz2$"))| .name' $TMPDIR/latest.json)
# Grabs the first item of the latest result of the AppImage.
url=$(jq -r '.assets[0] | select(.browser_download_url|test("linux-x64-GTK3.+.AppImage$"))| .browser_download_url' $TMPDIR/latest.json)
name=$(jq -r '.assets[0] | select(.browser_download_url|test("linux-x64-GTK3.+.AppImage$"))| .name' $TMPDIR/latest.json)
version=$(jq -r .tag_name $TMPDIR/latest.json)

if [ $# -ne 1 ]; then
Expand Down
2 changes: 1 addition & 1 deletion supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ redirect_stderr=true
[program:prusaslicer]
priority=1
environment=VGL_DISPLAY=%(ENV_VGL_DISPLAY)s
command=/bin/bash -c '%(ENV_VGLRUN)s /slic3r/slic3r-dist/prusa-slicer --datadir /configs/.config/PrusaSlicer/'
command=/bin/bash -c '%(ENV_VGLRUN)s /slic3r/squashfs-root/AppRun --datadir /configs/.config/PrusaSlicer/'
autorestart=true
redirect_stderr=true

0 comments on commit 2ca3059

Please sign in to comment.