home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / comm / mail / thor / updatethor < prev   
Encoding:
Text File  |  1995-09-12  |  22.5 KB  |  983 lines

  1. ;*************************************************************************
  2. ;    Title:
  3. ;        UpdateThor
  4. ;*************************************************************************
  5. ;    Description:
  6. ;        Commodore Installer Script for the Thor 2.1 software
  7. ;*************************************************************************
  8. ;    Author:
  9. ;        Øyvind Ellefsen - versions for THOR upto 1.22
  10. ;       Petter Nilsen   - versions for 1.25 ->
  11. ;*************************************************************************
  12. ;    Still to do:
  13. ;        - THOR.macros might not be correct. Notify user?
  14. ;        - Handle previous installations with one of the env-vars/assigns
  15. ;          missing.
  16. ;        - Show .readme file
  17. ;       - Not delete catalogs/, only the needed dirs
  18. ;
  19. ;*************************************************************************
  20. ;
  21. ;******************************************************
  22. ;***** SET UP OUR VARIABLES AND OTHER SUCH STUFF ******
  23. ;******************************************************
  24.  
  25. ; some useful variables
  26.     (set true 1)
  27.     (set false 0)
  28.     (set yes true)
  29.     (set no false)
  30.     (set is_a_file 1)
  31.     (set is_a_dir 2)
  32.     (set quote "\"")
  33.     (set newline "\n")
  34.     (set nothing "")
  35.     (set V3_Update no)
  36.  
  37. ; set up our delete options
  38.     (delopts "AskUser" "OkNoDelete" "Force")
  39.  
  40. ; some useful procedures
  41.     ; change userlevel to expert
  42.     (procedure expert_level
  43.         (
  44.             (user 2)
  45.         )
  46.     )
  47.  
  48. ; reset userlevel back to default
  49.     (procedure default_level
  50.         (
  51.             (user default-level)
  52.         )
  53.     )
  54.  
  55. ; store off userlevel
  56.     (procedure save_default_level
  57.         (
  58.             (set default-level @user-level)
  59.         )
  60.     )
  61.  
  62. ; some overused strings
  63. (set omp (cat "One moment please..." newline))
  64.  
  65.  
  66. ; introduce ourselfs to the viewers
  67. (welcome "Welcome to the Thor installer.  This installer uses "
  68.     "the Commodore Amiga Installer.  All of our future Thor releases "
  69.     "will be using this installer and we would like to get any feedback "
  70.     "that might help to improve the installation procedure." newline
  71. )
  72.  
  73.  
  74. ; first reset the user level so that the novice can see whats going on
  75.     (save_default_level)
  76.     (expert_level)
  77.  
  78. ;Make assign to install from
  79.     (makeassign "Thor_Install" "" (safe))
  80.  
  81.  
  82. ;******************
  83. ;** Check Memory **
  84. ;******************
  85.  
  86. (run "Avail flush")
  87.  
  88. (set Running (run "Thor_Install:CheckForLib"))
  89.  
  90. (while (= Running 20)
  91.       ((Message newline "Thor seem to be running, you MUST close it NOW."    
  92.         newline "If you don't, the installation will fail!")
  93.     (run "Avail flush")
  94.     (set Running (run "Thor_Install:CheckForLib")))
  95. )
  96.  
  97. ;************************
  98. ;** Start Installation **
  99. ;************************
  100.  
  101. (if (exists "ENV:THOR/THORPath" (noreq))
  102. (
  103.     (if (set Thor_Dir (getenv "THOR/THORPath"))
  104.     (
  105.         (set Thor_Dir (substr Thor_Dir 0 (- (strlen Thor_Dir) 1)))
  106.         (set Thor_Dir (expandpath Thor_Dir))
  107.         (set V3_Update yes)
  108.         (makeassign "Thor" Thor_Dir (safe))
  109.     )
  110.     ; Else
  111.     (
  112.         (if (exists "Thor:libs/bbsread.library" (noreq))
  113.             ; Then
  114.             (    
  115.                 (set Thor_Dir (expandpath "Thor:"))
  116.             )
  117.             ; Else
  118.             (
  119.                 (set end_text "Please use the InstallThor script for a first-time installation.")
  120.                 (abort end_text))
  121.             )
  122.         )
  123.     )
  124. )
  125. ; Else
  126. (
  127.     (if (exists "Thor:libs/bbsread.library" (noreq))
  128.         ; Then
  129.         (    
  130.             (set Thor_Dir (expandpath "Thor:"))
  131.         )
  132.         ; Else
  133.         (
  134.             (set end_text "Please use the InstallThor script for a first-time installation.")
  135.             (abort end_text))
  136.         )
  137.     )
  138. )
  139.  
  140. (if (exists "ENV:THOR/THORPath" (noreq))
  141. (
  142.     (if (set BBSData_Dir (getenv "THOR/BBSDataPath"))
  143.     (
  144.         (set BBSData_Dir (substr BBSData_Dir 0 (- (strlen BBSData_Dir) 1)))
  145.         (set BBSData_Dir (expandpath BBSData_Dir))
  146.         (set V3_Update yes)
  147.         (makeassign "BBSData" BBSData_Dir (safe))
  148.     )
  149.     ; Else
  150.     (
  151.         (if (exists "BBSData:global.config" (noreq))
  152.             ; Then
  153.             (
  154.                 (set BBSData_Dir (expandpath "BBSData:"))
  155.             )
  156.             ; Else
  157.             (
  158.                 (set end_text "Please use the InstallThor script for a first-time installation.")
  159.                 (abort end_text))
  160.             )
  161.         )
  162.     )
  163. )
  164. ; Else
  165. (
  166.     (if (exists "BBSData:global.config" (noreq))
  167.         ; Then
  168.         (
  169.             (set BBSData_Dir (expandpath "BBSData:"))
  170.         )
  171.         ; Else
  172.         (
  173.             (set end_text "Please use the InstallThor script for a first-time installation.")
  174.             (abort end_text))
  175.         )
  176.     )
  177. )
  178.  
  179. ;**********************************************
  180. ;** Move ARexx scripts to another directory..**
  181. ;**********************************************
  182.  
  183. (if (askbool
  184.         (prompt
  185.             "The THOR ARexx script distribution has changed. "
  186.             "The old directory with ARexx scripts can be moved "
  187.             "to a Rexx_Old directory. \n\n"
  188.             "Press 'Yes' to continue with backup of old ARexx scripts.")
  189.         (help
  190.             "The installer has determined that you may already have a " 
  191.             "copy of Thor installed on your system. "
  192.             "ARexx files from a previous installation can be moved to "
  193.             "a safe directory."
  194.         )
  195.         (default 1)
  196.     )
  197.     ; Then
  198.     ( 
  199.         (makedir "THOR:Rexx_Old")
  200.         (copyfiles
  201.             (source "Thor:rexx")
  202.             (dest "THOR:rexx_old")
  203.             (all)
  204.         )
  205.         (working omp "Deleting old ARexx files...")
  206.         (run "Delete THOR:rexx/~(postinglists|#?.cfg|#?.adr) all")
  207.     )
  208. )
  209.  
  210.  
  211. ;**********************************************
  212. ;** Hostile deletion of old files here.. ******
  213. ;**********************************************
  214.  
  215. (if (= V3_Update no)
  216.     (
  217.         (if (askbool
  218.                 (prompt "Several old files left over from the the THOR 1.x" newline
  219.                     "releases are now obsolete and should be deleted." newline
  220.                     "This applies to the following directories: " newline
  221.                     "THOR:bin, THOR:s, THOR:libs and THOR:Scripts. " newline
  222.                     "If you have made any ARexx-scripts for Thor 1.xx,\n"
  223.                     "they might not work anymore. Check out the new\n"
  224.                     "ARexx-documentation and change your scripts accordingly.\n\n"
  225.                     "You might want to make a backup of personal files " newline
  226.                     "before proceeding." newline
  227.                     "Press 'Yes' to continue with deletion of obsolete files")
  228.                 (help
  229.                     "The installer has determined that you may already have a " 
  230.                     "copy of Thor installed on your system. "
  231.                     "Several files have changed and should be deleted since they "
  232.                     "will not function correctly with this release of THOR. "
  233.                 )
  234.                 (default 1)
  235.             )
  236.             ; Then
  237.             ( 
  238.                 (run "Delete THOR:ThorStat#?")
  239.                 (run "Delete THOR:THOR.history")
  240.                 (run "Delete THOR:libs/#?")
  241.                 (run "Delete THOR:bin/#?")
  242.                 (run "Delete THOR:s/#?")
  243.                 (run "Delete THOR:Scripts/#?")
  244.                 (run "Delete THOR:#?guide#?")
  245.                 (run "Delete THOR:THOR")
  246.                 (run "Rename THOR:THOR.info THOR:THOR.old.info")
  247.                 (run "Delete THOR:THOR.info")
  248.                 (run "Delete libs:bbsread.library")
  249.             )
  250.         )
  251.     )
  252. )
  253. ; Else
  254. (
  255.     (if (askbool
  256.             (prompt
  257.                 "Due to a problem with MultiUser filesystem, "
  258.                 "old files must be deleted before installing "
  259.                 "the new files. This is not needed if you do not "
  260.                 "run this filesystem on the partition THOR is "
  261.                 "installed on. Please take a backup of any personal ARexx "
  262.                 "scripts you might have made before selecting 'Yes' here.\n\n"
  263.                 "Press 'Yes' to continue with deletion of old files.")
  264.             (help
  265.                 "The installer has determined that you may already have a " 
  266.                 "copy of Thor installed on your system. "
  267.                 "Old files from a previous installation must be deleted "
  268.                 "if you are running the MultiUser filesystem on the "
  269.                 "partition THOR is installed on."
  270.             )
  271.             (default 1)
  272.         )
  273.         ; Then
  274.         ( 
  275.             (run "Delete THOR:ThorStat#?")
  276.             (run "Delete THOR:THOR.history")
  277.             (run "Delete THOR:libs/#?")
  278.             (run "Delete THOR:l/#?")
  279.             (run "Delete THOR:docs/#?")
  280.             (run "Delete THOR:bin/#?")
  281.             (run "Delete THOR:s/#?")
  282.             (run "Delete THOR:unix/#?")
  283.             (run "Delete THOR:rexx/~(postinglists) all")
  284.             (run "Delete THOR:Scripts/#?")
  285.             (run "Delete THOR:#?guide#?")
  286.             (run "Delete THOR:THOR")
  287.             (run "Rename THOR:THOR.info THOR:THOR.old.info")
  288.             (run "Delete THOR:ConfigTHOR")
  289.             (run "Rename THOR:ConfigTHOR.info THOR:ConfigTHOR.old.info")
  290.             (run "Delete THOR:ConnectTHOR")
  291.             (run "Rename THOR:ConnectTHOR.info THOR:ConnectTHOR.old.info")
  292.         )
  293.     )
  294. )
  295.  
  296. (run "Delete libs:bbsread.library")
  297. (run "Delete libs:bbsreadcnv2.library")
  298. (run "Delete libs:utgui.library")
  299. (run "Delete l:bbsread-handler")
  300. (run "Delete l:bbsreadrexx-handler")
  301. (run "Delete THOR:bin/initsoup")
  302. (run "Delete THOR:bin/configuucp")
  303.  
  304. ;******************
  305. ;** Locale stuff **
  306. ;******************
  307.  
  308. (default_level)
  309.  
  310. (set catalog
  311.    (askoptions
  312.       (prompt "What languages would you like to install ?\n"
  313.             "English is the built-in language.")
  314.       (help
  315.             "This will install locale files for other languages than English. "
  316.             "You can set the prefered language on Workbench and in Thor by"
  317.             "using the prefs:locale tool." newline @askchoice-help
  318.       )
  319.       (choices "Norsk" "Dansk" "Svenska" "Deutsch")
  320.       (default 0)
  321.    )
  322. )
  323.  
  324. ; Delete previous installed catalog files.
  325.  
  326. (if (= V3_Update yes)
  327.     (
  328.         (run "delete thor:catalogs all")
  329.     )
  330. )
  331.  
  332. (makedir "thor:catalogs")
  333.  
  334. (if (bitand 1 catalog)
  335.     (copyfiles
  336.         (source "Thor_Install:catalogs/norsk")
  337.         (dest "thor:catalogs/norsk")
  338.         (all)
  339.     )
  340. )
  341.  
  342. (if (bitand 2 catalog)
  343.     (copyfiles
  344.         (source "Thor_Install:catalogs/dansk")
  345.         (dest "thor:catalogs/dansk")
  346.         (all)
  347.     )
  348. )
  349.  
  350. (if (bitand 4 catalog)
  351.     (copyfiles
  352.         (source "Thor_Install:catalogs/svenska")
  353.         (dest "thor:catalogs/svenska")
  354.         (all)
  355.     )
  356. )
  357.  
  358. (if (bitand 8 catalog)
  359.     (copyfiles
  360.         (source "Thor_Install:catalogs/deutsch")
  361.         (dest "thor:catalogs/deutsch")
  362.         (all)
  363.     )
  364. )
  365.  
  366. ;***********************************
  367. ;***** GET FIRST DISK IN HERE ******
  368. ;***********************************
  369.  
  370. ; first copy over the stuff
  371. (working omp "Decompressing and copying Thor files.")
  372.  
  373. (run "Thor_Install:lhex -a -f -w=THOR: x Thor_Install:thor.lha" )
  374.  
  375. ;*********************
  376. ;** reqtools.libary **
  377. ;*********************
  378.  
  379. (copylib
  380.     (prompt "Copying ReqTools library")
  381.     (help "This will copy the ReqTools library." newline @copylib-help)
  382.     (source "Thor_Install:reqtools.library")
  383.     (dest "libs:")
  384. )
  385.  
  386. ;************************
  387. ;**  Copy the keyfile  **
  388. ;************************
  389. (if (exists "Thor_Install:THOR.key" (noreq))
  390. ; Then
  391.     (copyfiles
  392.         (source "Thor_Install:THOR.key")
  393.         (dest "THOR:")
  394.     )
  395. )
  396.         
  397. ;**********************************************
  398. ;* Convert the database to the new 2.0 format *
  399. ;**********************************************
  400.  
  401. (run "thor:bin/InitCharsets")
  402.  
  403. (default_level)
  404.  
  405. (if (= V3_Update no)
  406.     (
  407.         (message newline "The installer will now convert and upgrade the "
  408.         newline "message database to the new 2.0 format."
  409.         newline "This might take some time, so please be patient.")
  410.         (run "Avail flush")
  411.         (set Running (run "Thor:bin/basemanager convert >con:0/0/640/200/Converting/AUTO/CLOSE/WAIT"))
  412.         (if (<> 0 Running)
  413.         (
  414.             ((set end_text "Conversion of your old database failed." newline "Please take notice of the error message shown.")
  415.             (abort end_text)))
  416.         )
  417.     )
  418.     (set failed (run "thor:bin/initarc"))
  419.     (if (<> 0 failed)
  420.         (
  421.             ((set end_text "Installation failed.\nIf you received any error message,\nplease write this down and send us\na mail about the problem.")
  422.             (abort end_text))
  423.         )
  424.     )
  425. )
  426.  
  427. (if (exists "Thor_Install:bin/parseqwk" (noreq))
  428.     ; Then
  429.     (
  430.         (set bbspack 1)
  431.     )
  432.     ; Else
  433.     (
  434.         (if    (askbool
  435.                 (prompt newline 
  436.                                 "Would you like to install the modules for "
  437.                                 "QWK, Fido, Hippo, Bluewave, ABBS/MBBS and Omen "
  438.                                 "to be used with Bulletin Board Systems?\n\n "
  439.                                 "(you will be able to select which modules to "
  440.                                 "install later in this installtions procedure).")
  441.                 (help newline
  442.                                 "This section of the installation is dedicated "
  443.                                 "to installation of some common formats "
  444.                                 "required if you want to use THOR with BBSes.\n\n"
  445.                                 "Select YES if you want to continue with this "
  446.                                 "installation, otherwise NO")
  447.                 (default 1)
  448.             )
  449.             ; Then 
  450.             (
  451.                 (set bbsfile 
  452.                     (askfile
  453.                         (prompt 
  454.                                 "Please select the BBS archive for THOR 2.1. "
  455.                                 "(Usually named 'thor21_bbs.lha').\n\n"
  456.                                 "It will be unarchived automatically.")
  457.                         (help @askfile-help)
  458.                         (default "sys:")
  459.                     )
  460.                 )
  461.                 ; verify that the file exists
  462.                 (if (exists bbsfile)
  463.                     (
  464.                         (set runfile (cat runfile "Thor_Install:lhex -a -f -w=Thor_Install: x " quote bbsfile quote))
  465.                         (set failed (run runfile))
  466.                         (if (<> 0 failed)
  467.                         (
  468.                             ((set failed_text "Unarchiving of the BBS archive failed.")
  469.                             (message end_text)))
  470.                         )
  471.                         ; Else
  472.                         (
  473.                             (set bbspack 1)
  474.                         )
  475.                     )
  476.                 )
  477.             )
  478.         )
  479.     )
  480. )
  481.  
  482. (if (exists "Thor_Install:bin/gettcp" (noreq))
  483.     ; Then
  484.     (
  485.         (set inetpack 1)
  486.     )
  487.     ; Else
  488.     (
  489.         (if    (askbool
  490.                 (prompt newline 
  491.                                 "Would you like to install the modules for "
  492.                                 "UUCP, SOUP, NNTP, SMTP and POP3 "
  493.                                 "to be used with Internet?\n\n"
  494.                                 "(you will be able to select which modules to "
  495.                                 "install later in this installtions procedure).")
  496.                 (help newline
  497.                                 "This section of the installation is dedicated "
  498.                                 "to installation of some common formats "
  499.                                 "required if you want to use THOR with Internet.\n\n"
  500.                                 "Select YES if you want to continue with this "
  501.                                 "installation, otherwise NO")
  502.                 (default 1)
  503.             )
  504.             ; Then 
  505.             (
  506.                 (set inetfile 
  507.                         (askfile
  508.                             (prompt 
  509.                                     "Please select the Internet archive for THOR 2.1\n"
  510.                                     "(Usually named 'thor21_inet.lha').\n\n"
  511.                                     "It will be unarchived automatically."
  512.                             (help @askfile-help)
  513.                             (default "sys:")
  514.                         )
  515.                     )
  516.                 )
  517.                 ; verify that the file exists
  518.                 (if (exists inetfile)
  519.                     (
  520.                         (set runfile2 (cat runfile2 "Thor_Install:lhex -a -f -w=Thor_Install: x " quote inetfile quote))
  521.                         (set failed (run runfile2))
  522.                         (if (<> 0 failed)
  523.                         (
  524.                             ((set failed_text "Unarchiving of the Internet archive failed.")
  525.                             (message end_text)))
  526.                         )
  527.                         ; Else
  528.                         (
  529.                             (set inetpack 1)
  530.                         )
  531.                     )
  532.                 )
  533.             )
  534.         )
  535.     )
  536. )
  537.  
  538. (if (= bbspack 1)
  539.     (
  540.         (set bbs_type
  541.            (askoptions
  542.               (prompt
  543.                         "Please select which BBS modules "
  544.                         "you want to install.")
  545.               (help
  546.                     "What system type for BBS usage that should be "
  547.                     "installed can be selected here."
  548.               )
  549.  
  550.               (choices
  551.                     "QWK        - Normal QWK"
  552.                     "Fido       - Normal Fidonet"
  553.                     "BlueWave   - Normal BlueWave"
  554.                     "ABBS       - Normal ABBS"
  555.                     "ABBS_QWK   - ABBS with QWK support"
  556.                     "MBBS       - Normal MBBS"
  557.                     "Hippo/BBBS - Normal Hippo V2 and Hippo on BBBS"
  558.                     "Omen       - Normal Omen"
  559.               )
  560.               (default 512)
  561.            )
  562.         )
  563.         (copyfiles
  564.             (source "Thor_Install:scripts")
  565.             (dest "THOR:scripts")
  566.             (pattern "#?BBS#?")
  567.         )
  568.         (if (bitand 1 bbs_type)
  569.             (
  570.                 (copyfiles
  571.                     (source "Thor_Install:bin")
  572.                     (dest "THOR:bin")
  573.                     (pattern "#?QWK")
  574.                 )
  575.                 (copyfiles
  576.                     (source "Thor_Install:s/cfgqwk")
  577.                     (dest "THOR:s")
  578.                 )
  579.                 (execute "thor:s/cfgqwk")
  580.             )
  581.         )
  582.         (if (bitand 2 bbs_type)
  583.             (
  584.                 (copyfiles
  585.                     (source "Thor_Install:bin")
  586.                     (dest "THOR:bin")
  587.                     (pattern "#?FIDO")
  588.                 )
  589.                 (copyfiles
  590.                     (source "Thor_Install:s/cfgfido")
  591.                     (dest "THOR:s")
  592.                 )
  593.                 (execute "thor:s/cfgfido")
  594.             )
  595.         )
  596.         (if (bitand 4 bbs_type)
  597.             (
  598.                 (copyfiles
  599.                     (source "Thor_Install:bin")
  600.                     (dest "THOR:bin")
  601.                     (pattern "#?BLUE")
  602.                 )
  603.                 (copyfiles
  604.                     (source "Thor_Install:s/cfgblue")
  605.                     (dest "THOR:s")
  606.                 )
  607.                 (execute "thor:s/cfgblue")
  608.             )
  609.         )
  610.         (if (bitand 8 bbs_type)
  611.             (
  612.                 (copyfiles
  613.                     (source "Thor_Install:bin/packambbs")
  614.                     (dest "THOR:bin")
  615.                 )
  616.                 (copyfiles
  617.                     (source "Thor_Install:bin/parsemsg")
  618.                     (dest "THOR:bin")
  619.                 )
  620.                 (copyfiles
  621.                     (source "Thor_Install:s/cfgabbs")
  622.                     (dest "THOR:s")
  623.                 )
  624.                 (execute "thor:s/cfgabbs")
  625.             )
  626.         )
  627.         (if (bitand 16 bbs_type)
  628.             (
  629.                 (copyfiles
  630.                     (source "Thor_Install:bin")
  631.                     (dest "THOR:bin")
  632.                     (pattern "#?QWK")
  633.                 )
  634.                 (copyfiles
  635.                     (source "Thor_Install:s/cfgabbs_qwk")
  636.                     (dest "THOR:s")
  637.                 )
  638.                 (execute "thor:s/cfgabbs_qwk")
  639.             )
  640.         )
  641.         (if (bitand 32 bbs_type)
  642.             (
  643.                 (copyfiles
  644.                     (source "Thor_Install:bin/packambbs")
  645.                     (dest "THOR:bin")
  646.                 )
  647.                 (copyfiles
  648.                     (source "Thor_Install:bin/parsemsg")
  649.                     (dest "THOR:bin")
  650.                 )
  651.                 (copyfiles
  652.                     (source "Thor_Install:s/cfgmbbs")
  653.                     (dest "THOR:s")
  654.                 )
  655.                 (execute "thor:s/cfgmbbs")
  656.             )
  657.         )
  658.         (if (bitand 64 bbs_type)
  659.             (
  660.                 (copyfiles
  661.                     (source "Thor_Install:bin")
  662.                     (dest "THOR:bin")
  663.                     (pattern "#?hippo")
  664.                 )
  665.                 (copyfiles
  666.                     (source "Thor_Install:s/cfghippo")
  667.                     (dest "THOR:s")
  668.                 )
  669.                 (copyfiles
  670.                     (source "Thor_Install:s/cfgbbbs")
  671.                     (dest "THOR:s")
  672.                 )
  673.                 (execute "thor:s/cfghippo")
  674.                 (execute "thor:s/cfgbbbs")
  675.             )
  676.         )
  677.         (if (bitand 128 bbs_type)
  678.             (
  679.                 (copyfiles
  680.                     (source "Thor_Install:bin")
  681.                     (dest "THOR:bin")
  682.                     (pattern "#?omen")
  683.                 )
  684.                 (copyfiles
  685.                     (source "Thor_Install:s/cfgomen")
  686.                     (dest "THOR:s")
  687.                 )
  688.                 (execute "thor:s/cfgomen")
  689.             )
  690.         )
  691.     )
  692. )
  693.  
  694. (if (= inetpack 1)
  695.     (
  696.         (set bbs_type
  697.            (askoptions
  698.               (prompt
  699.                         "Please select which Internet modules "
  700.                         "you want to install.")
  701.               (help
  702.                     "What system type for Internet usage that should be "
  703.                     "installed can be selected here."
  704.               )
  705.  
  706.               (choices
  707.                         "TCP/TCP_ONLINE - POP3, SMTP and NNTP"
  708.                         "SOUP/UQWK_SOUP - Normal SOUP and SOUP w/uqwk"
  709.                         "UUCP           - Normal UUCP"
  710.               )
  711.               (default 7)
  712.            )
  713.         )
  714.  
  715.         (copyfiles
  716.             (source "Thor_Install:libs/utnet.library")
  717.             (dest "THOR:libs")
  718.         )
  719.  
  720.         (copyfiles
  721.             (source "Thor_Install:bin/InitRFC")
  722.             (dest "THOR:bin")
  723.         )
  724.  
  725.         (copyfiles
  726.             (source "Thor_Install:scripts")
  727.             (dest "THOR:scripts")
  728.             (pattern "#?UQWK#?")
  729.         )
  730.  
  731.         (if (bitand 1 bbs_type)
  732.             (
  733.                 (copyfiles
  734.                     (source "Thor_Install:bin")
  735.                     (dest "THOR:bin")
  736.                     (pattern "#?TCP")
  737.                 )
  738.                 (copyfiles
  739.                     (source "Thor_Install:")
  740.                     (dest "THOR:")
  741.                     (pattern "ConnectTHOR#?")
  742.                 )
  743.                 (copyfiles
  744.                     (source "Thor_Install:s/cfgtcp")
  745.                     (dest "THOR:s")
  746.                 )
  747.                 (copyfiles
  748.                     (source "Thor_Install:s/cfgtcp_online")
  749.                     (dest "THOR:s")
  750.                 )
  751.                 (execute "thor:s/cfgtcp")
  752.                 (execute "thor:s/cfgtcp_online")
  753.             )
  754.         )
  755.         (if (bitand 2 bbs_type)
  756.             (
  757.                 (copyfiles
  758.                     (source "Thor_Install:bin")
  759.                     (dest "THOR:bin")
  760.                     (pattern "#?SOUP")
  761.                 )
  762.                 (copyfiles
  763.                     (source "Thor_Install:s")
  764.                     (dest "THOR:s")
  765.                     (pattern "#?soup")
  766.                 )
  767.                 (makedir "THOR:unix")
  768.                 (copyfiles
  769.                     (source "Thor_Install:unix")
  770.                     (dest "THOR:unix")
  771.                     (all)
  772.                 )
  773.                 (execute "thor:s/cfguqwk_soup")
  774.                 (execute "thor:s/cfgsoup")
  775.             )
  776.         )
  777.         (if (bitand 4 bbs_type)
  778.             (
  779.                 (copyfiles
  780.                     (source "Thor_Install:bin")
  781.                     (dest "THOR:bin")
  782.                     (pattern "#?UUCP")
  783.                 )
  784.                 (copyfiles
  785.                     (source "Thor_Install:s/cfguucp")
  786.                     (dest "THOR:s")
  787.                 )
  788.                 (execute "thor:s/cfguucp")
  789.             )
  790.         )
  791.     )
  792. )
  793.  
  794.  
  795. ;*********************************************
  796. ;** Copy configfiles from BBSDATA: to THOR: **
  797. ;*********************************************
  798.  
  799. (if (= V3_Update no)
  800.     (
  801.         (run "copy bbsdata:visual.config thor:visual.config")
  802.         (run "copy bbsdata:global.config thor:global.config")
  803.         (run "copy bbsdata:fse.config thor:fse.config")
  804.     )
  805. )
  806.  
  807. ;***********
  808. ;** Fonts **
  809. ;***********
  810.     
  811. (if (= V3_Update no)
  812.     (
  813.         (copyfiles
  814.             (prompt "Choose the fonts to install with Thor" newline "These are not required for Thor to run" )
  815.             (help "This will copy the default font files for Thor." newline @copyfiles-help)
  816.             (source "Thor_Install:Fonts")
  817.             (dest "Fonts:")
  818.             (fonts)
  819.             (choices "Grn" "Thin609" "Thin611" "Thin711")
  820.             (confirm)
  821.         )
  822.     )
  823. )
  824.  
  825. ;*****************************
  826. ;****** Install icons ********
  827. ;*****************************
  828.  
  829. (set icon
  830.     (askchoice
  831.         (prompt
  832.             "Please select what icon-set to install with THOR.\n")
  833.         (help
  834.             "If you use MagicWB on your Workbench, "
  835.             "you might want to install the special MagicWB icons.\n\n"
  836.             "Likewise, if you use NewIcons on your Workbench, "
  837.             "you might want to install the special NewIcons icons.")
  838.         (choices "Normal icons" "MagicWB icons" "NewIcons icons")
  839.         (default 0)
  840.     )
  841. )
  842.  
  843. (if (= icon 1)
  844.     (
  845.         (copyfiles
  846.             (prompt "Copying MagicWB icon files")
  847.             (source "Thor_Install:MWBIcons")
  848.             (dest "Thor:")
  849.             (pattern "~(THOR.guide.info)")
  850.             (nogauge)
  851.         )
  852.         (copyfiles
  853.             (prompt "Copying MagicWB icon files")
  854.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  855.             (dest "Thor:Docs")
  856.             (newname "THOR.guide.info")
  857.             (nogauge)
  858.         )
  859.         (copyfiles
  860.             (prompt "Copying MagicWB icon files")
  861.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  862.             (dest "Thor:Docs")
  863.             (newname "ConfigTHOR.guide.info")
  864.             (nogauge)
  865.         )
  866.         (copyfiles
  867.             (prompt "Copying MagicWB icon files")
  868.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  869.             (dest "Thor:Docs")
  870.             (newname "ARexx.guide.info")
  871.             (nogauge)
  872.         )
  873.         (copyfiles
  874.             (prompt "Copying MagicWB icon files")
  875.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  876.             (dest "Thor:Docs")
  877.             (newname "BBSReadRexx.guide.info")
  878.             (nogauge)
  879.         )
  880.         (copyfiles
  881.             (prompt "Copying MagicWB icon files")
  882.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  883.             (dest "Thor:Docs")
  884.             (newname "THOR_Rexx.guide.info")
  885.             (nogauge)
  886.         )
  887.         (copyfiles
  888.             (prompt "Copying MagicWB icon files")
  889.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  890.             (dest "Thor:Docs")
  891.             (newname "Installation.guide.info")
  892.             (nogauge)
  893.         )
  894.     )
  895. )
  896. (if (= icon 2)
  897.     (
  898.         (copyfiles
  899.             (prompt "Copying NewIcons icon files")
  900.             (source "Thor_Install:NewIcons")
  901.             (dest "Thor:")
  902.             (pattern "~(THOR.guide.info)")
  903.             (nogauge)
  904.         )
  905.         (copyfiles
  906.             (prompt "Copying NewIcons icon files")
  907.             (source "Thor_Install:NewIcons/THOR.guide.info")
  908.             (dest "Thor:Docs")
  909.             (newname "THOR.guide.info")
  910.             (nogauge)
  911.         )
  912.         (copyfiles
  913.             (prompt "Copying NewIcons icon files")
  914.             (source "Thor_Install:NewIcons/THOR.guide.info")
  915.             (dest "Thor:Docs")
  916.             (newname "ConfigTHOR.guide.info")
  917.             (nogauge)
  918.         )
  919.         (copyfiles
  920.             (prompt "Copying NewIcons icon files")
  921.             (source "Thor_Install:NewIcons/THOR.guide.info")
  922.             (dest "Thor:Docs")
  923.             (newname "ARexx.guide.info")
  924.             (nogauge)
  925.         )
  926.         (copyfiles
  927.             (prompt "Copying NewIcons icon files")
  928.             (source "Thor_Install:NewIcons/THOR.guide.info")
  929.             (dest "Thor:Docs")
  930.             (newname "BBSReadRexx.guide.info")
  931.             (nogauge)
  932.         )
  933.         (copyfiles
  934.             (prompt "Copying NewIcons icon files")
  935.             (source "Thor_Install:NewIcons/THOR.guide.info")
  936.             (dest "Thor:Docs")
  937.             (newname "THOR_Rexx.guide.info")
  938.             (nogauge)
  939.         )
  940.         (copyfiles
  941.             (prompt "Copying NewIcons icon files")
  942.             (source "Thor_Install:NewIcons/THOR.guide.info")
  943.             (dest "Thor:Docs")
  944.             (newname "Installation.guide.info")
  945.             (nogauge)
  946.         )
  947.     )
  948. )
  949.  
  950. (if (exists "env:sys/def_drawer.info" (noreq))
  951.     (copyfiles
  952.         (prompt "Copying default drawer icon")
  953.         (help "This will copy the default drawer icon." newline @copyfiles-help)
  954.         (source "env:sys/def_drawer.info")
  955.         (dest "Thor:")
  956.         (newname "Docs.info")
  957.         (infos)
  958.     )
  959. )
  960.  
  961. ;*****************************
  962. ;***** WE ARE ALMOST DONE ****
  963. ;*****************************
  964.  
  965. ; make sure that default-dir is pointing to the right place
  966. (set @default-dest Thor_Dir)
  967.     
  968. ; final message for our viewers
  969.     (set end_text (cat "Hope you like THOR! Don't hesitate to "
  970.                     "send us comments, bugreports and suggestions."))
  971.  
  972. (makeassign "Thor_Install")     
  973.  
  974. (if (= V3_Update yes)
  975.     (
  976.         (makeassign "BBSData")     
  977.     )
  978. )
  979.  
  980. ; now for the exit
  981.     (exit end_text)
  982.  
  983.