home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / CanDo / CANDO_D1.DMS / in.adf / Install < prev    next >
Encoding:
Text File  |  1994-11-15  |  22.0 KB  |  975 lines

  1. ;********************************************************************
  2. ; $VER: Install V3.00 Monday 07-Nov-94 12:53:42
  3. ;       Inovatronics, Inc.
  4. ;       Suite 209b
  5. ;       8499 Greenville Ave
  6. ;       Dallas, Texas 75231
  7. ;       USA
  8. ;********************************************************************
  9. ; History
  10. ; v3.00 based on Install-CanDo and InstallCanDo
  11. ; v1.xx & 2.xx old versions of the install script
  12. ;********************************************************************
  13. ; The required variables
  14. ;********************************************************************
  15. (set true 1)
  16. (set false 0)
  17. (set not_here 0)
  18. (set is_a_file 1)
  19. (set is_a_dir 2)
  20. (set newline "\n")
  21. (set quote "\"")
  22. (set nothing "")
  23. (set testing true)
  24. (set testing false)
  25. (delopts "AskUser" "OkNoDelete" "Force")
  26. (set cpu (database "CPU"))
  27. (set aga (= (database "CHIPREV") "AA"))
  28.  
  29. ;********************************************************************
  30. ; The common/general/english strings
  31. ;********************************************************************
  32. (set Intro_text
  33.     (cat
  34.         "Welcome to the CanDo installer.  This installer uses the "
  35.         "Commodore Amiga Installer.  All of our products use this "
  36.         "installer and we would love to get any feedback that might "
  37.         "help improve the installation procedure." newline
  38.     )
  39. )
  40.  
  41. (set InstallTo_text
  42.     (cat
  43.         "Where would you like to install CanDo's directory?  "
  44.         "You should select the directory that you want to contain the CanDo directory."
  45.     )
  46. )
  47.  
  48. (set InsertMaster_text
  49.     (cat
  50.         "Please insert CanDo's \"Installation Disk\" diskette."
  51.     )
  52. )
  53.  
  54. (set InsertDisk2_text
  55.     (cat
  56.         "Please insert CanDo's \"Disk 2\" diskette."
  57.     )
  58. )
  59.  
  60. (set InsertDisk3_text
  61.     (cat
  62.         "Please insert CanDo's \"Disk 3\" diskette."
  63.     )
  64. )
  65.  
  66. (set InsertDisk4_text
  67.     (cat
  68.         "Please insert CanDo's \"Disk 4\" diskette."
  69.     )
  70. )
  71.  
  72. (set ReInstall_text
  73.     (cat
  74.         "CanDo seems to already be installed.  Do you want to delete "
  75.         "the old installation and reinstall CanDo?"
  76.         newline newline
  77.         "If you say NO we will try to keep your old configuration files."
  78.     )
  79. )
  80.  
  81. (set DeleteFiles_text
  82.     (cat
  83.         "One moment please, deleting file(s)"
  84.         newline
  85.         newline
  86.     )
  87. )
  88.  
  89. (set DeleteDir_text
  90.     (cat
  91.         "One moment please, deleting directory"
  92.         newline
  93.         newline
  94.     )
  95. )
  96.  
  97. (set CreateDir_text
  98.     (cat
  99.         "One moment please, creating directory"
  100.         newline
  101.         newline
  102.     )
  103. )
  104.  
  105. (set Unarchiving_text
  106.     (cat
  107.         "One moment please, unarchiving"
  108.         newline
  109.         newline
  110.     )
  111. )
  112.  
  113. (set Unsnapshot_text
  114.     (cat
  115.         "One moment please, unsnapshotting"
  116.         newline
  117.         newline
  118.     )
  119. )
  120.  
  121. (set MakeBackup_text
  122.     (cat
  123.         "If we detect old configuration files do you want us to back them up?  "
  124.         newline
  125.         newline
  126.     )
  127. )
  128.  
  129. (set BackupResources_text
  130.     (cat
  131.         "If we find old directories of resources (ie. Decks, Images, "
  132.         "Sounds, etc) do you want us to back them up?  If not we will "
  133.         "DELETE them."
  134.         newline
  135.         newline
  136.     )
  137. )
  138.  
  139. (set InstallAGA_text
  140.     (cat
  141.         "Do you want us to install AGA resources?"
  142.         newline
  143.         newline
  144.     )
  145. )
  146.  
  147. (set UpdateS_text
  148.     (cat
  149.         "One moment please, updating S:User-Startup"
  150.         newline
  151.         newline
  152.     )
  153. )
  154.  
  155. (set UpdateSPrompt_text
  156.     (cat
  157.         "An assignment needs to be added to the \"S:User-Startup\" "
  158.         "so that your system will be properly configured to use CanDo."
  159.     )
  160. )
  161.  
  162. (set InstallEverything_text
  163.     (cat
  164.         "Do you want to install the tutorial and their resources?"
  165.         newline
  166.         newline
  167.     )
  168. )
  169.  
  170. (set Final_text
  171.     (cat
  172.         "CanDo v3.0 has now been successfully installed on your "
  173.         "machine.  REBOOT your machine after all the drive lights "
  174.         "have gone out."
  175.         newline
  176.         newline
  177.     )
  178. )
  179.  
  180. (set PathPrefix "Path=")
  181.  
  182. (set FilePrefix "File(s)=")
  183.  
  184. ;********************************************************************
  185. ; The error strings
  186. ;********************************************************************
  187. (set NoSupport_error
  188.     (cat
  189.         "We could not find these support files in Ram:.  "
  190.         "Please reboot and try to install again."
  191.         newline
  192.     )
  193. )
  194.  
  195. (set DirIsAFile_error
  196.     (cat
  197.         "Should be a directory but it is actually a file..."
  198.         newline
  199.     )
  200. )
  201.  
  202. (set DirNotMade_error
  203.     (cat
  204.         "We could not create the directory..."
  205.         newline
  206.     )
  207. )
  208.  
  209. ;********************************************************************
  210. ; The language specific strings, overlay the pre-defined strings
  211. ;********************************************************************
  212. (if (= @language "deutsch")
  213.     (
  214.         ; german strings go here
  215.  
  216.         (set Intro_text
  217.             (cat "Willkommen zum Installationsprogramm von " progname ". "
  218.              "Um die Installtion für Sie so einfach wie möglich zu gestalten, "
  219.              "benutzen wir den Commodore-Installer."
  220.              newline newline
  221.             )
  222.         )
  223.     )
  224. )
  225.  
  226. ;********************************************************************
  227. ; Some common procedures
  228. ;********************************************************************
  229. ; where do we install the CanDo directory
  230. (procedure find_home_dir
  231.     (
  232.         ; if we were installed, where are we?
  233.         (set cando_dir (getassign "CanDo"))
  234.         
  235.         ; is cando assign made?
  236.         (if (= cando_dir nothing)
  237.             (set cando_dir @default-dest)
  238.             (set cando_dir (pathonly cando_dir))
  239.         )
  240.  
  241.         ; where are we to install?
  242.         (set home_dir
  243.             (askdir
  244.                 (prompt InstallTo_text)
  245.                 (help @askdir-help)
  246.                 (default cando_dir)
  247.                 (newpath)
  248.             )
  249.         )
  250.         
  251.         ; see if there is a CanDo file already here
  252.         (set cando_dir (tackon home_dir "CanDo"))
  253.         (if (= (exists cando_dir) is_a_file)
  254.             (
  255.                 ; if we are actually pointing inside CanDo then fix the paths
  256.                 (set cando_dir home_dir)
  257.                 (set home_dir (pathonly home_dir))
  258.             )
  259.         )
  260.         (if (= (exists cando_dir) not_here)
  261.             (makedir cando_dir
  262.                 (infos)
  263.             )
  264.         )
  265.         
  266.         ; is CanDo already installed here?
  267.         (if (= (exists (tackon cando_dir "CanDo")) is_a_file)
  268.             (set preinstalled true)
  269.             (set preinstalled false)
  270.         )
  271.     )
  272. )
  273.  
  274. ; unarchive an archive, destination=path/file, archive=path
  275. (procedure unarchive
  276.     (
  277.         ; get rid of the file(s)
  278.         (delete_pattern)
  279.         
  280.         ; create a batch file
  281.         (textfile
  282.             (dest "Ram:LHEX.script")
  283.             (append
  284.                 (cat
  285.                     "Cd " quote thepath quote newline
  286.                     "Stack 20480" newline
  287.                     "Ram:LHEX -qf x " quote archive quote newline
  288.                 )
  289.             )
  290.         )
  291.         
  292.         ;(if (= testing true)
  293.         ;    (askbool
  294.         ;        (prompt (cat "About to do" newline Unarchiving_Text FilePrefix quote archive quote newline PathPrefix quote thepath quote))
  295.         ;        (choices "Proceed" "Proceed")
  296.         ;        (help @askbool-help)
  297.         ;    )
  298.         ;)
  299.         
  300.         ; unarchive then
  301.         (working Unarchiving_Text FilePrefix quote archive quote newline PathPrefix quote thepath quote)
  302.         (execute "Ram:LHEX.script")
  303.     )
  304. )
  305.  
  306. ; unsnapshot a file, thepath/thefile
  307. (procedure unsnapshot
  308.     (
  309.         ; unsnapshot the stuff in the directory using the pattern
  310.         (working Unsnapshot_text PathPrefix quote thepath quote newline FilePrefix quote thefile quote)
  311.         (foreach thepath thefile
  312.             (
  313.                 ; delete the file then
  314.                 (set temp (tackon thepath @each-name))
  315.                 (if (= (exists temp) is_a_file)
  316.                     ; ok first things first
  317.                     (tooltype
  318.                         (dest (tackon thepath thefile))
  319.                         (noposition)
  320.                     )
  321.                 )
  322.             )
  323.         )
  324.     )
  325. )
  326.  
  327. ; insure a directory exists, destination=path
  328. (procedure insure_dir
  329.     (
  330.         (set thepath destination)
  331.         
  332.         ; if it is a file then abort
  333.         (if (= (exists thepath) is_a_file)
  334.             (abort DirIsAFile_error PathPrefix quote thedir quote)
  335.         )
  336.         
  337.         ; if it doesn't exist make it
  338.         (if (= (exists thepath) not_here)
  339.             (
  340.                 (working CreateDir_text PathPrefix quote thepath quote)
  341.                 (makedir thepath
  342.                     (infos)
  343.                 )
  344.             )
  345.         )
  346.         
  347.         ; verify it actually is a directory
  348.         (if (<> (exists thepath) is_a_dir)
  349.             (abort DirNotMade_error quote thedir quote)
  350.         )
  351.     )
  352. )
  353.  
  354. ; insure a directory exists and clear it of a pattern of files, destination=path/pattern
  355. (procedure delete_pattern
  356.     (
  357.         (set thefile (fileonly destination))
  358.         (set destination (pathonly destination))
  359.         (insure_dir)
  360.         
  361.         ; delete the stuff in the directory using the pattern
  362.         (working DeleteFiles_text PathPrefix quote thepath quote newline FilePrefix quote thefile quote)
  363.         (foreach thepath thefile
  364.             (
  365.                 ; delete the file then
  366.                 (set temp (tackon thepath @each-name))
  367.                 (if (= (exists temp) is_a_file)
  368.                     (
  369.                         ; if an old backup exists then delete it
  370.                         (set temp2 (cat temp ".bak"))
  371.                         (if (= (exists temp2) is_a_file)
  372.                             (delete temp2)
  373.                         )
  374.                                 
  375.                         ; do we check for backups?
  376.                         (if (and (= checkbackup true) (= makebackups true))
  377.                             (
  378.                                 ; just rename it then
  379.                                 (rename temp temp2)
  380.                             )
  381.                             (
  382.                                 ; well just delete it then
  383.                                 (delete temp)
  384.                             )
  385.                         )
  386.                         
  387.                         ; is there an icon for the file?
  388.                         (set temp (cat temp ".info"))
  389.                         (if (= (exists temp) is_a_file)
  390.                             (delete temp)
  391.                         )
  392.                     )
  393.                 )
  394.             )
  395.         )
  396.     )
  397. )
  398.  
  399. ; insure a directory exists, if so backup, and clear it of all files, destination=directory
  400. (procedure resource_dir
  401.     (
  402.         ; is it here
  403.         (if (= (exists destination) is_a_dir)
  404.             (
  405.                 ; do we check for backups?
  406.                 (if (= backupresources true)
  407.                     (
  408.                         ; just rename it then
  409.                         (rename destination (tackon (pathonly destination) (cat (fileonly destination) ".bak")))
  410.                         
  411.                         ; now insure it exists
  412.                         (insure_dir)
  413.                     )
  414.                     (
  415.                         ; well just delete it then
  416.                         (clear_dir)
  417.                     )
  418.                 )
  419.                         
  420.             )
  421.             (insure_dir)
  422.         )
  423.     )
  424. )
  425.  
  426. ; insure a directory exists and clear it of all files, destination=directory
  427. (procedure clear_dir
  428.     (
  429.         ; is it here?
  430.         (insure_dir)
  431.         
  432.         (if (= (exists destination) is_a_dir)
  433.             (
  434.                 (working ClearDir_Text destination)
  435.                 (run (cat "Delete " quote (tackon destination "#?") quote " All Quiet"))
  436.             )
  437.         )
  438.     )
  439. )
  440.  
  441. ; remove the directory and any of its files
  442. (procedure remove_dir
  443.     (
  444.         (if (= (exists destination) is_a_dir)
  445.             (
  446.                 (working DeleteDir_Text destination)
  447.                 (run (cat "Delete " quote destination quote " All Quiet"))
  448.             )
  449.         )
  450.     )
  451. )
  452.  
  453. ; remove the a specific file
  454. (procedure remove_file
  455.     (
  456.         (if (= (exists destination) is_a_file)
  457.             (
  458.                 (working DeleteFiles_Text destination)
  459.                 (run (cat "Delete " quote destination quote " All Quiet"))
  460.             )
  461.         )
  462.     )
  463. )
  464.  
  465. ;********************************************************************
  466. ; The error handler
  467. ;********************************************************************
  468. (onerror
  469.     (makeassign "CanDo_Master" (safe))
  470.     (delete "Ram:LHEX" (safe))
  471.     (delete "Ram:LHEX.script" (safe))
  472. )
  473.  
  474. ; *******************************************************************
  475. ; on with the show
  476. ; *******************************************************************
  477. (welcome intro_text)
  478.  
  479. ; make sure our installation disk is here
  480. (askdisk
  481.     (prompt InsertMaster_Text)
  482.     (help @askdisk-help)
  483.     (dest "Installation_Disk")
  484.     (newname "CanDo_Master")
  485. )
  486.  
  487. ; force everybody to expert mode
  488. (user 2)
  489.  
  490. ; how far have we come?
  491. (complete 0)
  492.  
  493.  
  494. ; *******************************************************************
  495. ; where do we install to?
  496. ; *******************************************************************
  497. (find_home_dir)
  498.  
  499.  
  500. ; *******************************************************************
  501. ; do we do a complete reinstall?
  502. ; *******************************************************************
  503. (if (= preinstalled true)
  504.     (set reinstall
  505.         (askbool
  506.             (prompt ReInstall_text)
  507.             (help @askbool-help)
  508.         )
  509.     )
  510.     (set reinstall true)
  511. )
  512.  
  513.  
  514. ; *******************************************************************
  515. ; if we are not doing a complete reinstall, do we backup the old files?
  516. ; *******************************************************************
  517. (if (= reinstall false)
  518.     (set makebackups
  519.         (askbool
  520.             (prompt MakeBackup_text)
  521.             (help @askbool-help)
  522.         )
  523.     )
  524.     (set makebackups false)
  525. )
  526.  
  527. ; *******************************************************************
  528. ; do we install everything?
  529. ; *******************************************************************
  530. (set installeverything
  531.     (askbool
  532.         (prompt InstallEverything_text)
  533.         (help @askbool-help)
  534.     )
  535. )
  536.  
  537. ; *******************************************************************
  538. ; if we are backing up, do we backup the resource?
  539. ; *******************************************************************
  540. (if (= installeverything true)
  541.     (
  542.         (if (= makebackups true)
  543.             (set backupresources
  544.                 (askbool
  545.                     (prompt BackupResources_text)
  546.                     (help @askbool-help)
  547.                 )
  548.             )
  549.             (set backupresources false)
  550.         )
  551.         
  552. ; *******************************************************************
  553. ; install AGA resources?
  554. ; *******************************************************************
  555.         (if (= aga true)
  556.             (set installAGA
  557.                 (askbool
  558.                     (prompt InstallAGA_text)
  559.                     (help @askbool-help)
  560.                 )
  561.             )
  562.             (set installAGA false)
  563.         )
  564.     )
  565.     (
  566.         (set backupresources false)
  567.         (set installAGA false)
  568.     )
  569. )
  570.         
  571. ; back to novice mode
  572. (user 0)
  573.  
  574.  
  575. ; *******************************************************************
  576. ; copy LHEX to ram:
  577. ; *******************************************************************
  578. (copyfiles
  579.     (source "CanDo_Master:LHEX")
  580.     (dest "Ram:")
  581.     (files)
  582. )
  583.  
  584. ; verify we got LHEX into ram:
  585. (if (<> (exists "Ram:LHEX") is_a_file)
  586.     (abort NoSupport_error quote "LHEX" quote)
  587. )
  588.  
  589.  
  590. ; *******************************************************************
  591. ; delete CanDo and install new one
  592. ; *******************************************************************
  593. (set destination (tackon cando_dir "CanDo"))
  594. (set archive "CanDo_Master:CanDo_Program.lha")
  595. (unarchive)
  596.  
  597. ; how far have we come?
  598. (complete 5)
  599.  
  600.  
  601. ; *******************************************************************
  602. ; keep the defaults or install them?
  603. ; *******************************************************************
  604. (if (= reinstall true)
  605.     (
  606.         ; make backups of these files
  607.         (set checkbackup true)
  608.  
  609.         ; replace the icon?
  610.         (if (<> (exists (tackon cando_dir "CanDo.info")) is_a_file)
  611.             (
  612.                 ; replace the cando icon
  613.                 (if (= testing true)
  614.                     (set destination "Ram:CanDo/CanDo.info")
  615.                     (set destination (tackon cando_dir "CanDo.info"))
  616.                 )
  617.                 (set archive "CanDo_Master:CanDo_DefIcon.lha")
  618.                 (unarchive)
  619.             )
  620.         )
  621.         
  622.         ; replace the s: defaults file?
  623.         (if (<> (exists "S:CanDo.defaults") is_a_file)
  624.             (
  625.                 ; replace the cando defaults file
  626.                 (if (= testing true)
  627.                     (set destination "Ram:S/CanDo.defaults")
  628.                     (set destination "S:CanDo.defaults")
  629.                 )
  630.                 (set archive "CanDo_Master:CanDo_Def.lha")
  631.                 (unarchive)
  632.             )
  633.         )
  634.         
  635.         ; make backups of these files
  636.         (set checkbackup false)
  637.  
  638.     )
  639.     (
  640.         ; replace the cando icon
  641.         (if (= testing true)
  642.             (set destination "Ram:CanDo/CanDo.info")
  643.             (set destination (tackon cando_dir "CanDo.info"))
  644.         )
  645.         (set archive "CanDo_Master:CanDo_DefIcon.lha")
  646.         (unarchive)
  647.     )
  648. )
  649.  
  650. ; how far have we come?
  651. (complete 10)
  652.  
  653.  
  654. ; *******************************************************************
  655. ; now how about the amigaguide stuff
  656. ; *******************************************************************
  657. (if (= (exists "Libs:AmigaGuide.library") is_a_file)
  658.     (if (> 2228235 (getversion "Libs:AmigaGuide.library"))
  659.         (set do_guide true)
  660.     )
  661.     (set do_guide true)
  662. )
  663.  
  664. ; ok do we do guide stuff?
  665. (if (= do_guide true)
  666.     (
  667.         ; first do the library
  668.         (if (= testing true)
  669.             (set destination "Ram:Libs/AmigaGuide.library")
  670.             (set destination "Libs:AmigaGuide.library")
  671.         )
  672.         (set archive "CanDo_Master:AGuide_Lib.lha")
  673.         (unarchive)
  674.         
  675.         ; second, the guide tool
  676.         (if (= testing true)
  677.             (set destination "Ram:Utilities/AmigaGuide")
  678.             (set destination "Sys:Utilities/AmigaGuide")
  679.         )
  680.         (if (<> (exists destination) is_a_file)
  681.             (
  682.                 (set archive "CanDo_Master:AGuide_App.lha")
  683.                 (unarchive)
  684.             )
  685.         )
  686.         
  687.         ; lastly the amigaguide helpfile
  688.         (if (= testing true)
  689.             (set destination "Ram:S/Help.guide")
  690.             (set destination "S:Help.guide")
  691.         )
  692.         (if (<> (exists destination) is_a_file)
  693.             (
  694.                 (set archive "CanDo_Master:AGuide_Hlp.lha")
  695.                 (unarchive)
  696.             )
  697.         )
  698.     )
  699. )
  700.  
  701. ; how far have we come?
  702. (complete 15)
  703.  
  704.  
  705. ; *******************************************************************
  706. ; now how about the ASL stuff
  707. ; *******************************************************************
  708. (if (= (exists "Libs:ASL.library") is_a_file)
  709.     (if (> 2490404 (getversion "Libs:ASL.library"))
  710.         (set do_asl true)
  711.     )
  712.     (set do_asl true)
  713. )
  714.  
  715. ; ok do we do guide stuff?
  716. (if (= do_asl true)
  717.     (
  718.         ; first do the library
  719.         (if (= testing true)
  720.             (set destination "Ram:Libs/ASL.library")
  721.             (set destination "Libs:ASL.library")
  722.         )
  723.         (set archive "CanDo_Master:ASL_Lib.lha")
  724.         (unarchive)
  725.     )
  726. )
  727.  
  728. ; how far have we come?
  729. (complete 20)
  730.  
  731.  
  732. ; *******************************************************************
  733. ; copy readme to the destination
  734. ; *******************************************************************
  735. (copyfiles
  736.     (source "CanDo_Master:ReadMe")
  737.     (dest cando_dir)
  738.     (files)
  739.     (infos)
  740. )
  741.  
  742. ; how far have we come?
  743. (complete 25)
  744.  
  745.  
  746. ; *******************************************************************
  747. ; C: DeckBinder & DeckRunner
  748. ; *******************************************************************
  749. (if (= testing true)
  750.     (set destination "Ram:C/(DeckRunner|DeckBinder)")
  751.     (set destination "C:(DeckRunner|DeckBinder)")
  752. )
  753. (set archive "CanDo_Master:CanDo_C.lha")
  754. (unarchive)
  755.  
  756. ; how far have we come?
  757. (complete 30)
  758.  
  759.  
  760. ; *******************************************************************
  761. ; Libs: CanDo.library, CanDoGFX.library, InovaMusic.library
  762. ; *******************************************************************
  763. (if (= testing true)
  764.     (set destination "Ram:Libs/(CanDo|CanDoGFX|InovaMusic).library")
  765.     (set destination "Libs:(CanDo|CanDoGFX|InovaMusic).library")
  766. )
  767. (set archive "CanDo_Master:CanDo_Libs.lha")
  768. (unarchive)
  769.  
  770. ; how far have we come?
  771. (complete 35)
  772.  
  773.  
  774. ; *******************************************************************
  775. ; clear out the candofiles directory
  776. ; *******************************************************************
  777. ; delete these old directories, if they exist
  778. (set destination (tackon cando_dir "CanDoFiles"))
  779. (clear_dir)
  780.  
  781. ; how far have we come?
  782. (complete 40)
  783.  
  784.  
  785. ; *******************************************************************
  786. ; delete these old directories, if they exist
  787. ; *******************************************************************
  788. (set destination (tackon cando_dir "ObjectTools"))
  789. (remove_dir)
  790. (set destination (tackon cando_dir "EditorTools"))
  791. (remove_dir)
  792. (set destination (tackon cando_dir "HelpFiles"))
  793. (remove_dir)
  794. (set destination (tackon cando_dir "Utilities"))
  795. (remove_dir)
  796. (set destination (tackon cando_dir "XtraTools"))
  797. (remove_dir)
  798.  
  799. ; how far have we come?
  800. (complete 45)
  801.  
  802.  
  803. ; *******************************************************************
  804. ; delete these old files, if they exists
  805. ; *******************************************************************
  806. (set destination (tackon cando_dir "CanDoReadMe"))
  807. (remove_file)
  808.  
  809. ; how far have we come?
  810. (complete 50)
  811.  
  812.  
  813. ; *******************************************************************
  814. ; if backup, rename, else clear/makedir
  815. ; *******************************************************************
  816. (if (= installeverything true)
  817.     (
  818.         (set destination (tackon cando_dir "Anims"))
  819.         (resource_dir)
  820.         (set destination (tackon cando_dir "BrushAnims"))
  821.         (resource_dir)
  822.         (set destination (tackon cando_dir "Brushes"))
  823.         (resource_dir)
  824.         (set destination (tackon cando_dir "Decks"))
  825.         (resource_dir)
  826.         (set destination (tackon cando_dir "Images"))
  827.         (resource_dir)
  828.         (set destination (tackon cando_dir "Palettes"))
  829.         (resource_dir)
  830.         (set destination (tackon cando_dir "Pointers"))
  831.         (resource_dir)
  832.         (set destination (tackon cando_dir "Sounds"))
  833.         (resource_dir)
  834.         (set destination (tackon cando_dir "Text"))
  835.         (resource_dir)
  836.     )
  837. )
  838.  
  839. (set destination (tackon cando_dir "CLIUtilities"))
  840. (resource_dir)
  841. (set destination (tackon cando_dir "WBUtilities"))
  842. (resource_dir)
  843.  
  844. ; how far have we come?
  845. (complete 55)
  846.  
  847.  
  848. ; *******************************************************************
  849. ; unarchive misc stuff from Installation Disk
  850. ; *******************************************************************
  851. (set destination (tackon cando_dir "CanDoFiles"))
  852. (set archive "CanDo_Master:CanDo_Stuff1.lha")
  853. (unarchive)
  854.  
  855. ; how far have we come?
  856. (complete 60)
  857.  
  858.  
  859. ; *******************************************************************
  860. ; DISK 2 is nothing but resources
  861. ; *******************************************************************
  862. (if (= installeverything true)
  863.     (
  864.         (askdisk
  865.             (prompt    InsertDisk2_text)
  866.             (help @askdisk-help)
  867.             (dest "Disk_2")
  868.             (newname "CanDo_Disk2")
  869.         )
  870.         
  871.         ; unarchive from it
  872.         (set destination (tackon cando_dir "CanDoFiles"))
  873.         (set archive "CanDo_Disk2:CanDo_Stuff2.lha")
  874.         (unarchive)
  875.         
  876.         ; how far have we come?
  877.         (complete 65)
  878.  
  879.  
  880.         ; *******************************************************************
  881.         ; DISK 3
  882.         ; *******************************************************************
  883.         (askdisk
  884.             (prompt    InsertDisk3_text)
  885.             (help @askdisk-help)
  886.             (dest "Disk_3")
  887.             (newname "CanDo_Disk3")
  888.         )
  889.         
  890.         ; unarchive from it
  891.         (set destination (tackon cando_dir "CanDoFiles"))
  892.         (set archive "CanDo_Disk3:CanDo_Stuff3.lha")
  893.         (unarchive)
  894.         
  895.         ; how far have we come?
  896.         (complete 75)
  897.     )
  898. )
  899.         
  900. ; *******************************************************************
  901. ; DISK 4
  902. ; *******************************************************************
  903. (askdisk
  904.     (prompt    InsertDisk4_text)
  905.     (help @askdisk-help)
  906.     (dest "Disk_4")
  907.     (newname "CanDo_Disk4")
  908. )
  909.  
  910. ; unarchive from it
  911. (set destination (tackon cando_dir "CanDoFiles"))
  912. (set archive "CanDo_Disk4:CanDo_Stuff4.lha")
  913. (unarchive)
  914.  
  915. ; how far have we come?
  916. (complete 85)
  917.  
  918. ; install AGA resources?
  919. (if (= installeverything true)
  920.     (
  921.         (if (= installAGA true)
  922.             (
  923.                 (set destination (tackon cando_dir "Images"))
  924.                 (set archive "CanDo_Disk4:AGA_Stuff.lha")
  925.                 (unarchive)
  926.             )
  927.         )
  928.     )
  929. )
  930.  
  931. ; how far have we come?
  932. (complete 90)
  933.  
  934.  
  935. ; *******************************************************************
  936. ; almost done, modify S:User-Startup
  937. ; *******************************************************************
  938. (working UpdateS_text)
  939.  
  940. (startup "CanDo"
  941.     (prompt UpdateSPrompt_text)
  942.     (help @startup-help)
  943.     (command "ASSIGN CanDo: " quote cando_dir quote newline)
  944. )
  945.  
  946.  
  947. ; *******************************************************************
  948. ; is the preference saved
  949. ; *******************************************************************
  950. (if (<> (exists "Env:Sys/ScreenMode.Prefs") is_a_file)
  951.     (
  952.         (run "Sys:Prefs/ScreenMode Save")
  953.     )
  954. )
  955. (if (<> (exists "Env:Sys/Overscan.Prefs") is_a_file)
  956.     (
  957.         (run "Sys:Prefs/Overscan Save")
  958.     )
  959. )
  960.  
  961. ; how far have we come?
  962. (complete 100)
  963.  
  964. ; *******************************************************************
  965. ; ok we are done then
  966. ; *******************************************************************
  967. (makeassign "CanDo_Master" (safe))
  968. (makeassign "CanDo_Disk2" (safe))
  969. (makeassign "CanDo_Disk3" (safe))
  970. (makeassign "CanDo_Disk4" (safe))
  971. (delete "Ram:LHEX" (safe))
  972. (delete "Ram:LHEX.script" (safe))
  973. (set @default-dest cando_dir)
  974. (exit Final_text)
  975.