home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #3 / amigamamagazinepolishissue1998.iso / bazy / megabook / install < prev    next >
Text File  |  1996-07-06  |  10KB  |  444 lines

  1. ; $VER: MegaBook v3 Installer, Version 3.00 (28.6.96)
  2.  
  3. ;; I really hate writing installers. Its worse then writing docs!
  4. ;; The docs and the installer probs take longer then the program :) Nah,
  5. ;; i've been working on MegaBook 3 for about a month now and this aint gonna
  6. ;; take that long ... 
  7.  
  8. ;; Hey .. get some kewl mods and HippoPlayer and make a huge play list ...
  9. ;; great while ya working (if u have the memory that is :)..) (and don't
  10. ;; forget to whack the volume right up on the stereo too)
  11.  
  12. ;; Anyway, enuff of the silly comments ... here's the installer :) bugger..
  13. ;; i really hate all these bloody brackets :( ... should of custom written
  14. ;; one in C .. never mind.
  15.  
  16. ;; BTW: the comments are mainly for my benefit as i keep forgetting what
  17. ;; each installer command does :) But they'll help u too if u decide to use
  18. ;; bits of this script :)
  19.  
  20. ;; Misc Messages
  21. (set WhereTo "Please select directory to install MegaBook to\n(a directory will be created)")
  22.  
  23. (set CopyExe "Copying MegaBook")
  24. (set CopyDocs "Copying Documentation")
  25. (set CopyExamp "Copying Examples")
  26. (set CopyExtras "Copying Extras")
  27. (set CopyStore "Copying Storage")
  28. (set CopyRexx "Copying ARexx Scripts")
  29. (set CopySamp "Copying Samples")
  30.  
  31. (set Modem "\n\n\n\n\nDo you have a modem ?")
  32. (set EMail "\n\n\n\n\nDo you have an EMail address ?")
  33. (set Fax "\n\n\n\n\nDo you use Fax software ?")
  34.  
  35. (set TermProg "Please select your terminal software")
  36. (set TermProg "Please select your mailer software")
  37.  
  38. (set StartP "\n\nThe following command needs to be\nadded to your user startup\n\nASSIGN MegaBook3: \"")
  39.  
  40. ;; Help messages
  41. (set WhereToHelp "Select the directory you wish to install\nMegaBook into and select Ok\n\nA directory named MegaBook 3 will be created")
  42.  
  43. (set ModemHelp "MegaBook allows you to dial through a\nmodem to call BBS's. If you have on,\nselect Yes and you'll be ask to select\nyour terminal software. The installer\nwill then copy a ARexx script to enable\nyou to use your modem with MegaBook")
  44.  
  45. (set EMailHelp "MegaBook allows you to send EMails\nif you have an internet account\nyou'll be able to send EMails direct\nfrom MegaBook.")
  46.  
  47. (set FaxHelp "If your modem supports Fax, you can\nsend faxes from within MegaBook")
  48.  
  49. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  50. ;; Procedures                                                             ;;
  51. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  52. (procedure
  53.     makedirstruct
  54.     ;;
  55.     ;; Procedure to make the directory structure
  56.     ;; 
  57.     ;; No arguments, no locals. Uses @default-dest
  58.     ;;
  59.     ;; Returns a load of variables that i cant be arsed to repeat here :)
  60.     
  61.     ;; Set the main directory name.
  62.     (set @default-dest (tackon @default-dest "MegaBook 3"))
  63.     (makedir @default-dest
  64.                 (infos)
  65.     )
  66.     
  67.     (makedir (tackon @default-dest "Docs")
  68.                 (infos)
  69.     )
  70.     (set DocsDest (tackon @default-dest "Docs"))
  71.     
  72.     (makedir (tackon @default-dest "Examples")
  73.                 (infos)
  74.     )
  75.     (set ExampDest (tackon @default-dest "Examples"))
  76.     
  77.     (makedir (tackon @default-dest "Extras")
  78.                 (infos)
  79.     )
  80.     (set XtrasDest (tackon @default-dest "Extras"))
  81.     
  82.     (makedir (tackon @default-dest "Storage")
  83.                 (infos)
  84.     )
  85.     (makedir (tackon @default-dest "Storage/SendEMail")
  86.                 (infos)
  87.     )
  88.     (makedir (tackon @default-dest "Storage/SendFax")
  89.                 (infos)
  90.     )
  91.     (makedir (tackon @default-dest "Storage/DialData")
  92.                 (infos)
  93.     )
  94.     (set StoreDest (tackon @default-dest "Storage"))
  95.     (set EMailDest (tackon @default-dest "Storage/SendEMail"))
  96.     (set FaxDest (tackon @default-dest "Storage/SendFax"))
  97.     (set DataDest (tackon @default-dest "Storage/DialData"))
  98.     
  99.     (makedir (tackon @default-dest "Rexx")
  100.                 (infos)
  101.     )
  102.     (set RexxDest (tackon @default-dest "Rexx"))
  103.     
  104.     (makedir (tackon @default-dest "Samples")
  105.                 (infos)
  106.     )
  107.     (set SampDest (tackon @default-dest "Samples"))
  108. )
  109.  
  110. (procedure
  111.     installexes
  112.     ;;
  113.     ;; Procedure to copy the main executables
  114.     ;;
  115.     ;; No args, no locals, no returns.
  116.     ;;
  117.     
  118.     (copyfiles
  119.         (prompt CopyExe)
  120.         (help @copyfiles-help)
  121.         (choices "MegaBook" "MegaBook-020")
  122.         (source "")
  123.         (dest @default-dest)
  124.         (confirm)
  125.         (infos)
  126.     )
  127. )
  128. (procedure
  129.     installdocs
  130.     ;;
  131.     ;; Procedure to copy the docs
  132.     ;;
  133.     ;; No args, no locals, no returns.
  134.     ;;
  135.     
  136.     (copyfiles
  137.         (prompt CopyDocs)
  138.         (help @copyfiles-help)
  139.         (choices "MegaBook.guide" "RegForm.txt")
  140.         (source "Docs/")
  141.         (dest DocsDest)
  142.         (confirm)
  143.         (infos)
  144.     )
  145. )
  146. (procedure
  147.     installexamp
  148.     ;;
  149.     ;; Procedure to copy the examples
  150.     ;;
  151.     ;; No args, no locals, no returns.
  152.     ;;
  153.     
  154.     (copyfiles
  155.         (prompt CopyExamp)
  156.         (help @copyfiles-help)
  157.         (source "Examples/")
  158.         (all)
  159.         (dest ExampDest)
  160.         (confirm)
  161.         (infos)
  162.     )
  163. )
  164. (procedure
  165.     installrexx
  166.     ;;
  167.     ;; Procedure to copy the arexx examples
  168.     ;;
  169.     ;; No args, no locals, no returns.
  170.     ;;
  171.     
  172.     (copyfiles
  173.         (prompt CopyRexx)
  174.         (help @copyfiles-help)
  175.         (source "Rexx/")
  176.         (all)
  177.         (dest RexxDest)
  178.         (confirm)
  179.         (infos)
  180.     )
  181. )
  182. (procedure
  183.     installsamp
  184.     ;;
  185.     ;; Procedure to copy the samples
  186.     ;;
  187.     ;; No args, no locals, no returns.
  188.     ;;
  189.     
  190.     (copyfiles
  191.         (prompt CopySamp)
  192.         (help @copyfiles-help)
  193.         (source "Samples/")
  194.         (all)
  195.         (dest SampDest)
  196.         (infos)
  197.     )
  198. )
  199. (procedure
  200.     installstore
  201.     ;;
  202.     ;; Procedure to copy the storage dir
  203.     ;;
  204.     ;; No args, no locals, no returns.
  205.     ;;
  206.     
  207.     (copyfiles
  208.         (prompt CopyStore)
  209.         (help @copyfiles-help)
  210.         (source "Storage/DialData")
  211.         (all)
  212.         (dest DataDest)
  213.         (infos)
  214.     )
  215.     (copyfiles
  216.         (prompt CopyStore)
  217.         (help @copyfiles-help)
  218.         (source "Storage/SendEMail")
  219.         (all)
  220.         (dest EMailDest)
  221.         (infos)
  222.     )
  223.     (copyfiles
  224.         (prompt CopyStore)
  225.         (help @copyfiles-help)
  226.         (source "Storage/SendFax")
  227.         (all)
  228.         (dest FaxDest)
  229.         (infos)
  230.     )
  231. )
  232. (procedure
  233.     installxtras
  234.     ;;
  235.     ;; The Extras Installer Procedure
  236.     ;; This is a tad complex and i can't be arsed to comment it any more.
  237.     ;;
  238.     ;; Look, it's 1:10am now and i've been working on bits of megabook since
  239.     ;; about 3:30pm and i'm KNACKERED.
  240.     ;; Hope all thsi work is worth my bother, if no one uses this ... hmm
  241.     ;; oh well, such is life.
  242.     ;; yup, its another stupid comment and chariots of fire is blurting out
  243.     ;; the stereo for some unknown reason ... ahh, its in Hippo's play
  244.     ;; list :) hmm... whats next ... yup ... kewl ravey one from the
  245.     ;; shun ep.
  246.     ;; shit ... best right the procedure instead of this stupid comment :)
  247.     ;; here goes...
  248.     ;;
  249.     ;; wait for it.... ahh, i feel it coming ... nope, not yet..
  250.     ;; NOW!
  251.     ;; oh, mebbe not ...yesh :) kewl ravey track :)
  252.     ;; hmmm, whaddya mean shut up ? oh, ok :)
  253.     
  254.     (set gotmodem 
  255.         (askbool
  256.             (prompt Modem)
  257.             (default 1)
  258.             (help ModemHelp)
  259.         )
  260.     )
  261.     
  262.     (if (= gotmodem 1)
  263.         (
  264.             (set termtype (askchoice
  265.                               (prompt TermProg)
  266.                               (default 0)
  267.                               (choices "NComm"
  268.                                        "Term"
  269.                                        "ZeeTerm"
  270.                                        "Termite")
  271.                               (help @askchoice-help)
  272.                           )
  273.             )
  274.             (select termtype
  275.                 (
  276.                     (copyfiles
  277.                         (prompt CopyExtras)
  278.                         (source "Storage/DialData/NComm.mbrx")
  279.                         (newname "DialData.mbrx")
  280.                         (dest XtrasDest)
  281.                         (infos)
  282.                         (help @copyfiles-help)
  283.                     )
  284.                 )
  285.                 (
  286.                     (copyfiles
  287.                         (prompt CopyExtras)
  288.                         (source "Storage/DialData/Term.mbrx")
  289.                         (newname "DialData.mbrx")
  290.                         (dest XtrasDest)
  291.                         (infos)
  292.                         (help @copyfiles-help)
  293.                     )
  294.                 )
  295.                 (
  296.                     (copyfiles
  297.                         (prompt CopyExtras)
  298.                         (source "Storage/DialData/ZeeTerm.mbrx")
  299.                         (newname "DialData.mbrx")
  300.                         (dest XtrasDest)
  301.                         (infos)
  302.                         (help @copyfiles-help)
  303.                     )
  304.                 )
  305.                 (
  306.                     (copyfiles
  307.                         (prompt CopyExtras)
  308.                         (source "Storage/DialData/Termite.mbrx")
  309.                         (newname "DialData.mbrx")
  310.                         (dest XtrasDest)
  311.                         (infos)
  312.                         (help @copyfiles-help)
  313.                     )
  314.                 )
  315.             )
  316.             
  317.         )
  318.     )
  319.     (set gotemail
  320.         (askbool
  321.             (prompt EMail)
  322.             (default 1)
  323.             (help FaxHelp)
  324.         )
  325.     )
  326.     ;; hey, i'm annoyed now! i keep typing {'s instead of ('s and }'s instead
  327.     ;; of )'s ... oh well, i'm too used to C :)
  328.     (if (= gotemail 1)
  329.         (
  330.             (set mailer (askchoice
  331.                             (prompt MailProg)
  332.                               (default 0)
  333.                               (choices "Spot"
  334.                                        "Yam")
  335.                               (help @askchoice-help)
  336.                         )
  337.             )
  338.             
  339.             (select mailer
  340.                 (
  341.                     (copyfiles
  342.                         (prompt CopyExtras)
  343.                         (source "Storage/SendEMail/Spot.mbrx")
  344.                         (newname "SendEMail.mbrx")
  345.                         (dest XtrasDest)
  346.                         (infos)
  347.                         (help @copyfiles-help)
  348.                     )
  349.                 )
  350.                 (
  351.                     (copyfiles
  352.                         (prompt CopyExtras)
  353.                         (source "Storage/SendEMail/Yam.mbrx")
  354.                         (newname "SendEMail.mbrx")
  355.                         (dest XtrasDest)
  356.                         (infos)
  357.                         (help @copyfiles-help)
  358.                     )
  359.                 )
  360.             )
  361.         )
  362.     )
  363. )
  364. (procedure
  365.     faxmsg
  366.     
  367.     (message "Unfortunately, there are no fax scripts in\nthis release of MegaBook. This is because\nwe couldn't find any ARexx docs for\nGPFax and other fax programs. If you write\na good fax script, we would like to see it\nSee docs for more info")
  368. )
  369.  
  370. (procedure
  371.     dolibs
  372.     ;;
  373.     ;; install the libs
  374.     ;;
  375.     (copylib
  376.         (prompt "Installing needed libraries")
  377.         (help @copylib-help)
  378.         (source "libs/reqtools.library")
  379.         (dest "LIBS:")
  380.         (confirm)
  381.     )
  382. )
  383.  
  384. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  385. ;; Start of the installer                                                 ;;
  386. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  387.  
  388. (set hello "\nWelcome to\n\nMegaBook Version 3.0\n By Tom Bampton\n\n© 1996 Eden Software\n\nMegaBook Install Script Version 3.0\n\n\nThe ULTIMATE Amiga Address Book")
  389.  
  390. (message hello)
  391. (welcome)
  392.  
  393. ;; Get directory to install to
  394. (set @default-dest (askdir
  395.                         (prompt WhereTo)
  396.                         (help WhereToHelp)
  397.                         (default @default-dest)
  398.                     )
  399. )
  400.  
  401. ;; Make the directory structure, we'll have some destination vars at the end
  402. ;; of this proccy too
  403. (makedirstruct)
  404. (complete 10)
  405.  
  406. ;; Install the main executables
  407. (installexes)
  408. (complete 20)
  409. ;; Install the docs
  410. (installdocs)
  411. (complete 30)
  412. ;; Install examples
  413. (installexamp)
  414. (complete 40)
  415. ;; Install Arexx examples
  416. (installrexx)
  417. (complete 50)
  418. ;; Install samples
  419. (installsamp)
  420. (complete 60)
  421. ;; Install Storage dir
  422. (installstore)
  423. (complete 70)
  424. ;; Install extras
  425. (installxtras)
  426. (faxmsg)
  427. (complete 80)
  428. ;; Install libs
  429. (dolibs)
  430. (complete 90)
  431.  
  432. ;; Add to the user-startup
  433. (startup "MegaBook Version 3.0"
  434.     (prompt (cat (cat StartP @default-dest) "\""))
  435.     (help @startup-help)
  436.     (command (cat (cat "ASSIGN MegaBook3: \"" @default-dest) "\""))
  437. )
  438.  
  439. (complete 100)
  440.  
  441. ;; Wahey! at bloody last! bugger, its 2AM now and this script has taken
  442. ;; about 3 hours to write, mebbe 4 ... i hope u guys appreciate it!
  443.  
  444.