CHANGE: Move to using the AppImage provided by Prusa now. Additionally adjust the way we select the version and extraction.

This commit is contained in:
Michael Helfrich 2024-07-13 15:02:58 -04:00
parent 4d0db7fd1b
commit 2ca3059f27
3 changed files with 7 additions and 6 deletions

View File

@ -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 \ 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 \ 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 \ 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 \ && mkdir -p /usr/share/desktop-directories \
# Install Firefox without Snap. # Install Firefox without Snap.
&& add-apt-repository ppa:mozillateam/ppa \ && add-apt-repository ppa:mozillateam/ppa \
@ -40,8 +40,8 @@ RUN chmod +x /slic3r/get_latest_prusaslicer_release.sh \
&& slic3rReleaseName=$(/slic3r/get_latest_prusaslicer_release.sh name) \ && slic3rReleaseName=$(/slic3r/get_latest_prusaslicer_release.sh name) \
&& curl -sSL ${latestSlic3r} > ${slic3rReleaseName} \ && curl -sSL ${latestSlic3r} > ${slic3rReleaseName} \
&& rm -f /slic3r/releaseInfo.json \ && rm -f /slic3r/releaseInfo.json \
&& mkdir -p /slic3r/slic3r-dist \ && chmod +x /slic3r/${slic3rReleaseName} \
&& tar -xjf ${slic3rReleaseName} -C /slic3r/slic3r-dist --strip-components 1 \ && /slic3r/${slic3rReleaseName} --appimage-extract \
&& rm -f /slic3r/${slic3rReleaseName} \ && rm -f /slic3r/${slic3rReleaseName} \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
&& apt-get autoclean \ && apt-get autoclean \

View File

@ -4,8 +4,9 @@ TMPDIR="$(mktemp -d)"
curl -SsL https://api.github.com/repos/prusa3d/PrusaSlicer/releases/latest > $TMPDIR/latest.json 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) # Grabs the first item of the latest result of the AppImage.
name=$(jq -r '.assets[] | select(.browser_download_url|test("linux-x64-(?!GTK2).+.tar.bz2$"))| .name' $TMPDIR/latest.json) 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) version=$(jq -r .tag_name $TMPDIR/latest.json)
if [ $# -ne 1 ]; then if [ $# -ne 1 ]; then

View File

@ -17,6 +17,6 @@ redirect_stderr=true
[program:prusaslicer] [program:prusaslicer]
priority=1 priority=1
environment=VGL_DISPLAY=%(ENV_VGL_DISPLAY)s 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 autorestart=true
redirect_stderr=true redirect_stderr=true