home *** CD-ROM | disk | FTP | other *** search
/ A.C.E. 3 / ACE CD 3.iso / files / utils / cando21.dms / in.adf / Install-ToHardDisk < prev    next >
Encoding:
Text File  |  1992-09-16  |  36.0 KB  |  1,352 lines

  1. ;*************************************************************************
  2. ;    Title:
  3. ;        Install-CanDo
  4. ;*************************************************************************
  5. ;    Description:
  6. ;        The Commodore Installer Script for CanDo 2.0 Software
  7. ;*************************************************************************
  8. ;    Author:
  9. ;        Eddie Churchill, c/o INOVAtronics, Inc.
  10. ;*************************************************************************
  11. ;    Still to do:
  12. ;*************************************************************************
  13. ;    History:
  14. ;        17:21:33 CST, 21 Jan 1992
  15. ;            Added resident cando.library checking
  16. ;        11:55:39 CST, 20 Jan 1992
  17. ;            Added DelOpt settings
  18. ;        13:44:22 CST, 15 Jan 1992
  19. ;            Preserve old cando.info file if one exists
  20. ;        18:15:15 CST, 02 Jan 1992
  21. ;            Made it actually ask for destination in novice mode
  22. ;        15:19:24 CST, 19 Dec 1991
  23. ;            Updated for Installer 1.9
  24. ;        14:39:07 CST, 16 Dec 1991
  25. ;            Finished
  26. ;        11:28:31 CST, 03 Dec 1991
  27. ;            Rewritting script for Installer 1.7
  28. ;*************************************************************************
  29.  
  30.  
  31. ;******************************************************
  32. ;***** SET UP OUR VARIABLES AND OTHER SUCH STUFF ******
  33. ;******************************************************
  34.  
  35. ; some useful variables
  36.     (set true 1)
  37.     (set false 0)
  38.     (set on true)
  39.     (set off false)
  40.     (set yes true)
  41.     (set no false)
  42.     (set yep yes)
  43.     (set nope no)
  44.     (set is_a_file 1)
  45.     (set is_a_dir 2)
  46.     (set quote "\"")
  47.     (set newline "\n")
  48.     (set nothing "")
  49.     (set testing nope)
  50. ;    (set testing yep) ;<- uncomment this for testing mode
  51.     (set os2 (< 2293760 (getversion "exec.library" (resident)))) ; true if under 2.0
  52.     (set resident_candolib (getversion "cando.library" (resident)))
  53.     (set ntsc_mode false)
  54.     (set pal_mode true)
  55.     (set free-mem (+ (database "total-mem") 0)) ; leftover free ram
  56.  
  57. ; set up our delete options
  58.     (delopts "AskUser" "OkNoDelete" "Force")
  59.  
  60. ; determine the default system display mode
  61.     (if (= (database "vblank") "60")
  62.         (set display_mode ntsc_mode)
  63.         (set display_mode pal_mode)
  64.     )
  65.  
  66. ; some useful procedures
  67.     ; fills in the display_text string
  68.     (procedure get_display_text
  69.         (
  70.             (if (= display_mode ntsc_mode)
  71.                 (set display_text "NTSC")
  72.                 (set display_text "PAL")
  73.             )
  74.         )
  75.     )
  76.     
  77.     ; change userlevel to expert
  78.     (procedure expert_level
  79.         (
  80.             (user 2)
  81.         )
  82.     )
  83.     
  84.     ; reset userlevel back to default
  85.     (procedure default_level
  86.         (
  87.             (user default-level)
  88.         )
  89.     )
  90.     
  91.     ; store off userlevel
  92.     (procedure save_default_level
  93.         (
  94.             (set default-level @user-level)
  95.         )
  96.     )
  97.  
  98. ; some overused strings
  99.     (set omp (cat "One moment please..." newline))
  100.     (set pci "Patching the copied icons.")
  101.  
  102. ; a general purpose global error trapper
  103.     (onerror
  104.         (makeassign "CanDoProgram_Master" (safe))
  105.         (makeassign "CanDoExtras_Master" (safe))
  106.         (makeassign "CanDoExamples_Master" (safe))
  107.     )
  108.  
  109.     
  110. ;****************************************
  111. ;***** FIGURE OUT WHERE STUFF GOES ******
  112. ;****************************************
  113.  
  114. ; now figure out the initial defaults for a bunch of things
  115.     (if (= testing true)
  116.         ( ; then clause
  117.             (set cando_dir "Ram:CanDo")
  118. ;            (set cando_dir nothing)
  119. ;            (set cando_dir (getassign "CanDo"))
  120.             (set c_dir "Ram:c")
  121.             (set libs_dir "Ram:libs")
  122.         )
  123.         ( ; else clause
  124.             ; @default-dest is already set for us
  125.             (set cando_dir (getassign "CanDo"))
  126.             (set c_dir (getassign "C"))
  127.             (set libs_dir (getassign "LIBS"))
  128.         )
  129.     )
  130.  
  131. ; introduce our selfs to the viewers
  132.     (welcome "Welcome to the CanDo 2.00 installer.  This installer uses "
  133.         "the Commodore Amiga Installer.  All of our future new products "
  134.         "will be using this installer and we would love to get any feedback "
  135.         "that might help in improving the installation procedure." newline newline
  136.     )
  137.  
  138. ; first reset the user level so that the novice can see whats going on
  139.     (save_default_level)
  140.     (expert_level)
  141.  
  142. ; see if we are doing an update
  143.     (if (<> cando_dir nothing)
  144.         (if (askbool
  145.                 (prompt "There seems to be a CanDo already installed in"
  146.                     " your drawer named " quote cando_dir quote ".  "
  147.                     "Do you want the update installed over it?")
  148.                 (help
  149.                     "The installer has determined that you may already have a "
  150.                     "copy of CanDo installed on your system. If this is wrong or "
  151.                     "you want the update installed elsewhere, select NO as an "
  152.                     "answer. Otherwise, select YES."
  153.                 )
  154.                 (default 1)
  155.             )
  156.             ( ; the then clause
  157.                 (set is_update true) ; hey, the user said yes
  158.             )
  159.             ( ; the else clause
  160.                 (set is_update false) ; hey, the user said nope
  161.                 (set cando_dir
  162.                     (askdir
  163.                         (prompt "Where would you like CanDo installed?")
  164.                         (help @askdir-help)
  165.                         (default @default-dest)
  166.                         (newpath)
  167.                     )
  168.                 )
  169.             )
  170.         )
  171.     )
  172.  
  173. ; if cando_dir is still nothing then where do they want it?
  174.     (if (= cando_dir nothing)
  175.         (set cando_dir
  176.             (askdir
  177.                 (prompt "Where would you like CanDo installed?")
  178.                 (help @askdir-help)
  179.                 (default @default-dest)
  180.                 (newpath)
  181.             )
  182.         )
  183.     )
  184.  
  185. ; before we go on lets reset the user's level back to what it was
  186.     (default_level)
  187.  
  188. ; verify that the cando directory exists
  189.     (if (<> (exists cando_dir) is_a_dir)
  190.         (makedir cando_dir
  191.             (prompt
  192.                 "The directory you have selected for CanDo does not "
  193.                 "seem to exist.  Do you want us to create it for you?"
  194.             )
  195.             (help @makedir-help)
  196.             (infos)
  197.             (confirm)
  198.         )
  199.     )
  200.  
  201. ; lets make sure the C: stuff goes there
  202.     (set c_dir
  203.         (askdir
  204.             (prompt "Where would you like CanDo's C: files installed?")
  205.             (help @askdir-help)
  206.             (default c_dir)
  207.             (newpath)
  208.         )
  209.     )
  210.     
  211.     ; verify that the directory exists
  212.     (if (<> (exists c_dir) is_a_dir)
  213.         (makedir c_dir
  214.             (prompt
  215.                 "The directory you have selected for CanDo 'C:' files does not "
  216.                 "seem to exist.  Do you want us to create it for you?"
  217.             )
  218.             (help @makedir-help)
  219.             (infos)
  220.             (confirm)
  221.         )
  222.     )
  223.  
  224. ; lets make sure the Libs: stuff goes there
  225.     (set libs_dir
  226.         (askdir
  227.             (prompt "Where would you like CanDo's Libs: files installed?")
  228.             (help @askdir-help)
  229.             (default libs_dir)
  230.             (newpath)
  231.         )
  232.     )
  233.  
  234.     ; verify that the directory exists
  235.     (if (<> (exists libs_dir) is_a_dir)
  236.         (makedir libs_dir
  237.             (prompt
  238.                 "The directory you have selected for CanDo 'Libs:' files does not "
  239.                 "seem to exist.  Do you want us to create it for you?"
  240.             )
  241.             (help @makedir-help)
  242.             (infos)
  243.             (confirm)
  244.         )
  245.     )
  246.  
  247.  
  248. ;***********************************
  249. ;***** GET FIRST DISK IN HERE ******
  250. ;***********************************
  251.  
  252. ; ask for the first disk, it should be here but lets check anyway
  253.     (askdisk
  254.         (prompt    "Please insert the disk labeled \"CanDo Program\".")
  255.         (help    "The CanDo Program disk contains the main CanDo program,"
  256.                 "CanDo.Library, DeckRunner, DeckBinder and some example decks."
  257.         )
  258.         (dest  "CanDo")
  259.         (newname "CanDoProgram_Master")
  260.     )
  261.  
  262. ; tell the user of our progress
  263.     (complete 5)
  264.  
  265.  
  266. ;************************************
  267. ;***** FIGURE OUT DISPLAY MODE ******
  268. ;************************************
  269.  
  270. ; tell the user about it
  271.     (working omp "Checking to see what type of Display this system uses.")
  272.     
  273. ; make sure the display_text is filled in
  274.     (get_display_text)
  275.     
  276. ; ask the expert user what mode to use
  277.     (set display_mode
  278.         (askchoice
  279.             (prompt "You are currently using a " display_text " system.  "
  280.                 "Which display system do you want CanDo configured for?"
  281.             )
  282.             (help "This should be initially set to the correct display system "
  283.                 "according to your Amiga.  If you want, you can override this.  "
  284.                 "NTSC is normally only useful in the Americas (USA, Canada, "
  285.                 " Mexico, etc.) whereas PAL is used everywhere else." newline
  286.                 "All this really does is choose which basedeck CanDo should "
  287.                 "default to.  NTSC's basedeck's window is 320 by 200 and PAL's "
  288.                 "is 320 by 256."
  289.                 newline newline
  290.                 @askchoice-help
  291.             )
  292.             (choices "NTSC Display (200/400 pixels high)" "PAL Display (256/512 pixels high)")
  293.             (default display_mode)
  294.         )
  295.     )
  296.  
  297. ; figure out the correct text string
  298.     (get_display_text)
  299.     
  300. ; tell the user of our progress
  301.     (complete 10)
  302.  
  303.  
  304. ;****************************************
  305. ;***** COPY OVER FIRST DISK'S STUFF *****
  306. ;****************************************
  307.  
  308. ; first copy over the c: stuff
  309.     (working omp "Scanning CanDo's C directory for files.")
  310.     
  311.     (set c_dir
  312.         (copyfiles
  313.             (prompt "Copying C: files needed by CanDo")
  314.             (help "This will copy " quote "DeckRunner" quote " and " quote
  315.                 "DeckBinder" quote " to your system's C directory." newline
  316.                 newline
  317.                 @copyfiles-help
  318.             )
  319.             (source "CanDoProgram_Master:C")
  320.             (dest c_dir)
  321.             (pattern "Deck#?")
  322.             (files)
  323.             (confirm)
  324.         )
  325.     )
  326.     
  327. ; look for c:deckrunner
  328.     (set deck_tool (tackon c_dir "DeckRunner"))
  329.     (if (<> (exists deck_tool) is_a_file)
  330.         (set deck_tool "DeckRunner")
  331.     )
  332.  
  333. ; look for c:deckbinder
  334.     (set bind_tool (tackon c_dir "DeckBinder"))
  335.     (if (<> (exists bind_tool) is_a_file)
  336.         (set bind_tool "DeckBinder")
  337.     )
  338.  
  339. ; tell the user of our progress
  340.     (complete 15)
  341.  
  342. ; first copy over the libs: stuff
  343.     (working omp "Scanning to see which libraries are on this distribution disk.")
  344.     
  345.     (copylib
  346.         (prompt "Copying/Updating CanDo.Library")
  347.         (source "CanDoProgram_Master:Libs/CanDo.Library")
  348.         (dest libs_dir)
  349.         (help "This will copy over the CanDo.Library file to your "
  350.             "system's Libs directory." newline newline
  351.             @copylib-help
  352.         )
  353.         (confirm)
  354.     )
  355.     
  356. ; tell the user of our progress
  357.     (complete 20)
  358.  
  359. ; which os are we running on?
  360.     (if (= os2 false)
  361.         (
  362.             (copylib ; math IEEE double base library
  363.                 (prompt "Copying/Updating MathIEEEDoubBas.Library")
  364.                 (source "CanDoProgram_Master:Libs/MathIEEEDoubBas.Library")
  365.                 (dest libs_dir)
  366.                 (help "This will copy over the 1.3 MathIEEEDoubBas.Library file "
  367.                     "to your system's Libs directory." newline newline
  368.                     @copylib-help
  369.                 )
  370.                 (confirm)
  371.             )
  372.             
  373.             (copylib ; math IEEE double transidental library
  374.                 (prompt "Copying/Updating MathIEEEDoubTrans.Library")
  375.                 (source "CanDoProgram_Master:Libs/MathIEEEDoubTrans.Library")
  376.                 (dest libs_dir)
  377.                 (help "This will copy over the 1.3 MathIEEEDoubTrans.Library file "
  378.                     "to your system's Libs directory." newline newline
  379.                     @copylib-help
  380.                 )
  381.                 (confirm)
  382.             )
  383.             
  384.             (copylib ; diskfont library
  385.                 (prompt "Copying/Updating DiskFont.Library")
  386.                 (source "CanDoProgram_Master:Libs/DiskFont.Library")
  387.                 (dest libs_dir)
  388.                 (help "This will copy over the 1.3 DiskFont.Library file "
  389.                     "to your system's Libs directory." newline newline
  390.                     @copylib-help
  391.                 )
  392.                 (confirm)
  393.             )
  394.             
  395.             (copylib ; Version library
  396.                 (prompt "Copying/Updating Version.Library")
  397.                 (source "CanDoProgram_Master:Libs/Version.Library")
  398.                 (dest libs_dir)
  399.                 (help "This will copy over the 1.3 Version.Library file "
  400.                     "to your system's Libs directory." newline newline
  401.                     @copylib-help
  402.                 )
  403.                 (optional)
  404.                 (confirm)
  405.             )
  406.             
  407.             (copylib ; Icon library
  408.                 (prompt "Copying/Updating Icon.Library")
  409.                 (source "CanDoProgram_Master:Libs/Icon.Library")
  410.                 (dest libs_dir)
  411.                 (help "This will copy over the 1.3 Icon.Library file "
  412.                     "to your system's Libs directory." newline newline
  413.                     @copylib-help
  414.                 )
  415.                 (confirm)
  416.             )
  417.         )
  418.         (
  419.             (message "You have 2.xx, so we won't install any of the other "
  420.                 "libraries included with CanDo.  You will need to have the "
  421.                 "following 2.xx libraries:" newline newline
  422.                 "MathIEEEDoubBas.Library" newline
  423.                 "MathIEEEDoubTrans.Library" newline
  424.                 "DiskFont.Library" newline newline
  425.                 "These libraries should be in your " quote "Libs:" quote
  426.                 " directory."
  427.                 (help "The CanDo diskettes come installed with the 1.3x libraries "
  428.                     "and system utilities and your system is installed with a newer "
  429.                     "operating system version so we should not install those libraries."
  430.                 )
  431.             )
  432.         )
  433.     )
  434.     
  435. ; tell the user of our progress
  436.     (complete 25)
  437.  
  438. ; preserving old cando info if it exists
  439.     (set temp (tackon cando_dir "CanDo.info"))
  440.     (if (= (exists temp) is_a_file)
  441.         (
  442.             (working omp "Preserving your old CanDo info file.")
  443.             (rename temp (tackon cando_dir "CanDo_Old.info"))
  444.         )
  445.     )
  446.     
  447. ; Copy over the cando program itself
  448.     (working omp "Scanning for the CanDo program and readme files.")
  449.     
  450.     (set cando_dir
  451.         (copyfiles
  452.             (prompt "Copying CanDo program and readme files")
  453.             (help "This will copy the CanDo program and some various "
  454.                 "readme files." newline newline
  455.                 @copyfiles-help
  456.             )
  457.             (source "CanDoProgram_Master:")
  458.             (dest cando_dir)
  459.             (pattern "(CanDo|ReadMeFirst|TheReader)")
  460.             (files)
  461.             (infos)
  462.             (confirm)
  463.         )
  464.     )
  465.     
  466. ; tell the user of our progress
  467.     (complete 30)
  468.  
  469. ; now patch the copied icons, if cando_dir exists
  470.     (if (and (= (exists cando_dir) is_a_dir) (<> cando_dir nothing))
  471.         (
  472.             (working omp pci)
  473.             
  474.             ; the cando program icon
  475.             (set cando_tool (tackon cando_dir "CanDo"))
  476.             (if (= (exists cando_tool) is_a_file)
  477.                 (tooltype
  478.                     (dest cando_tool)
  479.                     (settooltype "IconDefaultTool" (cat quote deck_tool quote))
  480.                     (setstack 20480)
  481.                     (noposition)
  482.                 )
  483.             )
  484.             
  485.             ; the reader program icon
  486.             (set temp (tackon cando_dir "TheReader"))
  487.             (if (= (exists temp) is_a_file)
  488.                 (
  489.                     (tooltype
  490.                         (dest temp)
  491.                         (noposition)
  492.                     )
  493.                     (set reader_tool temp)
  494.                 )
  495.                 (
  496.                     (set reader_tool "MORE")
  497.                 )
  498.             )
  499.             
  500.             ; the readmefirst text file
  501.             (set temp (tackon cando_dir "ReadMeFirst"))
  502.             (if (= (exists temp) is_a_file)
  503.                 (tooltype
  504.                     (dest temp)
  505.                     (setdefaulttool reader_tool)
  506.                     (noposition)
  507.                 )
  508.             )
  509.         )
  510.         (
  511.             ; since we did not figure out some things we need to set these variables
  512.             (set cando_tool "CanDo")
  513.             (set reader_tool "More")
  514.         )
  515.     )
  516.     
  517. ; tell the user of our progress
  518.     (complete 35)
  519.  
  520. ; copy over the decks and their resources
  521.     (working omp "Scanning for example decks and resource files.")
  522.     
  523.     (set stuff_dir
  524.         (copyfiles
  525.             (prompt "Copying example decks and their resource files.")
  526.             (help "This will copy the CanDo example decks and their "
  527.                 "resource files." newline newline
  528.                 @copyfiles-help
  529.             )
  530.             (source "CanDoProgram_Master:")
  531.             (dest cando_dir)
  532.             (pattern "(Images|Sounds|Text|Anims|BrushAnims|Brushes|Utilities|Decks)")
  533.             (infos)
  534.             (confirm)
  535.         )
  536.     )
  537.     
  538. ; tell the user of our progress
  539.     (complete 40)
  540.  
  541. ; now patch the copied icons, if stuff_dir exists
  542.     (if (and (= (exists stuff_dir) is_a_dir) (<> stuff_dir nothing))
  543.         (
  544.             (working omp pci)
  545.             
  546.             ; the drawer icons themselves
  547.             (foreach stuff_dir "(Images|Sounds|Text|Anims|BrushAnims|Brushes|Utilities|Decks)"
  548.                 (tooltype
  549.                     (dest (tackon stuff_dir @each-name))
  550.                     (noposition)
  551.                 )
  552.             )
  553.             
  554.             ; now set defaulttool of each of the decks
  555.             (set decks_dir (tackon stuff_dir "Decks"))
  556.             (if (and (= (exists decks_dir) is_a_dir) (<> decks_dir nothing))
  557.                 (foreach "CanDoProgram_Master:Decks" "~(#?.info)"
  558.                     (if (> 0 @each-type) ; hey its a file!
  559.                         (tooltype
  560.                             (dest (tackon decks_dir @each-name))
  561.                             (setdefaulttool deck_tool)
  562.                             (noposition)
  563.                         )
  564.                     )
  565.                 )
  566.             )
  567.             
  568.             ; fix up the cando icon for these resources
  569.             (if (= (exists cando_tool) is_a_file)
  570.                 (tooltype
  571.                     (dest cando_tool)
  572.                     (settooltype "Documents"
  573.                         (cat quote (tackon stuff_dir "Text") quote)
  574.                     )
  575.                     (settooltype "Images"
  576.                         (cat quote (tackon stuff_dir "Images") quote)
  577.                     )
  578.                     (settooltype "Sounds"
  579.                         (cat quote (tackon stuff_dir "Sounds") quote)
  580.                     )
  581.                     (settooltype "BrushAnims"
  582.                         (cat quote (tackon stuff_dir "BrushAnims") quote)
  583.                     )
  584.                     (settooltype "Brushes"
  585.                         (cat quote (tackon stuff_dir "Brushes") quote)
  586.                     )
  587.                     (settooltype "Applications"
  588.                         (cat quote (tackon stuff_dir "Applications") quote)
  589.                     )
  590.                     (settooltype "Decks"
  591.                         (cat quote decks_dir quote)
  592.                     )
  593.                 )
  594.             )
  595.         )
  596.         (
  597.             ; since we did not figure out the decks directory then set this var
  598.             (set decks_dir nothing)
  599.         )
  600.     )
  601.  
  602. ; tell the user of our progress
  603.     (complete 45)
  604.  
  605.  
  606. ;************************************
  607. ;***** GET SECOND DISK IN HERE ******
  608. ;************************************
  609.  
  610. ; ask for the second disk.
  611.     (askdisk
  612.         (prompt    "Please insert the disk labeled \"CanDo Extras\".")
  613.         (help    "The CanDo Extras disk contains various overlays and "
  614.             "support files for the CanDo program."
  615.         )
  616.         (dest  "CanDoExtras")
  617.         (newname "CanDoExtras_Master")
  618.     )
  619.  
  620. ; tell the user of our progress
  621.     (complete 50)
  622.  
  623.  
  624. ;*****************************************
  625. ;***** COPY OVER SECOND DISK'S STUFF *****
  626. ;*****************************************
  627.  
  628. ; copy over cando's files and overlays
  629.     (working omp "Scanning for CanDo's data files and overlays.")
  630.     
  631. ; due to a bug and because we want to still test we do this
  632.     (set extras_dir
  633.         (copyfiles
  634.             (prompt "Copying CanDo's data files and overlays.")
  635.             (help "This will copy the CanDo's data and overlay files."
  636.                 newline newline
  637.                 @copyfiles-help
  638.             )
  639.             (source "CanDoExtras_Master:")
  640.             (dest cando_dir)
  641.             (pattern "(CanDoFiles|EditorTools|HelpFiles|ObjectTools|XtraTools)")
  642.             (infos)
  643.             (confirm)
  644.         )
  645.     )
  646.     
  647. ; tell the user of our progress
  648.     (complete 55)
  649.  
  650. ; now patch the copied icons, if stuff_dir exists
  651.     (if (and (= (exists extras_dir) is_a_dir) (<> extras_dir nothing))
  652.         (
  653.             (working omp pci)
  654.             
  655.             ; the drawer icons themselves
  656.             (foreach extras_dir "(CanDoFiles|EditorTools|HelpFiles|ObjectTools|XtraTools)"
  657.                 (tooltype
  658.                     (dest (tackon stuff_dir @each-name))
  659.                     (noposition)
  660.                 )
  661.             )
  662.             
  663.             ; fix up the cando icon for these resources
  664.             (if (= (exists cando_tool) is_a_file)
  665.                 
  666.                 ; are the extras dirs in the same place as cando?
  667.                 (if (= cando_dir extras_dir)
  668.                     ( ; if they are the same then we don't need the tooltypes
  669.                         (tooltype
  670.                             (dest cando_tool)
  671.                             (settooltype "CanDoFiles")
  672.                             (settooltype "EditorTools")
  673.                             (settooltype "HelpFiles")
  674.                             (settooltype "ObjectTools")
  675.                             (settooltype "XtraTools")
  676.                         )
  677.                     )
  678.                     ( ; if they are different then we need to fill in the tooltypes
  679.                         (tooltype
  680.                             (dest cando_tool)
  681.                             (settooltype "CanDoFiles"
  682.                                 (cat quote (tackon extras_dir "CanDoFiles") quote)
  683.                             )
  684.                             (settooltype "EditorTools"
  685.                                 (cat quote (tackon extras_dir "EditorTools") quote)
  686.                             )
  687.                             (settooltype "HelpFiles"
  688.                                 (cat quote (tackon extras_dir "HelpFiles") quote)
  689.                             )
  690.                             (settooltype "ObjectTools"
  691.                                 (cat quote (tackon extras_dir "ObjectTools") quote)
  692.                             )
  693.                             (settooltype "XtraTools"
  694.                                 (cat quote (tackon extras_dir "XtraTools") quote)
  695.                             )
  696.                         )
  697.                     )
  698.                 )
  699.             )
  700.             
  701.             ; Set up the base deck based on display type
  702.             (working omp "Configuring CanDo to use " display_text " display.")
  703.             
  704.             ; since the cando is setup for ntsc we only need to this for pal mode
  705.             (if (= display_mode pal_mode)
  706.                 (
  707.                     ; make up the tempory directory name
  708.                     (set temp_dir (tackon extras_dir "CanDoFiles/Overlays"))
  709.                     
  710.                     ; rename current (NTSC) base deck to basedeck.ntsc
  711.                     (rename
  712.                         (tackon temp_dir "BaseDeck")
  713.                         (tackon temp_dir "BaseDeck.NTSC")
  714.                     )
  715.                     
  716.                     ; rename basedeck.pal to basedeck
  717.                     (rename
  718.                         (tackon temp_dir "BaseDeck.PAL")
  719.                         (tackon temp_dir "BaseDeck")
  720.                     )
  721.                 )
  722.             )
  723.             
  724.             ; tell the user of our progress
  725.             (complete 60)
  726.  
  727.             ; clean up the drawers.  remove any unneeded or out of date stuff
  728.             (working omp "Scanning for any unneeded or out of date stuff.")
  729.             
  730.             ; removing out of date images from CanDoFiles
  731.             (set temp_dir (tackon extras_dir "CanDoFiles"))
  732.             (if (and (= (exists temp_dir) is_a_dir) (<> temp_dir nothing))
  733.                 (
  734.                     ; notify that we are working on this drawer
  735.                     (working omp "Cleaning up the CanDoFiles directory.")
  736.                     
  737.                     ; Delete CanDoFiles/UpAndDown.Grab
  738.                     (set temp_file (tackon temp_dir "UpAndDown.Grab"))
  739.                     (if (= (exists temp_file) is_a_file)
  740.                         (delete temp_file)
  741.                     )
  742.                     
  743.                     ; Delete CanDoFiles/EdToolStrip.Grab
  744.                     (set temp_file (tackon temp_dir "EdToolStrip.Grab"))
  745.                     (if (= (exists temp_file) is_a_file)
  746.                         (delete temp_file)
  747.                     )
  748.                     
  749.                     ; Delete CanDoFiles/DiskIcon.Grab
  750.                     (set temp_file (tackon temp_dir "DiskIcon.Grab"))
  751.                     (if (= (exists temp_file) is_a_file)
  752.                         (delete temp_file)
  753.                     )
  754.                 )
  755.             )
  756.                     
  757.             ; Removing some old (pre2.0) overlay files
  758.             (set temp_dir (tackon extras_dir "CanDoFiles/Overlays"))
  759.             (if (and (= (exists temp_dir) is_a_dir) (<> temp_dir nothing))
  760.                 (
  761.                     ; notify that we are working on this drawer
  762.                     (working omp "Cleaning up the Overlays directory.")
  763.                     
  764.                     ; Delete CanDoFiles/Overlays/Extras
  765.                     (set temp_file (tackon temp_dir "Extras"))
  766.                     (if (= (exists temp_file) is_a_file)
  767.                         (delete temp_file)
  768.                     )
  769.                     
  770.                     ; Delete CanDoFiles/Overlays/GeneralList
  771.                     (set temp_file (tackon temp_dir "GeneralList"))
  772.                     (if (= (exists temp_file) is_a_file)
  773.                         (delete temp_file)
  774.                     )
  775.                     
  776.                     ; Delete CanDoFiles/Overlays/LittleLister
  777.                     (set temp_file (tackon temp_dir "LittleLister"))
  778.                     (if (= (exists temp_file) is_a_file)
  779.                         (delete temp_file)
  780.                     )
  781.                     
  782.                     ; Delete CanDoFiles/Overlays/Misc
  783.                     (set temp_file (tackon temp_dir "Misc"))
  784.                     (if (= (exists temp_file) is_a_file)
  785.                         (delete temp_file)
  786.                     )
  787.                 )
  788.             )
  789.             
  790.             ; Cleanup editor tools
  791.             (set temp_dir (tackon extras_dir "EditorTools"))
  792.             (if (and (= (exists temp_dir) is_a_dir) (<> temp_dir nothing))
  793.                 (
  794.                     ; notify that we are working on this drawer
  795.                     (working omp "Cleaning up the EditorTools directory.")
  796.                     
  797.                     ; delete the old routines tool if it exists
  798.                     (set my_dir (tackon temp_dir "Routines"))
  799.                     (if (= (exists my_dir) is_a_dir)
  800.                         (
  801.                             (delete (tackon my_dir "Resource"))
  802.                             (delete (tackon my_dir "ToolIcon.Grab"))
  803.                             (delete (tackon my_dir ".info"))
  804.                             (delete my_dir)
  805.                             (delete (cat my_dir ".info"))
  806.                         )
  807.                     )
  808.                     
  809.                     ; if the layout tool then it is out of date, slick it
  810.                     (set my_dir (tackon temp_dir "Layout"))
  811.                     (if (= (exists my_dir) is_a_dir)
  812.                         (
  813.                             ; first delete all the stuff in the directory
  814.                             (foreach my_dir "#?"
  815.                                 (if (< 0 @each-type) ; hey its a directory!
  816.                                     (
  817.                                         ; if the item is a directory then delete inside
  818.                                         (set my2_dir (tackon my_dir @each-name))
  819.                                         (foreach my2_dir "#?"
  820.                                             (delete (tackon my2_dir @each-name))
  821.                                         )
  822.                                         
  823.                                         ; then delete the directory
  824.                                         (delete my2_dir)
  825.                                     )
  826.                                     ; otherwise delete the file
  827.                                     (delete (tackon my_dir @each-name))
  828.                                 )
  829.                             )
  830.                             
  831.                             ; then delete the directory and its icon
  832.                             (delete my_dir)
  833.                             (delete (cat my_dir ".info"))
  834.                         )
  835.                     )
  836.                     
  837.                     ; if paint/brushes exists then delete it
  838.                     (set my_dir (tackon temp_dir "Paint/Brushes"))
  839.                     (if (= (exists my_dir) is_a_dir)
  840.                         (
  841.                             ; delete the brushes directory
  842.                             (delete (tackon my_dir "Complement.Grab"))
  843.                             (delete (tackon my_dir "Jam1.Grab"))
  844.                             (delete (tackon my_dir "Jam2.Grab"))
  845.                             (delete (tackon my_dir "PaintPanel.Grab"))
  846.                             (delete (tackon my_dir ".info"))
  847.                             (delete my_dir)
  848.                             (delete (cat my_dir ".info"))
  849.                         )
  850.                     )
  851.                 )
  852.             )
  853.             
  854.             ; Clean up helpfiles directory
  855.             (set temp_dir (tackon extras_dir "HelpFiles"))
  856.             (if (and (= (exists temp_dir) is_a_dir) (<> temp_dir nothing))
  857.                 (
  858.                     ; notify that we are working on this drawer
  859.                     (working omp "Cleaning up the HelpFiles directory.")
  860.                     
  861.                     ; if file Main.Index exists then delete it
  862.                     (set temp_file (tackon temp_dir "Main.Index"))
  863.                     (if (= (exists temp_file) is_a_file)
  864.                         (delete temp_file)
  865.                     )
  866.                     
  867.                     ; if directories exists then delete them
  868.                     (if (exists (tackon temp_dir "ARexx"))
  869.                         (foreach temp_dir "#?"
  870.                             (if (< 0 @each-type) ; hey its a directory!
  871.                                 (
  872.                                     (set my_dir (tackon temp_dir @each-name))
  873.                                     (foreach my_dir "#?"
  874.                                         (delete (tackon my_dir @each-name))
  875.                                     )
  876.                                     (delete my_dir)
  877.                                     (delete (cat my_dir ".info"))
  878.                                 )
  879.                             )
  880.                         )
  881.                     )
  882.                 )
  883.             )
  884.             
  885.             ; tell the user of our progress
  886.             (complete 65)
  887.  
  888.             ; Cleanup object tools
  889.             (set temp_dir (tackon extras_dir "ObjectTools"))
  890.             (if (and (= (exists temp_dir) is_a_dir) (<> temp_dir nothing))
  891.                 (
  892.                     ; notify that we are working on this drawer
  893.                     (working omp "Cleaning up the ObjectTools directory.")
  894.                     
  895.                     ; delete the old routines tool if it exists
  896.                     (set my_dir (tackon temp_dir "Routines"))
  897.                     (if (= (exists my_dir) is_a_dir)
  898.                         (
  899.                             (delete (tackon my_dir "Resource"))
  900.                             (delete (tackon my_dir "Handler"))
  901.                             (delete (tackon my_dir ".info"))
  902.                             (delete my_dir)
  903.                             (delete (cat my_dir ".info"))
  904.                         )
  905.                     )
  906.                     
  907.                     ; delete old directory in document objecttool
  908.                     (set my_dir (tackon temp_dir "Document/Brushes"))
  909.                     (if (= (exists my_dir) is_a_dir)
  910.                         (
  911.                             ; the brushes directory
  912.                             (delete (tackon my_dir "ScrollBar.Grab"))
  913.                             (delete (tackon my_dir "ScrollBar.Grab.info"))
  914.                             (delete (tackon my_dir ".info"))
  915.                             (delete my_dir)
  916.                             (delete (cat my_dir ".info"))
  917.                         )
  918.                     )
  919.                     
  920.                     ; delete old directory in field objecttool
  921.                     (set my_dir (tackon temp_dir "Field/Brushes"))
  922.                     (if (= (exists my_dir) is_a_dir)
  923.                         (
  924.                             ; the brushes directory
  925.                             (delete (tackon my_dir "Justification.Grab"))
  926.                             (delete (tackon my_dir "Justification.Grab.info"))
  927.                             (delete (tackon my_dir ".info"))
  928.                             (delete my_dir)
  929.                             (delete (cat my_dir ".info"))
  930.                         )
  931.                     )
  932.                     
  933.                     ; delete old directory in Window objecttool
  934.                     (set my_dir (tackon temp_dir "Window/Brushes"))
  935.                     (if (= (exists my_dir) is_a_dir)
  936.                         (
  937.                             ; the brushes directory
  938.                             (delete (tackon my_dir "Objects.Grab"))
  939.                             (delete (tackon my_dir "Objects.Grab.info"))
  940.                             (delete (tackon my_dir ".info"))
  941.                             (delete my_dir)
  942.                             (delete (cat my_dir ".info"))
  943.                         )
  944.                     )
  945.                 )
  946.             )
  947.             
  948.             ; Wipe out xtratools
  949.             (set temp_dir (tackon extras_dir "XtraTools"))
  950.             (if (and (= (exists temp_dir) is_a_dir) (<> temp_dir nothing))
  951.                 (
  952.                     ; notify that we are working on this drawer
  953.                     (working omp "Cleaning up the XtraTools directory.")
  954.                     
  955.                     ; delete everything except the Error object
  956.                     (foreach temp_dir "~(Error|Error.info)"
  957.                         (if (< 0 @each-type) ; hey its a directory!
  958.                             (
  959.                                 (set my_dir (tackon temp_dir @each-name))
  960.                                 (foreach my_dir "#?"
  961.                                     (delete (tackon my_dir @each-name))
  962.                                 )
  963.                                 (delete my_dir)
  964.                             )
  965.                             (delete (tackon temp_dir @each-name))
  966.                         )
  967.                     )
  968.                 )
  969.             )
  970.         )
  971.     )
  972.     
  973. ; tell the user of our progress
  974.     (complete 70)
  975.  
  976.  
  977. ;************************************
  978. ;***** GET THIRD DISK IN HERE ******
  979. ;************************************
  980.  
  981. ; ask for the third disk.
  982.     (askdisk
  983.         (prompt    "Please insert the disk labeled \"CanDo Examples and Utilities\".")
  984.         (help    "The CanDo Examples and Utilities disk contains various utilities and "
  985.             "example decks for your use."
  986.         )
  987.         (dest  "CanDoExamples")
  988.         (newname "CanDoExamples_Master")
  989.     )
  990.  
  991. ; tell the user of our progress
  992.     (complete 75)
  993.  
  994.  
  995. ;****************************************
  996. ;***** COPY OVER THIRD DISK'S STUFF *****
  997. ;****************************************
  998.  
  999. ; copy cando example disk's decks, cliutilities and utilities stuff
  1000.     (working omp "Scanning for CanDo's utilities and example decks.")
  1001.     
  1002. ; due to a bug and because we want to still test we do this
  1003.     (set mostuff_dir
  1004.         (copyfiles
  1005.             (prompt "Copying CanDo's utilities and example decks.")
  1006.             (help "This will copy the CanDo's utilities and example decks."
  1007.                 newline newline
  1008.                 @copyfiles-help
  1009.             )
  1010.             (source "CanDoExamples_Master:")
  1011.             (dest stuff_dir)
  1012.             (pattern "(CLIUtilities|Utilities|Errata.Doc|Decks)")
  1013.             (infos)
  1014.             (confirm)
  1015.         )
  1016.     )
  1017.  
  1018. ; tell the user of our progress
  1019.     (complete 80)
  1020.  
  1021. ; now patch the copied icons, if mostuff_dir exists
  1022.     (if (and (= (exists mostuff_dir) is_a_dir) (<> mostuff_dir nothing))
  1023.         (
  1024.             (working omp pci)
  1025.             
  1026.             ; first fix up the drawer icons
  1027.             (foreach mostuff_dir "(CLIUtilities|Utilities|Decks)"
  1028.                 (tooltype
  1029.                     (dest (tackon mostuff_dir @each-name))
  1030.                     (noposition)
  1031.                 )
  1032.             )
  1033.             
  1034.             ; then fix up the readme file icon
  1035.             (tooltype
  1036.                 (dest (tackon mostuff_dir "Errata.Doc"))
  1037.                 (noposition)
  1038.                 (setdefaulttool reader_tool)
  1039.             )
  1040.             
  1041.             ; patch icons in the CLIutilities drawer
  1042.             (set temp_dir (tackon mostuff_dir "CLIUtilities"))
  1043.             (if (and (= (exists temp_dir) is_a_dir) (<> temp_dir nothing))
  1044.                 (
  1045.                     ; first the readme files
  1046.                     (foreach temp_dir "#?.doc"
  1047.                         (tooltype
  1048.                             (dest (tackon temp_dir @each-name))
  1049.                             (noposition)
  1050.                             (setdefaulttool reader_tool)
  1051.                         )
  1052.                     )
  1053.                     
  1054.                     ; identify the deckbrowser tool
  1055.                     (set browse_tool (tackon temp_dir "DeckBrowser"))
  1056.                     (if (<> (exists browse_tool) is_a_file)
  1057.                         (set browse_tool "DeckBrowser")
  1058.                     )
  1059.                     
  1060.                     ; identify the shutdowndeck tool
  1061.                     (set killdeck_tool (tackon temp_dir "ShutDownDeck"))
  1062.                     (if (<> (exists killdeck_tool) is_a_file)
  1063.                         (set killdeck_tool "ShutDownDeck")
  1064.                     )
  1065.                 )
  1066.                 (
  1067.                     ; else fill in tool vars with defaults
  1068.                     (set browse_tool "DeckBrowser")
  1069.                     (set killdeck_tool "ShutDownDeck")
  1070.                 )
  1071.             )
  1072.             
  1073.             ; patch icons in the utilities drawer
  1074.             (set temp_dir (tackon mostuff_dir "Utilities"))
  1075.             (if (and (= (exists temp_dir) is_a_dir) (<> temp_dir nothing))
  1076.                 (
  1077.                     ; first the readme files
  1078.                     (foreach temp_dir "#?.doc"
  1079.                         (tooltype
  1080.                             (dest (tackon temp_dir @each-name))
  1081.                             (noposition)
  1082.                             (setdefaulttool reader_tool)
  1083.                         )
  1084.                     )
  1085.                     
  1086.                     ; patch thebinder utility
  1087.                     (set temp_file (tackon temp_dir "TheBinder"))
  1088.                     (if (= (exists temp_file) is_a_file)
  1089.                         (tooltype
  1090.                             (dest temp_file)
  1091.                             (settooltype "Source" (cat quote decks_dir quote))
  1092.                             (settooltype "Destination" (cat quote "Ram:Application" quote))
  1093.                             (settooltype "RunnerNeedsLibrary" (cat quote deck_tool quote))
  1094.                             (settooltype "RunnerNoLibrary" (cat quote browse_tool quote))
  1095.                             (settooltype "Binder" (cat quote bind_tool quote))
  1096.                             (noposition)
  1097.                         )
  1098.                     )
  1099.                     
  1100.                     ; patch themultibinder utility
  1101.                     (set temp_file (tackon temp_dir "TheMultiBinder"))
  1102.                     (if (= (exists temp_file) is_a_file)
  1103.                         (tooltype
  1104.                             (dest temp_file)
  1105.                             (settooltype "Source" (cat quote decks_dir quote))
  1106.                             (settooltype "Destination" (cat quote "Ram:Application" quote))
  1107.                             (settooltype "RunnerNeedsLibrary" (cat quote deck_tool quote))
  1108.                             (settooltype "RunnerNoLibrary" (cat quote browse_tool quote))
  1109.                             (settooltype "Binder" (cat quote bind_tool quote))
  1110.                             (settooltype "ObjectsOnly" "No")
  1111.                             (noposition)
  1112.                         )
  1113.                     )
  1114.                     
  1115.                     ; patch therelocator utility
  1116.                     (set temp_file (tackon temp_dir "TheRelocator"))
  1117.                     (if (= (exists temp_file) is_a_file)
  1118.                         (tooltype
  1119.                             (dest temp_file)
  1120.                             (settooltype "Source" (cat quote decks_dir quote))
  1121.                             (settooltype "Destination" (cat quote "Ram:NewDeck" quote))
  1122.                             (noposition)
  1123.                         )
  1124.                     )
  1125.                     
  1126.                     ; patch theprinter utility
  1127.                     (set temp_file (tackon temp_dir "ThePrinter"))
  1128.                     (if (= (exists temp_file) is_a_file)
  1129.                         (tooltype
  1130.                             (dest temp_file)
  1131.                             (settooltype "Source" (cat quote decks_dir quote))
  1132.                             (noposition)
  1133.                         )
  1134.                     )
  1135.                     
  1136.                     ; patch stopcando utility
  1137.                     (set temp_file (tackon temp_dir "StopCanDo"))
  1138.                     (if (= (exists temp_file) is_a_file)
  1139.                         (tooltype
  1140.                             (dest temp_file)
  1141.                             (settooltype "DeckKiller" (cat quote killdeck_dir quote))
  1142.                             (noposition)
  1143.                         )
  1144.                     )
  1145.                 )
  1146.             )
  1147.             
  1148.             ; tell the user of our progress
  1149.             (complete 85)
  1150.  
  1151.             ; patch icons in the decks drawer
  1152.             (set temp_dir (tackon mostuff_dir "Decks"))
  1153.             (if (and (= (exists temp_dir) is_a_dir) (<> temp_dir nothing))
  1154.                 (
  1155.                     ; then patch each drawer of decks
  1156.                     (foreach "CanDoExamples_Master:Decks" "~(#?.info)"
  1157.                         (if (< 0 @each-type) ; hey its a directory!
  1158.                             (
  1159.                                 ; shorten the path
  1160.                                 (set my_dir (tackon temp_dir @each-name))
  1161.                                 
  1162.                                 ; now do the decks inside
  1163.                                 (foreach my_dir "~(#?.#?)"
  1164.                                     (if (> 0 @each-type) ; hey its a file!
  1165.                                         (tooltype
  1166.                                             (dest (tackon my_dir @each-name))
  1167.                                             (setdefaulttool deck_tool)
  1168.                                             (noposition)
  1169.                                         )
  1170.                                     )
  1171.                                 )
  1172.                                 (tooltype
  1173.                                     (dest (tackon my_dir "AboutTheseDecks.Doc"))
  1174.                                     (setdefaulttool reader_tool)
  1175.                                     (noposition)
  1176.                                 )
  1177.                                 
  1178.                                 ; patch the drawer's icon
  1179.                                 (tooltype
  1180.                                     (dest my_dir)
  1181.                                     (noposition)
  1182.                                 )
  1183.                             )
  1184.                         )
  1185.                     )
  1186.                     
  1187.                     ; then patch the weird sub-dirs: subdecks
  1188.                     (set my_dir (tackon temp_dir "ComplexExamples/SubDecks"))
  1189.                     (if (= (exists temp_dir) is_a_dir)
  1190.                         (
  1191.                             (foreach my_dir "~(#?.#?)" ;<- no icons
  1192.                                 (tooltype
  1193.                                     (dest (tackon my_dir @each-name))
  1194.                                     (setdefaulttool deck_tool)
  1195.                                     (noposition)
  1196.                                 )
  1197.                             )
  1198.                         )
  1199.                     )
  1200.                     
  1201.                     ; then patch the weird sub-dirs: helpfiles
  1202.                     (set my_dir (tackon temp_dir "ComplexExamples/BudgetHelpFiles"))
  1203.                     (if (= (exists temp_dir) is_a_dir)
  1204.                         (
  1205.                             (foreach my_dir "BudHelp.???" ;<- no icons
  1206.                                 (tooltype
  1207.                                     (dest (tackon my_dir @each-name))
  1208.                                     (setdefaulttool reader_tool)
  1209.                                     (noposition)
  1210.                                 )
  1211.                             )
  1212.                         )
  1213.                     )
  1214.                 )
  1215.             )
  1216.         )
  1217.     )
  1218.             
  1219. ; tell the user of our progress
  1220.     (complete 90)
  1221.  
  1222. ; copy any cando example disk xtratools that may exists.
  1223.     (working omp "Scanning for additional XtraTools.")
  1224.     
  1225.     ; scan the directory
  1226.     (set temp_dir "CanDoExamples_Master:MoreXtraTools")
  1227.     (if (= (exists temp_dir) is_a_dir)
  1228.         ( ; if they exists then copy the directory
  1229.             (copyfiles
  1230.                 (prompt "Copying additional XtraTools.")
  1231.                 (help "This will copy the additional XtraTools from the Examples Disk."
  1232.                     newline newline
  1233.                     @copyfiles-help
  1234.                 )
  1235.                 (source temp_dir)
  1236.                 (dest (tackon extras_dir "XtraTools"))
  1237.                 (pattern "#?")
  1238.                 (infos)
  1239.                 (confirm)
  1240.             )
  1241.             
  1242.             ; adjust the tooltype for CanDo
  1243.             (tooltype
  1244.                 (dest cando_tool)
  1245.                 (settooltype "MenuTools" "ConfigCanDo|Proportional|ObjectLayer|SuperDuper|BookMark|LastBookMark")
  1246.             )
  1247.         )
  1248.         ( ; else none where found
  1249.             (working "No additional XtraTools where found.")
  1250.         )
  1251.     )
  1252.  
  1253. ; tell the user of our progress
  1254.     (complete 95)
  1255.  
  1256. ; copy any cando example disk editortools that may exists.
  1257.     (working omp "Scanning for additional EditorTools.")
  1258.     
  1259.     ; scan the directory
  1260.     (set temp_dir "CanDoExamples_Master:MoreEditorTools")
  1261.     (if (= (exists temp_dir) is_a_dir)
  1262.         ( ; if they exists then copy the directory
  1263.             (copyfiles
  1264.                 (prompt "Copying additional EditorTools.")
  1265.                 (help "This will copy the additional EditorTools from the Examples Disk."
  1266.                     newline newline
  1267.                     @copyfiles-help
  1268.                 )
  1269.                 (source temp_dir)
  1270.                 (dest (tackon extras_dir "EditorTools"))
  1271.                 (pattern "#?")
  1272.                 (infos)
  1273.                 (confirm)
  1274.             )
  1275.         )
  1276.         ( ; else none where found
  1277.             (working "No additional EditorTools where found.")
  1278.         )
  1279.     )
  1280.  
  1281. ; modify S:User-Startup
  1282.     (working omp "Updating S:User-Startup.")
  1283.     
  1284.     (startup "CanDo"
  1285.         (prompt
  1286.             "Some instructions need to be added to the \"S:User-Startup\" "
  1287.             "so that your system will be properly configured to use CanDo.")
  1288.         (help @startup-help)
  1289.         (command
  1290.             "ASSIGN CanDo: " quote cando_dir quote newline
  1291.             "ASSIGN CanDoExtras: " quote extras_dir quote newline
  1292.             "ASSIGN CanDoExamples: " quote mostuff_dir quote newline
  1293.         )
  1294.     )
  1295.  
  1296. ; tell the user of our progress
  1297.     (complete 100)
  1298.  
  1299.  
  1300. ;*****************************
  1301. ;***** WE BE ALMOST DONE *****
  1302. ;*****************************
  1303.  
  1304. ; make sure that default-dir is pointing to the right place
  1305.     (set @default-dest cando_dir)
  1306.  
  1307. ; some debug stuff
  1308.     (if testing
  1309.         (
  1310.             (debug (cat "cando_dir     = " quote cando_dir quote))
  1311.             (debug (cat "c_dir         = " quote c_dir quote))
  1312.             (debug (cat "libs_dir      = " quote libs_dir quote))
  1313.             (debug (cat "deck_tool     = " quote deck_tool quote))
  1314.             (debug (cat "bind_tool     = " quote bind_tool quote))
  1315.             (debug (cat "browse_tool   = " quote browse_tool quote))
  1316.             (debug (cat "killdeck_tool = " quote killdeck_tool quote))
  1317.             (debug (cat "cando_tool    = " quote cando_tool quote))
  1318.             (debug (cat "reader_tool   = " quote reader_tool quote))
  1319.             (debug (cat "stuff_dir     = " quote stuff_dir quote))
  1320.             (debug (cat "mostuff_dir   = " quote mostuff_dir quote))
  1321.             (debug (cat "decks_dir     = " quote decks_dir quote))
  1322.         )
  1323.     )
  1324.  
  1325. ; unmake those three assignments
  1326.     (makeassign "CanDoProgram_Master" (safe))
  1327.     (makeassign "CanDoExtras_Master" (safe))
  1328.     (makeassign "CanDoExamples_Master" (safe))
  1329.  
  1330. ; final message for our viewers
  1331.     ; well either way we want to say this
  1332.     (set end_text "Well thats it folks, have a fun time with CanDo v2.00.") ; altspace in name
  1333.     
  1334.     ; if the system has a library loaded then ask user to reset their machine
  1335.     (if (> resident_candolib 0)
  1336.         (set end_text
  1337.             (cat
  1338.                 "!! REBOOT YOUR MACHINE BEFORE USING CANDO !!"
  1339.                 newline
  1340.                 newline
  1341.                 "This machine has an old version of CanDo.library in memory.  "
  1342.                 "In order to flush the library you should reboot your machine."
  1343.                 newline
  1344.                 newline
  1345.                 end_text
  1346.             )
  1347.         )
  1348.     )
  1349.     
  1350.     ; now for the real exit
  1351.     (exit end_text)
  1352.