diff --git a/Dockerfile b/Dockerfile index e7676d3..8e0168c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 \ @@ -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 \ diff --git a/get_latest_prusaslicer_release.sh b/get_latest_prusaslicer_release.sh index 5f6389d..ad8b173 100755 --- a/get_latest_prusaslicer_release.sh +++ b/get_latest_prusaslicer_release.sh @@ -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 diff --git a/supervisord.conf b/supervisord.conf index 822ebae..ffcf523 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -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