home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Amiga / Internet / Mail / Eucalyptus.lha / Eucalyptus / Install_Eucalyptus < prev    next >
Text File  |  1998-04-28  |  15KB  |  443 lines

  1. ; Install-Script for Eucalyptus 1.0
  2.  
  3. (set #installing "Installing ")
  4.  
  5. (set #bad-kick
  6.    (cat "\n\nSorry! You must have Workbench 2.04 or"
  7.         "\nhigher to to use this package."
  8.         "\n\nAborting Installation!"))
  9.  
  10.  
  11. (set #no-classact
  12.    (cat "\nHmmm!  You don't seem to have the ClassAct 2.0"
  13.         "\nGUI system installed.  You can obtain the"
  14.         "\nlatest ClassAct classes via ftp on the"
  15.         "\nInternet at: \n\n ftp.warped.com/pub/amiga/classact/"
  16.         "\n\nDo you wish to continue installation?"))
  17.  
  18. (set #Help-ContInstall
  19.    (cat "\nThis package requires ClassAct 2.0, which does not"
  20.         "\nappear to be installed on your system.  Select"
  21.         "\n'Continue' to intall the program anyway, or select"
  22.         "\n'Abort' to end the installation."))
  23.  
  24. ; ---------------------------------------------------------------------------
  25.  
  26. ; ************* PLEASE COPY THIS PROCEDURE ALONG WITH THE STRINGS IT USES
  27. ; ************* TO THE INSTALLER SCRIPT OF YOUR CLASSACT APPLICATION.
  28. ; ************* IT WILL TAKE CARE OF INSTALLING THE CLASSACT CLASSES YOU
  29. ; ************* PROVIDED WITH YOUR APPLICATION TO THE USER'S SYSTEM.
  30.  
  31. ; ClassAct installation procedure V 1.5 (12.5.96) by Osma Ahvenlampi
  32.  
  33. ; percentage of the size of included ClassAct classes versus the whole
  34. ; distribution (ie. total "complete" percentage after ClassAct is installed)
  35. (set classact-complete 50)
  36.  
  37. ; ClassAct installer scripts
  38. (set #classdest-prompt "Please select the directory where you want the ClassAct classes installed.\n(See help for details)")
  39. (set #classdest-help (cat "ClassAct is a GUI toolkit consisting of shared BOOPSI classes.\n\nSome programs require some or all of the ClassAct classes installed on your system. "
  40.     (if v39 (cat "OS 3.0 has a standard directory for BOOPSI classes, the SYS:Classes directory. It is recommended that you install ClassAct there.")
  41.             (cat "OS 2.0 does not have a standard place for disk resident BOOPSI classes. On OS 3.0 these classes are stored in the SYS:Classes directory. It is recommended that you create this directory and install ClassAct there.\nThis directory must be added in the LIBS: assign. This can be done by placing the command\nAssign >NIL: LIBS: SYS:Classes ADD\nto User-Startup. This installer will do this for you.")
  42.         )
  43.     )
  44. )
  45. (set #classes-020 "Do you want to use the OS 3.0, 020 optimised version of ClassAct?")
  46. (set #help-020 "Some ClassAct libraries have versions optimised for use on 020 or better equipped OS 3.0 or later machines. If your Amiga is such equipped, you should install these. The 68000/2.0 versions will also work, but are slightly slower.")
  47. (set #noclasses-message "The directory you selected for your ClassAct classes is not a part of the LIBS: assign.\n\nIt is necessary to add this assign so that the classes will be found properly.")
  48. (set #creating-dir "Creating directory ")
  49. (set #usbackup-prompt "User-Startup will now be backed up.")
  50. (set #usbackup-help "This installer will next make a modification in User-Startup. Before doing this the old User-Startup will be backed up to S:User-Startup.old")
  51. (set #adding-1 "Adding ")
  52. (set #adding-2 " to LIBS: assign\n")
  53. (set #adding-help "This is necessary so that the custom classes can be found.")
  54. (set #junod-button "It seems you have a late Commodore 'V42' button.gadget installed on your system.\n\nClassAct's button.gadget is far more capable than this gadget, and we recommend that you replace it. The ClassAct button.gadget is backwards compatible to the Commodore gadget. Do you wish to back up the Commodore gadget and replace it with the ClassAct version?")
  55. (set #junod-backed "The Commodore 'V42' button.gadget has been backed up with the name button.gadget.v42.\n\nThe ClassAct button.gadget will be installed in its place.")
  56. (set #junod-kept "The Commodore 'V42' button.gadget was not replaced with the more capable ClassAct version.\n\nPrograms depending on the availability of ClassAct-only features will be likely to work wrong.")
  57. (set #caprefs-message "CAPrefs is a small utility that sets some user preferences for ClassAct applications. These include the bevel style (Thin/Gadtools/Xen), window backfills, and group label details.\n\nPlease use the ClassAct GUI prefs editor to alter the default settings provided. ClassAct prefs will be installed in your system Prefs drawer.\n\n")
  58. (set #caprefs-startup-1 "Adding the command\n\n")
  59. (set #caprefs-startup-2 "\n\nTo your s:User-Startup.")
  60.  
  61. (procedure install-classact
  62. ; call this procedure to copy the classes included in the Classes directory
  63. ; in your distribution dir.
  64.      (if (exists "Classes") ; The archive contains a ClassAct library update.
  65.      (
  66.           (set comp-dest  (/ (* classact-complete 2) 10))
  67.           (set comp-libs  (/ (* classact-complete 3) 10))
  68.           (set comp-dirs  (/ (* classact-complete 4) 10))
  69.           (set comp-junod (/ (* classact-complete 5) 10))
  70.           (set comp-020   (/ (* classact-complete 6) 10))
  71.           (set comp-gad   (/ (* classact-complete 7) 10))
  72.           (set comp-im    (/ (* classact-complete 8) 10))
  73.           (set comp-prefs (/ (* classact-complete 9) 10))
  74.  
  75.           ; has the user installed ClassAct in CLASSACT: ?
  76.           (set @classact-dest (getassign "CLASSACT" "A"))
  77.           (if (= @classact-dest "") (set @classact-dest "SYS:Classes"))
  78.  
  79.           ; is ClassAct already in SYS:Classes ?
  80.           (if (or (not (exists (tackon @classact-dest "Gadgets/layout.gadget") (noreq)))
  81.                   (= @user-level 2))
  82.               ; no, ask where it should be placed
  83.               (set @classact-dest
  84.                   (askdir
  85.                       (prompt #classdest-prompt)
  86.                       (help #classdest-help)
  87.                       (default @classact-dest)
  88.                       (newpath)
  89.                   )
  90.               )
  91.           )
  92.  
  93.           (complete comp-dest)
  94.  
  95.           (if (<> (run (cat "C/CheckAssign LIBS: " @classact-dest)) 0)
  96.               (
  97.                   (message #noclasses-message)
  98.                   (if (not (exists @classact-dest))
  99.                        (makedir @classact-dest (prompt (cat #creating-dir @classact-dest)))
  100.                    )
  101.                   (set @addassign (cat "Assign >NIL: LIBS: " @classact-dest " ADD\n"))
  102.                   (startup "CLASSACT"
  103.                     (command @addassign)
  104.                       (prompt (cat #adding-1 @classact-dest #adding-2))
  105.                       (help #adding-help)
  106.                   )
  107.                   (run (@addassign))
  108.               )
  109.           )
  110.  
  111.           (complete comp-libs)
  112.  
  113.           (set @classact-gadgets (tackon @classact-dest "Gadgets"))
  114.           (set @classact-images (tackon @classact-dest "Images"))
  115.  
  116.           (if (not (exists @classact-gadgets (noreq)))
  117.               (makedir @classact-images
  118.                   (prompt (cat #creating-dir @classact-gadgets))
  119.               )
  120.           )
  121.  
  122.           (if (not (exists @classact-images (noreq)))
  123.               (makedir @classact-images
  124.                   (prompt (cat #creating-dir @classact-images))
  125.               )
  126.           )
  127.  
  128.           (complete comp-dirs)
  129.  
  130.           (if (exists "SYS:Classes/Gadgets/button.gadget")
  131.               (if (< 41 (/ (getversion "SYS:Classes/Gadgets/button.gadget") 65536))
  132.                   (if (askbool (prompt #junod-button) (help @askbool-help) (default 1))
  133.                       (
  134.                           (rename "SYS:Classes/Gadgets/button.gadget" "SYS:Classes/Gadgets/button.gadget.v42")
  135.                           (message #junod-backed)
  136.                       )
  137.                       (message #junod-kept)
  138.                   )
  139.               )
  140.           )
  141.  
  142.           (complete comp-junod)
  143.  
  144.           (if (exists "Classes/Gadgets/layout.gadget.020")
  145.                (set classes-020 (askbool (prompt #classes-020) (help #help-020) (default (and cpu020 v39))))
  146.                (set classes-020 0)
  147.           )
  148.  
  149.           (complete comp-020)
  150.  
  151.           (foreach "Classes/Gadgets" "#?.gadget"
  152.                (
  153.                     (set thislib (tackon "Classes/Gadgets" @each-name))
  154.                     (if (and classes-020 (exists (cat thislib ".020")))
  155.                          (set thislib (cat thislib ".020"))
  156.                     )
  157.                    (copylib (source thislib)
  158.                        (dest @classact-gadgets)
  159.                        (newname @each-name)
  160.                        (prompt (cat #installing @each-name))
  161.                        (help #classdest-help)
  162.                        (optional "force" "askuser")
  163.                    )
  164.               )
  165.           )
  166.  
  167.           (complete comp-gad)
  168.  
  169.           (foreach "Classes/Images" "#?.image"
  170.                (
  171.                     (set thislib (tackon "Classes/Images" @each-name))
  172.                     (if (and classes-020 (exists (cat thislib ".020")))
  173.                          (set thislib (cat thislib ".020"))
  174.                     )
  175.                    (copylib (source thislib)
  176.                        (dest @classact-images)
  177.                        (newname @each-name)
  178.                        (prompt (cat #installing @each-name))
  179.                        (help #classdest-help)
  180.                        (optional "force" "askuser")
  181.                    )
  182.               )
  183.           )
  184.  
  185.           (complete comp-im)
  186.  
  187.           (foreach "Classes" "#?.class"
  188.                (
  189.                     (set thislib (tackon "Classes" @each-name))
  190.                     (if (and classes-020 (exists (cat thislib ".020")))
  191.                          (set thislib (cat thislib ".020"))
  192.                     )
  193.                    (copylib (source thislib)
  194.                        (dest @classact-dest)
  195.                        (newname @each-name)
  196.                        (prompt (cat #installing @each-name))
  197.                        (help #classdest-help)
  198.                        (optional "force" "askuser")
  199.                    )
  200.               )
  201.           )
  202.      )
  203.      )
  204.      (if (exists "Prefs/ClassAct") ; The archive contains ClassAct prefs tools
  205.      (
  206.           (message #caprefs-message)
  207.  
  208.           (copylib (source "Prefs/CAPrefs")
  209.                (dest "C:")
  210.                (prompt (cat #installing "CAPrefs"))
  211.           )
  212.           (copylib (source "Prefs/ClassAct")
  213.                (dest "SYS:Prefs")
  214.                (prompt (cat #installing "ClassAct Prefs"))
  215.                (infos)
  216.           )
  217.  
  218.           (complete comp-prefs)
  219.  
  220.           (if (not (exists "ENVARC:ClassAct" (noreq)))
  221.                (
  222.                     (makedir "ENVARC:ClassAct"
  223.                          (prompt (cat #creating-dir "ENVARC:ClassAct"))
  224.                     )
  225.                     (textfile (dest "ENVARC:ClassAct/ClassAct")
  226.                          (append "")
  227.                     )
  228.                )
  229.           )
  230.  
  231.           (set caprefs-cmd "C:CAPrefs >NIL:\n")
  232.  
  233.           (startup "CAPREFS"
  234.                (prompt (cat #caprefs-startup-1 caprefs-cmd #caprefs-startup-2))
  235.                (help #caprefs-message)
  236.                (command caprefs-cmd)
  237.           )
  238.      )
  239.      )
  240.  
  241.      (complete classact-complete)
  242. )
  243.  
  244. ; ************** END OF CLASSACT INSTALL PROCEDURE. COPY THE BLOCK ABOVE
  245. ; ************** TO YOUR CLASSACT APPLICATION INSTALLER.
  246.  
  247. ; ---------------------------------------------------------------------------
  248.  
  249. (complete 0)
  250.  
  251. (if (< (getversion) (* 37 65536))
  252.         (abort #bad-kick)
  253. )
  254.  
  255. ; determine cpu type
  256. (set cpu (database "cpu"))
  257.  
  258. (set defcpu
  259.      (if (OR (= cpu "68000") (= cpu "68010"))
  260.           (set defcpu 0)
  261.           (set defcpu 1)
  262.      )
  263. )
  264.  
  265. ; ------------------------------
  266. ; Check if ClassAct 2.0 installed
  267. ; ------------------------------
  268.  
  269. ;(if (< (getversion "libs:window.class") (* 41 65536))
  270. ;   (set ContInstall
  271. ;            (askbool
  272. ;               (prompt #no-classact)
  273. ;               (help #Help-ContInstall)
  274. ;               (default 0)
  275. ;               (choices "Continue Installation" "Abort Installation")
  276. ;            )
  277. ;   )
  278. ;)
  279.  
  280. ;(if (= ContInstall 1)
  281. ;       (abort "\nInstallation Aborted!")
  282. ;)
  283.  
  284. (set @default-dest
  285.      (askdir
  286.           (prompt "In which directory would you like Eucalyptus installed?\n(A directory will be created there.)")
  287.           (help @askdir-help)
  288.           (default @default-dest)
  289.      )
  290. )
  291.  
  292. (set maindir (tackon @default-dest "Eucalyptus"))
  293. (set @default-dest maindir)
  294.  
  295. (set eucver
  296.      (askchoice
  297.           (prompt "Which executable of Eucalyptus would you like installed?")
  298.           (help @askchoice-help)
  299.           (choices "68000" "68030+")
  300.           (default defcpu)
  301.      )
  302. )
  303.  
  304. (set rexxdir
  305.      (askdir
  306.           (prompt "In which directory would you like Eucalyptus's ARexx scripts installed?")
  307.           (help @askdir-help)
  308.           (default (tackon maindir "Rexx"))
  309.           (newpath)
  310.      )
  311. )
  312.  
  313. (set helpdir
  314.      (askdir
  315.           (prompt "In which directory would you like Eucalyptus's AmigaGuide documentation installed?")
  316.           (help @askdir-help)
  317.           (default maindir)
  318.           (newpath)
  319.      )
  320. )
  321.  
  322. (install-classact)
  323.  
  324. (complete 50)
  325.  
  326. (select eucver
  327.      (copyfiles
  328.           (prompt "Copying main executable (68000)...")
  329.           (help @copyfiles-help)
  330.           (source "Eucalyptus")
  331.           (dest maindir)
  332.           (infos)
  333.           (optional "nofail")
  334.      )
  335.  
  336.      (copyfiles
  337.           (prompt "Copying main executable (68030+)...")
  338.           (help @copyfiles-help)
  339.           (source "Eucalyptus030+")
  340.           (dest maindir)
  341.           (infos)
  342.           (newname "Eucalyptus")
  343.           (optional "nofail")
  344.      )
  345.  
  346.      (copyfiles
  347.           (prompt "Copying main executable (PPC)...")
  348.           (help @copyfiles-help)
  349.           (source "EucalyptusPPC")
  350.           (dest maindir)
  351.           (infos)
  352.           (newname "Eucalyptus")
  353.           (optional "nofail")
  354.      )
  355. )
  356.  
  357. (complete 75)
  358.  
  359. (copyfiles
  360.      (help @copyfiles-help)
  361.      (source "Docs/Eucalyptus.guide")
  362.      (dest helpdir)
  363.      (infos)
  364.      (optional "nofail")
  365. )
  366.  
  367. ; .guide file uses AmigaGuide instead of MultiView for OS <= V38
  368. (set ver (/ (getversion) 65536))
  369.  
  370. (if (<= ver 38)
  371.      (tooltype
  372.           (dest (tackon maindir "Eucalyptus.guide"))
  373.           (setdefaulttool "AmigaGuide")
  374.      )
  375. )
  376.  
  377. (complete 80)
  378.  
  379. (copyfiles
  380.      (prompt "Copying ARexx scripts...")
  381.      (help @copyfiles-help)
  382.      (source "Rexx")
  383.      (dest rexxdir)
  384.      (pattern "#?.euc")
  385.      (infos)
  386.      (optional "nofail")
  387. )
  388.  
  389. (complete 85)
  390.  
  391. (if (exists "Support")
  392.      (
  393.           (copyfiles
  394.                (prompt "Copying Eucalyptus' support files...")
  395.                (help @copyfiles-help)
  396.                (source "Support")
  397.                (dest (tackon maindir "Support"))
  398.                (choices "Images" "Sounds")
  399.                (infos)
  400.                (optional "nofail")
  401.           )
  402.      )
  403. )
  404.  
  405. (complete 90)
  406.  
  407. (if (exists "Forms")
  408.      (
  409.           (copyfiles
  410.                (prompt "Copying Eucalyptus' forms...")
  411.                (help @copyfiles-help)
  412.                (source "Forms")
  413.                (dest (tackon maindir "Forms"))
  414.                (all)
  415.                (infos)
  416.                (optional "nofail")
  417.           )
  418.      )
  419. )
  420.  
  421. (complete 95)
  422.  
  423. (if (exists "Mail")
  424.      (
  425.           (set maildir (tackon maindir "Mail"))
  426.           (copyfiles
  427.                (prompt "Copying Eucalyptus' sample mail...")
  428.                (help @copyfiles-help)
  429.                (source "Mail")
  430.                (dest maildir)
  431.                (all)
  432.                (optional "nofail")
  433.           )
  434.      )
  435. )
  436.  
  437. (run "More README")
  438.  
  439. (complete 100)
  440.  
  441. (exit)
  442.  
  443.