summarylogtreecommitdiffstats
path: root/lycheeslicer.install
diff options
context:
space:
mode:
Diffstat (limited to 'lycheeslicer.install')
-rw-r--r--lycheeslicer.install25
1 files changed, 25 insertions, 0 deletions
diff --git a/lycheeslicer.install b/lycheeslicer.install
new file mode 100644
index 000000000000..ebb3904ad693
--- /dev/null
+++ b/lycheeslicer.install
@@ -0,0 +1,25 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+
+ # Link to the binary
+ ln -sf '/opt/LycheeSlicer/lycheeslicer' '/usr/bin/lycheeslicer'
+
+ # SUID chrome-sandbox for Electron 5+
+ chmod 4755 '/opt/LycheeSlicer/chrome-sandbox' || true
+
+ update-mime-database /usr/share/mime || true
+ update-desktop-database /usr/share/applications || true
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+
+ # Delete the link to the binary
+ rm -f '/usr/bin/lycheeslicer'
+ update-desktop-database -q
+}