home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / FileMover / Dopus5 / DVS-DOP5.DMS / in.adf / InstallOpus < prev    next >
Encoding:
Text File  |  1995-04-09  |  6.1 KB  |  306 lines

  1. ; Script to install Directory Opus version 5.0
  2. ;
  3. ; Directory Opus Install Version $VER: Install-Opus 5.0 6.4.95
  4. ; COPYRIGHT ©1995 GP SOFTWARE, AUSTRALIA
  5. ;
  6.  
  7.     (onerror
  8.         (makeassign "Opus5_Install" (safe))    
  9.     )
  10.  
  11.  
  12.     (complete 0)
  13.  
  14. ;check user has Dos 2
  15.     (set DOSTYPE (/ (getversion) 65536))
  16.     (if
  17.         (NOT (>= DOSTYPE 37))
  18.         (abort "Directory Opus 5 requires AmigaDOS 2.04 or higher."
  19.             " If you have an earlier version of AmigaDOS you must purchase an upgrade before using Opus 5.")
  20.     )
  21.  
  22.  
  23. (set wbisgo 0)
  24.  
  25. ; just in case the installation was restarted
  26.  
  27.     (makeassign "Opus5_Install" (safe))
  28.  
  29. ; see if this is really an update
  30.  
  31.  
  32.     (set is_update 0)
  33.     (set DOPus_Dest (getassign "DOpus5" "a"))
  34.  
  35.  
  36. ; if update, be sure they want program in same place
  37.  
  38.     (if DOPus_Dest
  39.         (if    (askbool
  40.                 (prompt "Opus 5 has already been installed on this system.\n"
  41.                     "The current copy is located in the drawer named \"" DOPus_Dest"\"."
  42.                     "\n\nDo you want this version installed in that drawer?"
  43.                 )
  44.                 (help
  45.                     "The installer has determined that you may already have a "
  46.                     "copy of Opus 5 installed on your system. If this is wrong or "
  47.                     "you want the update installed elsewhere, select NO as an "
  48.                     "answer. Otherwise, select YES."
  49.                 )
  50.             (default 1)
  51.             )
  52.  
  53. ; if user wants in same place
  54.  
  55.             (set is_update 1)
  56.  
  57. ; if user wants in different place
  58.  
  59.             (set DOPus_Dest
  60.                 (tackon
  61.                     (askdir
  62.                         (prompt "Directory Opus 5 will be installed in its own directory on your hard disk.\n\nWhere should the Opus 5 directory be created?")
  63.                         (help @askdir-help)
  64.                         (default @default-dest)
  65.                     )
  66.                     "Opus5"
  67.                 )
  68.             )
  69.         )
  70.  
  71.  
  72. ; else if not an update, get a location for program
  73.         (set DOPus_Dest
  74.             (tackon
  75.                 (askdir
  76.                     (prompt "Directory Opus 5 will be installed in its own directory on your hard disk.\n\nWhere should the Opus 5 directory be created?")
  77.                     (help @askdir-help)
  78.                     (default @default-dest)
  79.                 )
  80.                 "Opus5"
  81.             )
  82.         )
  83.     )
  84.  
  85.  
  86. ; now lock on to Install Disk volume 
  87.     
  88. ;    (askdisk
  89. ;        (prompt "\nPlease insert the master program disk labeled \"Opus5_Install\".")
  90. ;        (help    "The Opus 5 program and other options will be copied "
  91. ;            "from the \"DOpus\" into your system.")
  92. ;        (dest  "DOpus")
  93. ;        (newname "Opus5_Install")
  94. ;    )
  95.  
  96. ; make DOpus drawer & icon if not there
  97.  
  98.     (if     (not is_update)
  99.             (makedir DOPus_Dest (infos))
  100.     )
  101.  
  102. ; at this point we have a valid destination, so we tell installer where
  103. ; the application will end up so the exit page will be correct -- also,
  104. ; the installation log file (if any) will be copied to the destination
  105.     
  106.     (set @default-dest DOPus_Dest)
  107.  
  108.     (working "Reading the Install disk for Directory Opus files.")
  109.  
  110.     (copyfiles
  111.         (source "Opus5_Install:lhex")
  112.         (dest "ram:")
  113.     )
  114.  
  115.  
  116.  
  117.     (working "DeArchiving Directory Opus and related files.")
  118.  
  119.     (textfile
  120.         (dest "RAM:install_cmd")
  121.         (append 
  122.         "ram:lhex >NIL: <NIL: -qfw ""\""DOpus_Dest"\"" " x Opus5_Install:DO5.lha \n"
  123.         )
  124.     )
  125.  
  126.     (execute "RAM:install_cmd")
  127.     (run "delete ram:#?_cmd")
  128.     (run "delete ram:lhex")
  129.  
  130. (complete 80)
  131.  
  132.  
  133.  
  134. ;Get the users startup choices
  135.     (set mode (askchoice
  136.             (prompt "Opus 5 can be started automatically when you boot your computer. What do you wish to do?")
  137.             (help    @askchoice-help    )
  138.             (choices "Start Opus 5 on boot"
  139.                  "Start Opus 5 Iconified"
  140.                  "Use Opus 5 as Workbench Replacement!"
  141.                  "Do not start Directory Opus on boot") 
  142.             (default 0)
  143.         )
  144.     )
  145.     
  146.     
  147. (complete 90)
  148.     
  149.  
  150.  
  151.     
  152.         
  153. ; start on boot normal
  154.     (if (= mode 0)
  155.         (
  156.             (copyfiles
  157.                 (source (tackon DOpus_dest "wbstartup/Opus5_Startup"))
  158.                 (dest "SYS:WBStartup")
  159.                 (infos)
  160.  
  161.             )
  162.  
  163.             (tooltype
  164.                 (dest "SYS:WBStartup/Opus5_Startup")
  165.                 (settooltype "CX_POPUP" "YES")
  166.     
  167.             )
  168.         )
  169.     )
  170.  
  171.  
  172. ; start on iconified normal
  173.     (if (= mode 1)
  174.         (
  175.  
  176.             (copyfiles
  177.                 (source (tackon DOpus_dest "wbstartup/Opus5_Startup"))
  178.                 (dest "SYS:WBStartup")
  179.                 (infos)
  180.  
  181.             )
  182.  
  183.             (tooltype
  184.                 (dest "SYS:WBStartup/Opus5_Startup")
  185.                 (settooltype "CX_POPUP" "NO")
  186.     
  187.             )
  188.         )
  189.  
  190.     )
  191.  
  192.  
  193.     
  194. ; use as wb replacement
  195.  
  196.     (if (= mode 2)
  197.         (
  198.         (set wbisgo 1)
  199.  
  200.         (if (= (exists "c:loadwb") 1)
  201.             (rename "c:LoadWB" "c:LoadWB_old")
  202.         )
  203.  
  204.         (copyfiles
  205.             (source (tackon DOpus_dest "c/LoadDB"))
  206.             (dest "c:")
  207.         )
  208.         (rename "c:LoadDB" "c:LoadWB")
  209.         )
  210.     )
  211.  
  212.                     
  213. ; start on boot iconified
  214.                             
  215.  
  216. (complete 95)
  217.  
  218. ; modify S:User-Startup
  219.  
  220.  
  221. ; set the script for user startup
  222.  
  223.     (startup "DirectoryOpus 5"
  224.         (prompt
  225.         "The following instructions will added to your "
  226.         "\"S:User-Startup\" so that your system will be properly "
  227.         "configured to use Opus.\n\n"
  228.         "ASSIGN DOpus5: \"" DOpus_Dest "\"\n"
  229.         "PATH DOpus5:c Add \n"
  230.         )
  231.         (help "This will add commands to your S:user-startup file to "
  232.             "allow the correct operation of Directory Opus")
  233.         (command "ASSIGN DOpus5: \"" DOpus_Dest "\"\n")
  234.         (command "PATH DOpus5:c Add \n")
  235.     )
  236.  
  237.  
  238.  
  239. ;make sure assignment is set up so that Opus 5 can run
  240.     
  241.     (makeassign "DOpus5" DOPus_Dest)
  242.  
  243.     (textfile
  244.         (dest "RAM:serialise_cmd")
  245.         (append 
  246.         "dopus5:DirectoryOpus \n"
  247.         )
  248.     )
  249.  
  250.     (execute "RAM:serialise_cmd"
  251.         (prompt "Serialise Directory Opus 5 \n"
  252.             "---------------------------\n"
  253.             "To protect your valuable investment in Opus 5 "
  254.             "and complete the installation procedure, you "
  255.             " SERIALISE your copy of Opus 5 with your details and "
  256.             " the registration number from your installation disk.\n\n"
  257.             "By the way, now is also a good time to complete"
  258.             " the registration card and return it to your local"
  259.             " distributor.  Technical support and warranty will"
  260.             " only be honoured if a valid registration card has"
  261.             " been received."
  262.         )
  263.         (help
  264.             "Directory Opus 5 must be serialised before it will run. Please select continue and enter the registration and serialisation details."
  265.         )
  266.         (confirm)
  267.     )
  268.  
  269.     (run "delete ram:#?_cmd")
  270.     
  271.  
  272.  
  273.     (if (= wbisgo 1)
  274.         (
  275.         (message "Since you have selected to run Directory Opus"
  276.               " as a Workbench Replacement, please remove"
  277.               " all disks from floppy drives and REBOOT your computer.\n\n"
  278.               "*************************\n"
  279.               "****** WARNING **********\n"
  280.               "*************************\n"
  281.               " You MUST have serialised your copy of Opus 5 BEFORE you re-boot!"
  282.             )
  283.         )
  284.     )
  285.     
  286.  
  287.  
  288. ;     reinitialize assigns
  289.  
  290. (if (not @pretend)
  291.     (makeassign "DOpus5" DOPus_Dest)
  292.     
  293. )
  294.  
  295.  
  296.  
  297. (complete 100)
  298.  
  299. ; cleanup
  300. (makeassign "Opus5_Install" (safe))
  301.  
  302.  
  303. (exit text)
  304.  
  305.