summaryrefslogtreecommitdiff
path: root/platform/osx/uninstall_disk.applescript
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-10-24 20:44:24 +0200
committerCarl Hetherington <cth@carlh.net>2020-10-27 21:45:32 +0100
commitbed96d486f85a9fa5171e2cdaa3858581d631b3a (patch)
tree3762b496ef7180a3569c72b3626822e2fefa55c0 /platform/osx/uninstall_disk.applescript
parent1dfb125a8e07f5185c229260ac0643e47eee5026 (diff)
Add uninstaller for the .pkg part of the disk writer on macOS (#1740).
Diffstat (limited to 'platform/osx/uninstall_disk.applescript')
-rw-r--r--platform/osx/uninstall_disk.applescript24
1 files changed, 24 insertions, 0 deletions
diff --git a/platform/osx/uninstall_disk.applescript b/platform/osx/uninstall_disk.applescript
new file mode 100644
index 000000000..75caee3c8
--- /dev/null
+++ b/platform/osx/uninstall_disk.applescript
@@ -0,0 +1,24 @@
+-- Copyright (C) 2020 Carl Hetherington <cth@carlh.net>
+--
+-- This file is part of DCP-o-matic.
+--
+-- DCP-o-matic is free software; you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation; either version 2 of the License, or
+-- (at your option) any later version.
+--
+-- DCP-o-matic is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+set askText to "Do you want to uninstall the .pkg part of the DCP-o-matic Disk Writer?"
+set reply to (display dialog askText buttons {"Cancel", "Uninstall"} default button "Uninstall" cancel button "Cancel")
+if button returned of reply = "Uninstall" then
+ do shell script "rm -rf \"/Library/Application Support/com.dcpomatic\"" with administrator privileges
+ set doneText to "Uninstall complete. Now close and delete the DCP-o-matic Disk Writer app."
+ display dialog doneText buttons {"OK"}
+end if