home *** CD-ROM | disk | FTP | other *** search
/ World of A1200 / World_Of_A1200.iso / programs / disk / directory / diropus_uninstalled / installopus < prev    next >
Text File  |  1995-02-27  |  4KB  |  214 lines

  1. ; Script to install Directory Opus version 4.12A+ for Amiga Plus
  2. ;
  3. ; DOpus Install Version    $VER: Install-Dopus 4.12A+ 1.11.94
  4. ;
  5.  
  6.  
  7.  
  8.     (complete 0)
  9.  
  10. ; just in case the installation was restarted
  11.  
  12.     (makeassign "Dopus_Install" "")
  13.  
  14. ; see if this is really an update
  15.  
  16.  
  17.  
  18.     (set is_update 0)
  19.     (set DOPus_Dest (getassign "DOpus" "a"))
  20.  
  21.  
  22. ; if update, be sure they want program in same place
  23.  
  24.     (if DOPus_Dest
  25.         (if    (askbool
  26.                 (prompt "There appears to be a current copy of Directory Opus "
  27.                     "located in the drawer named \"" DOPus_Dest"\"."
  28.                     "\n\nDo you want this version installed in that drawer?"
  29.                 )
  30.                 (help
  31.                     "The installer has determined that you may already have a "
  32.                     "copy of DOpus installed on your system. If this is wrong or "
  33.                     "you want the update installed elsewhere, select NO as an "
  34.                     "answer. Otherwise, select YES."
  35.                 )
  36.             (default 1)
  37.             )
  38.  
  39. ; if user wants in same place
  40.  
  41.             (set is_update 1)
  42.  
  43. ; if user wants in different place
  44.  
  45.             (set DOPus_Dest
  46.                 (tackon
  47.                     (askdir
  48.                         (prompt "Where should the DOpus Drawer be created?")
  49.                         (help @askdir-help)
  50.                         (default @default-dest)
  51.                     )
  52.                     "DOpus"
  53.                 )
  54.             )
  55.         )
  56.  
  57.  
  58. ; else if not an update, get a location for program
  59.         (set DOPus_Dest
  60.             (tackon
  61.                 (askdir
  62.                     (prompt "Where should DOpus be installed?")
  63.                     (help @askdir-help)
  64.                     (default @default-dest)
  65.                 )
  66.                 "DOpus"
  67.             )
  68.         )
  69.     )
  70.  
  71.  
  72. ; now lock on to Install Disk volume 
  73.     
  74. ;    (askdisk
  75. ;        (prompt "\nPlease insert the master program disk labeled \"DOpus_Install\".")
  76. ;        (help    "The DOpus program and other options will be copied "
  77. ;            "from the \"DOpus\" into your system.")
  78. ;        (dest  "DOpus")
  79. ;        (newname "Dopus_Install")
  80. ;    )
  81.  
  82. ; make DOpus drawer & icon if not there
  83.  
  84.     (if     (not is_update)
  85.             (makedir DOPus_Dest (infos))
  86.     )
  87.  
  88. ; at this point we have a valid destination, so we tell installer where
  89. ; the application will end up so the exit page will be correct -- also,
  90. ; the installation log file (if any) will be copied to the destination
  91.  
  92.     (set @default-dest DOPus_Dest)
  93.  
  94.  
  95.  
  96.     (working "\nWait...Cleaning Up old programs")
  97.  
  98.     (delete "S:DirectoryOpus.HLP")
  99.     (delete "C:DOpusRT")
  100.     (delete "C:ConfigOpus")
  101.     (delete "Sys:ConfigOpus")
  102.     (delete (tackon DOpus_Dest "ConfigOpus"))
  103.  
  104.     (complete 10)
  105.  
  106.  
  107.     (set oldfile "Libs:Dopus.Library")
  108.     (if    (= (exists oldfile) 1)
  109.         (delete "Libs:Dopus.Library")
  110.         (set libexists 1)
  111.     )
  112.  
  113.     (set oldfile (tackon DOpus_Dest "Libs/DOpus.Library"))
  114.     (if    (= (exists oldfile) 1)
  115.         (delete "Libs:Dopus.Library")
  116.         (set libexists 1)
  117.     )
  118.  
  119.     (working "Reading the Install disk for Directory Opus files.")
  120.     
  121.     (copyfiles
  122.         (prompt "About to install Directory Opus and support files")
  123.         (help "Select the files or support directories and "
  124.             "modules you wish to install with Directory Opus\n"
  125.             @copyfiles-help
  126.         )
  127.         (source "Dopus_Install:")
  128.         (dest DOpus_Dest)
  129.         (pattern "(DirectoryOpus|C|Libs|Modules|S)")
  130.         (infos)
  131.         (confirm)
  132.     )
  133.     
  134.             
  135.  
  136.  
  137. (complete 80)
  138.  
  139.  
  140.  
  141. ;Get the users startup choices
  142.     (set mode (askchoice
  143.             (prompt "Directory can be started automatically when you boot your computer. What do you wish to do?")
  144.             (help    @askchoice-help    )
  145.             (choices "Do not start Directory Opus on boot" "Start Directory Opus on boot" "Start Directory Opus Iconified")
  146.             (default 0)
  147.         )
  148.     )
  149.     
  150.     
  151. (complete 90)
  152.     
  153. ; set the script for user startup
  154.     (set commands (cat "ASSIGN DOpus: " "\""DOpus_Dest"\"\n"))
  155.     
  156.     (if (= mode 1)
  157.         (set commands (cat commands "DOpus:DirectoryOpus\n"))
  158.     )
  159.     
  160.     (if (= mode 2)
  161.         (set commands (cat commands "DOpus:DirectoryOpus -i\n" newline))
  162.     )
  163.                     
  164.                             
  165.  
  166. (complete 95)
  167.  
  168. ; modify S:User-Startup
  169.  
  170.  
  171.     (startup "DOpus"
  172.         (prompt
  173.         "The following instructions will added to your "
  174.         "\"S:User-Startup\" so that your system will be properly "
  175.         "configured to use DOpus.\n\n"
  176.         commands)
  177.         (help "This will add commands to your S:user-startup file to "
  178.             "allow the correct operation of Directory Opus")
  179.         (command commands)
  180.     )
  181.  
  182.  
  183.     (set text "Check out the ALL NEW Directory Opus 5!\n\n")
  184.     (set text (cat text "Special upgrade offers available for existing\n"))
  185.     (set text (cat text " DOpus users and for Amiga Plus readers.\n"))
  186.     (set text (cat text "Contact your local GPSoftware distributor!"))
  187.  
  188.     (if libexists 
  189.         (set text (cat text "\n\nSince you already had DOpus installed,\nPlease REBOOT your computer."))
  190.     )
  191.     
  192.  
  193.  
  194. ;     reinitialize assigns
  195.  
  196. (if (not @pretend)
  197.     (makeassign "DOpus" DOPus_Dest)
  198.     
  199. )
  200.  
  201.  
  202.  
  203. (complete 100)
  204.  
  205. ; cleanup
  206. (makeassign "Dopus_Install" (safe))
  207.  
  208. ; bye bye HC
  209.  
  210. (exit text)
  211.  
  212.  
  213.