Skip to content

Commit

Permalink
Prusaslicer: bookworm compat and modernize script
Browse files Browse the repository at this point in the history
removes unused dependency for bookworm compatibility
works towards #2401

also install globally so all users can use Prusaslicer
  • Loading branch information
theofficialgman committed Jul 28, 2023
1 parent c753409 commit 88e5c7c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
14 changes: 7 additions & 7 deletions apps/PrusaSlicer/install-32
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@

version=2.6.0

install_packages git libcurl4 libgtk-3-0 libtbb2 zlib1g libdbus-1-3 libxcb1 libxi6 libxfixes3 libatk-bridge2.0-0 libepoxy0 libxinerama1 libxrandr2 libxcursor1 libxcomposite1 libxdamage1 libxkbcommon0 libxcb-shm0 libxcb-render0 libpcre3 libxau6 libxdmcp6 libatspi2.0-0 libexpat1 liblzma5 libbsd0 libgpg-error0 || exit 1
install_packages git libcurl4 libgtk-3-0 zlib1g libdbus-1-3 libxcb1 libxi6 libxfixes3 libatk-bridge2.0-0 libepoxy0 libxinerama1 libxrandr2 libxcursor1 libxcomposite1 libxdamage1 libxkbcommon0 libxcb-shm0 libxcb-render0 libpcre3 libxau6 libxdmcp6 libatspi2.0-0 libexpat1 liblzma5 libbsd0 libgpg-error0 || exit 1
# note, libffi.so.6 is linked by the binary and not provided in the appimage (appimage contains libffi.so.7). this appimage probably never worked on bullseye

wget "https://github.com/davidk/PrusaSlicer-ARM.AppImage/releases/download/version_${version}/PrusaSlicer-version_${version}-armhf.AppImage" -O ~/PrusaSlicer.AppImage || error "Failed to download appimage!"
chmod +x ~/PrusaSlicer.AppImage || error "Failed to mark as executable!"

mkdir -p ~/prusa-slicer
wget -O /tmp/PrusaSlicer.AppImage "https://github.com/davidk/PrusaSlicer-ARM.AppImage/releases/download/version_${version}/PrusaSlicer-version_${version}-armhf.AppImage" || error "Failed to download appimage!"
sudo mv /tmp/PrusaSlicer.AppImage /opt || error "Failed to move appimage to install location!"
sudo chmod +x /opt/PrusaSlicer.AppImage || error "Failed to mark as executable!"
sudo chown root:root /opt/PrusaSlicer.AppImage || error "Failed to set appimage ownership!"

enable_module fuse || exit 1

echo "[Desktop Entry]
Name=PrusaSlicer
GenericName=3D Printing Software
Comment=PrusaSlicer converts 3D models into paths for a 3D printer. It prepares your print for maximum accuracy, minimum printing time and good reliability with many extra features that make your print come out great.
Exec=$HOME/PrusaSlicer.AppImage
Exec=/opt/PrusaSlicer.AppImage
Icon=$(dirname $0)/icon-64.png
Terminal=false
Type=Application
MimeType=application/sla;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;image/bmp;image/gif;image/jpeg;image/png;model/x3d+xml;
Categories=Graphics;Education;Development;Science;
Keywords=3D;Printing;
StartupNotify=true" > ~/.local/share/applications/PrusaSlicer.desktop || error "Failed to create menu button!"
StartupNotify=true" > /usr/local/share/applications/PrusaSlicer.desktop || error "Failed to create menu button!"
14 changes: 7 additions & 7 deletions apps/PrusaSlicer/install-64
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@

version=2.6.0

install_packages git libcurl4 libgtk-3-0 libtbb2 zlib1g libdbus-1-3 libxcb1 libxi6 libxfixes3 libatk-bridge2.0-0 libepoxy0 libxinerama1 libxrandr2 libxcursor1 libxcomposite1 libxdamage1 libxkbcommon0 libxcb-shm0 libxcb-render0 libpcre3 libxau6 libxdmcp6 libatspi2.0-0 libexpat1 liblzma5 libbsd0 libgpg-error0 || exit 1
install_packages git libcurl4 libgtk-3-0 zlib1g libdbus-1-3 libxcb1 libxi6 libxfixes3 libatk-bridge2.0-0 libepoxy0 libxinerama1 libxrandr2 libxcursor1 libxcomposite1 libxdamage1 libxkbcommon0 libxcb-shm0 libxcb-render0 libpcre3 libxau6 libxdmcp6 libatspi2.0-0 libexpat1 liblzma5 libbsd0 libgpg-error0 || exit 1
# note, libffi.so.6 is linked by the binary and not provided in the appimage (appimage contains libffi.so.7). this appimage probably never worked on bullseye

wget "https://github.com/davidk/PrusaSlicer-ARM.AppImage/releases/download/version_${version}/PrusaSlicer-version_${version}-aarch64.AppImage" -O ~/PrusaSlicer.AppImage || error "Failed to download appimage!"
chmod +x ~/PrusaSlicer.AppImage || error "Failed to mark as executable!"

mkdir -p ~/prusa-slicer
wget -O /tmp/PrusaSlicer.AppImage "https://github.com/davidk/PrusaSlicer-ARM.AppImage/releases/download/version_${version}/PrusaSlicer-version_${version}-aarch64.AppImage" || error "Failed to download appimage!"
sudo mv /tmp/PrusaSlicer.AppImage /opt || error "Failed to move appimage to install location!"
sudo chmod +x /opt/PrusaSlicer.AppImage || error "Failed to mark as executable!"
sudo chown root:root /opt/PrusaSlicer.AppImage || error "Failed to set appimage ownership!"

enable_module fuse || exit 1

echo "[Desktop Entry]
Name=PrusaSlicer
GenericName=3D Printing Software
Comment=PrusaSlicer converts 3D models into paths for a 3D printer. It prepares your print for maximum accuracy, minimum printing time and good reliability with many extra features that make your print come out great.
Exec=$HOME/PrusaSlicer.AppImage
Exec=/opt/PrusaSlicer.AppImage
Icon=$(dirname $0)/icon-64.png
Terminal=false
Type=Application
MimeType=application/sla;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;image/bmp;image/gif;image/jpeg;image/png;model/x3d+xml;
Categories=Graphics;Education;Development;Science;
Keywords=3D;Printing;
StartupNotify=true" > ~/.local/share/applications/PrusaSlicer.desktop || error "Failed to create menu button!"
StartupNotify=true" > /usr/local/share/applications/PrusaSlicer.desktop || error "Failed to create menu button!"
2 changes: 1 addition & 1 deletion apps/PrusaSlicer/uninstall
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

purge_packages || exit 1
rm -f ~/PrusaSlicer.AppImage ~/.local/share/applications/PrusaSlicer.desktop
sudo rm -f /opt/PrusaSlicer.AppImage /usr/local/share/applications/PrusaSlicer.desktop ~/PrusaSlicer.AppImage ~/.local/share/applications/PrusaSlicer.desktop

0 comments on commit 88e5c7c

Please sign in to comment.