From 62c42f7b63a7ead89699bea8d2b4fa1cac53578f Mon Sep 17 00:00:00 2001 From: litruv Date: Sat, 21 Feb 2026 18:12:59 +1100 Subject: [PATCH] feat: add post-installation and post-removal scripts for package management --- build-resources/entitlements.mac.plist | 33 ++++++++++++++++++++++++++ build-resources/linux/after-install.sh | 20 ++++++++++++++++ build-resources/linux/after-remove.sh | 14 +++++++++++ 3 files changed, 67 insertions(+) create mode 100644 build-resources/entitlements.mac.plist create mode 100644 build-resources/linux/after-install.sh create mode 100644 build-resources/linux/after-remove.sh diff --git a/build-resources/entitlements.mac.plist b/build-resources/entitlements.mac.plist new file mode 100644 index 0000000..829e630 --- /dev/null +++ b/build-resources/entitlements.mac.plist @@ -0,0 +1,33 @@ + + + + + + com.apple.security.cs.allow-jit + + + + com.apple.security.cs.allow-unsigned-executable-memory + + + + com.apple.security.cs.disable-library-validation + + + + com.apple.security.network.client + + + + com.apple.security.device.audio-input + + + + com.apple.security.device.camera + + + + com.apple.security.screen-recording + + + diff --git a/build-resources/linux/after-install.sh b/build-resources/linux/after-install.sh new file mode 100644 index 0000000..0bf69a2 --- /dev/null +++ b/build-resources/linux/after-install.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Post-installation script for .deb and .rpm packages + +# Update desktop database for the .desktop file +if command -v update-desktop-database &> /dev/null; then + update-desktop-database -q /usr/share/applications || true +fi + +# Update icon cache +if command -v gtk-update-icon-cache &> /dev/null; then + gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor || true +fi + +# Set appropriate permissions for chrome-sandbox (required for Electron) +SANDBOX_PATH="/opt/Paarrot/chrome-sandbox" +if [ -f "$SANDBOX_PATH" ]; then + chmod 4755 "$SANDBOX_PATH" || true +fi + +exit 0 diff --git a/build-resources/linux/after-remove.sh b/build-resources/linux/after-remove.sh new file mode 100644 index 0000000..e3e54dc --- /dev/null +++ b/build-resources/linux/after-remove.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# Post-removal script for .deb and .rpm packages + +# Update desktop database after removal +if command -v update-desktop-database &> /dev/null; then + update-desktop-database -q /usr/share/applications || true +fi + +# Update icon cache +if command -v gtk-update-icon-cache &> /dev/null; then + gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor || true +fi + +exit 0