home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / GFX / Raytracing / Raytracer / CC-FX261.DMS / in.adf / UnInstall < prev   
Encoding:
Text File  |  1996-04-24  |  2.7 KB  |  108 lines

  1. ; ImageFX UnInstall Utility
  2. ;
  3. ; Written by Thomas Krehbiel
  4. ; Copyright © 1995 Nova Design, Inc.
  5. ;
  6.  
  7. (
  8.  
  9.    ;================================================================
  10.    ; Setup
  11.    ;================================================================
  12.  
  13.    ; script variables...
  14.  
  15.    (set programname "ImageFX")             ; name of program
  16.    (set assignname "ImageFX")             ; assignment
  17.  
  18.    ; system information...
  19.  
  20.    (set osver (/ (getversion) 65536))         ; os version
  21.    (set cputype (database "cpu"))         ; cpu type
  22.  
  23.    ;-------------------
  24.    ; Pick a default directory for the installation...
  25.    (set initialdir @default-dest)         ; defaults to biggest drive
  26.    (if (getassign "ImageFX")
  27.       (
  28.      (set initialdir (getassign "ImageFX"))
  29.       )
  30.       ; else
  31.       (
  32.      (if (getassign "ImageFX2")
  33.         (
  34.            (set initialdir (getassign "ImageFX2"))
  35.            (set assignname "ImageFX2")
  36.         )
  37.      )
  38.       )
  39.    )
  40.  
  41.    ;-------------------
  42.    ; Ask where to (un)install from...
  43.    (set wheredir
  44.       (askdir
  45.      (prompt "Please confirm the directory containing the " programname
  46.          " software you would like to remove.")
  47.      (help "Locate the directory containing the version of " programname
  48.            "you would like to remove.")
  49.      (default initialdir)
  50.       )
  51.    )
  52.  
  53.    ; I wish there was some way we could read the tool type to get the assign
  54.    ; name... oh well.
  55.  
  56.    (if (> @user-level 1)
  57.       (
  58.      (set theassign
  59.         (askstring
  60.            (prompt "Confirm the Assign name for the ImageFX drawer: "
  61.                "(Do NOT include a trailing colon (:)!)")
  62.            (help @askstring-help)
  63.            (default assignname)
  64.         )
  65.      )
  66.       )
  67.       ; else
  68.       (
  69.      (set theassign assignname)
  70.       )
  71.    )
  72.  
  73.    (message "ALL components of ImageFX in the drawer " wheredir " will now "
  74.         "be removed.  To abort, click on `Abort Install' now.")
  75.  
  76.    ; Remove the assign so we can delete the directory
  77.    (run ("Assign %ls:" theassign))
  78.  
  79.    (run ("delete %ls all quiet" wheredir))
  80.    (delete ("%ls.info" wheredir))
  81.    (delete "libs:thumbnail.library")
  82.    (delete "sys:wbstartup/MagicServer")
  83.    (delete "sys:wbstartup/MagicServer.info")
  84.  
  85.    ; Remove stuff from user-startup
  86.    (startup theassign
  87.       (prompt "Somes lines pertaining to ImageFX will now be removed from your user-startup file.")
  88.       (help @startup-help)
  89.       (command "")
  90.    )
  91.  
  92.    ; It would be nice if we could automatically remove the stuff from
  93.    ; ENV:AmigaGuide/Path too.
  94.    (message "A line referring to the directory '"
  95.         wheredir
  96.         "' will need to be deleted "
  97.         "manually from 'ENV:AmigaGuide/Path' and 'ENVARC:AmigaGuide/Path'.")
  98.  
  99.    ; Installation complete!
  100. )
  101.  
  102. ;-----------------------------------------------------------------------
  103. ; Revision History:
  104. ;
  105. ;  3/3/95 tek
  106. ;     Created.
  107. ;
  108.