gui/uninstall.scm
(module uninstall mzscheme
  (require (lib "util.ss" "planet")
           (lib "mred.ss" "mred")
           (lib "framework.ss" "framework")
           "../language/acl2-module-v.scm")
  (provide uninstall-callback)
  
  ;; These may have to change when the package finds its way into Planet.
  (define gui-owner pkg-owner)
  (define gui-pkg "dracula.plt")
  (define gui-major pkg-major)
  (define gui-minor pkg-minor)
  
  ;; -> void
  ;; Uninstalls the ACL2 package via PLaneT
  (define (uninstall!)
    (remove-pkg gui-owner gui-pkg  gui-major gui-minor)
    (remove-pkg pkg-owner pkg-name pkg-major pkg-minor))
  
  ;; menu-item% callback
  (define uninstall-callback
    (lambda (x y)
      (case (message-box 
             (string-append "Uninstall Dracula?")
             (format "Uninstallation of Dracula requires you to restart DrScheme.  DrScheme will automatically exit when the uninstall is complete.  You will be prompted to save any unsaved work before DrScheme exits.~n~nProceed with uninstallation?")
                         #f
                         '(yes-no caution))
        [(no)  (void)]
        [(yes) (begin
                 (uninstall!)
                 (exit:exit))]))))